From 4d42368214f2fd102b2d163c086e0f2d8c166dc6 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sat, 22 Mar 2014 15:08:18 +0800 Subject: [PATCH 01/98] Refs #355. Fixed ARM detection bug. --- ctest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctest.c b/ctest.c index 86dc226d4..d5c224726 100644 --- a/ctest.c +++ b/ctest.c @@ -125,7 +125,7 @@ ARCH_IA64 BINARY_64 #endif -#if defined(__ARM_ARCH) || defined(__ARM_ARCH_7A__) +#if defined(__ARM_ARCH) || defined(__ARM_ARCH_7A__) || defined(__arm__) ARCH_ARM #endif From 47b22763f8ab0219ca8dad8e29daa7f69a8c985d Mon Sep 17 00:00:00 2001 From: wernsaar Date: Thu, 24 Apr 2014 14:09:26 +0200 Subject: [PATCH 02/98] reduced stack usage on windows to 16K --- kernel/x86_64/dgemm_kernel_4x4_haswell.S | 3 ++- param.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/x86_64/dgemm_kernel_4x4_haswell.S b/kernel/x86_64/dgemm_kernel_4x4_haswell.S index d165d5da0..4964d17e6 100644 --- a/kernel/x86_64/dgemm_kernel_4x4_haswell.S +++ b/kernel/x86_64/dgemm_kernel_4x4_haswell.S @@ -80,10 +80,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef WINDOWS_ABI #define STACKSIZE 96 +#define L_BUFFER_SIZE 256*8*12+4096 #else #define STACKSIZE 256 +#define L_BUFFER_SIZE 128*8*12+4096 #define OLD_A 40 + STACKSIZE(%rsp) #define OLD_B 48 + STACKSIZE(%rsp) @@ -93,7 +95,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif -#define L_BUFFER_SIZE 512*8*12 #define Ndiv12 24(%rsp) #define Nmod12 32(%rsp) diff --git a/param.h b/param.h index e4b095a84..aae648f8c 100644 --- a/param.h +++ b/param.h @@ -1228,7 +1228,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define ZGEMM_DEFAULT_P 256 #define SGEMM_DEFAULT_Q 384 +#ifdef WINDOWS_ABI +#define DGEMM_DEFAULT_Q 128 +#else #define DGEMM_DEFAULT_Q 256 +#endif #define CGEMM_DEFAULT_Q 192 #define ZGEMM_DEFAULT_Q 128 From 66198faab63e1e7c01fad2e57a743a07d8978bfb Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sun, 27 Apr 2014 13:05:26 +0800 Subject: [PATCH 03/98] Refs #63. delete prefix for mingw64 toolchain. --- quickbuild.win64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickbuild.win64 b/quickbuild.win64 index 8f0189435..85a845ae0 100644 --- a/quickbuild.win64 +++ b/quickbuild.win64 @@ -1,4 +1,4 @@ #!/bin/bash echo " Please read https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio " -make BINARY=64 CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran +make BINARY=64 CC=gcc FC=gfortran From 187237b622ace8132ddc1aa87dcf29a969a17fd6 Mon Sep 17 00:00:00 2001 From: xantares Date: Thu, 1 May 2014 21:48:26 +0200 Subject: [PATCH 04/98] Install dll to prefix/bin instead of prefix/bin --- Makefile.install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.install b/Makefile.install index a24f5b26d..6fcbcc3e1 100644 --- a/Makefile.install +++ b/Makefile.install @@ -7,6 +7,7 @@ PREFIX ?= /opt/OpenBLAS OPENBLAS_INCLUDE_DIR := $(PREFIX)/include OPENBLAS_LIBRARY_DIR := $(PREFIX)/lib +OPENBLAS_BINARY_DIR := $(PREFIX)/bin OPENBLAS_BUILD_DIR := $(CURDIR) .PHONY : install @@ -78,10 +79,10 @@ ifeq ($(OSNAME), Darwin) @-ln -fs $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBPREFIX).dylib endif ifeq ($(OSNAME), WINNT) - @-cp $(LIBDLLNAME) $(OPENBLAS_LIBRARY_DIR) + @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) endif ifeq ($(OSNAME), CYGWIN_NT) - @-cp $(LIBDLLNAME) $(OPENBLAS_LIBRARY_DIR) + @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) endif endif From 43bb633096e53e4920e862fff3f79a02bfee6aed Mon Sep 17 00:00:00 2001 From: xantares Date: Fri, 2 May 2014 08:54:22 +0200 Subject: [PATCH 05/98] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 294502f81..c2a019305 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ endif ifeq ($(USE_OPENMP), 1) @echo - @echo " Use OpenMP in the multithreading. Becasue of ignoring OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS flags, " + @echo " Use OpenMP in the multithreading. Because of ignoring OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS flags, " @echo " you should use OMP_NUM_THREADS environment variable to control the number of threads." @echo endif From 025fc914cccbc95ea1eae60bcdf0291ec1960335 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 2 May 2014 11:34:26 +0200 Subject: [PATCH 06/98] fixed 2 bugs as reported by Brendan Tracey --- interface/rotmg.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/interface/rotmg.c b/interface/rotmg.c index 563ea7fb9..4dbb580eb 100644 --- a/interface/rotmg.c +++ b/interface/rotmg.c @@ -26,7 +26,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ /************************************************************************************** -* 2014/02/28 Saar +* 2014/05/02 Saar +* fixed two bugs as reported by Brendan Tracey * Test with lapack-3.5.0 : OK * **************************************************************************************/ @@ -145,9 +146,12 @@ void CNAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT dy1, FLOAT *dparam){ } else { - dh21 = -ONE; - dh12 = ONE; - dflag = -ONE; + if(dflag == ONE) + { + dh21 = -ONE; + dh12 = ONE; + dflag = -ONE; + } } if( *dd1 <= RGAMSQ ) { @@ -178,9 +182,12 @@ void CNAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT dy1, FLOAT *dparam){ } else { - dh21 = -ONE; - dh12 = ONE; - dflag = -ONE; + if(dflag == ONE) + { + dh21 = -ONE; + dh12 = ONE; + dflag = -ONE; + } } if( ABS(*dd2) <= RGAMSQ ) { From 793509a3b559a5e2b243fa93e18bc63822b9e58c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Tue, 6 May 2014 15:29:39 +0200 Subject: [PATCH 07/98] replaced files for sdot, sgemv_n and sgemv_t for bug #348 --- kernel/x86/KERNEL | 6 +++--- kernel/x86_64/KERNEL | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/x86/KERNEL b/kernel/x86/KERNEL index 83fd551bc..c1a1195a1 100644 --- a/kernel/x86/KERNEL +++ b/kernel/x86/KERNEL @@ -59,7 +59,7 @@ CASUMKERNEL = zasum_sse.S endif ifndef SDOTKERNEL -SDOTKERNEL = dot_sse.S +SDOTKERNEL = ../arm/dot.c endif ifndef CDOTKERNEL @@ -107,11 +107,11 @@ CSWAPKERNEL = zswap_sse.S endif ifndef SGEMVNKERNEL -SGEMVNKERNEL = gemv_n_sse.S +SGEMVNKERNEL = ../arm/gemv_n.c endif ifndef SGEMVTKERNEL -SGEMVTKERNEL = gemv_t_sse.S +SGEMVTKERNEL = ../arm/gemv_t.c endif ifndef CGEMVNKERNEL diff --git a/kernel/x86_64/KERNEL b/kernel/x86_64/KERNEL index 3d980f98f..e6a97152e 100644 --- a/kernel/x86_64/KERNEL +++ b/kernel/x86_64/KERNEL @@ -119,7 +119,7 @@ XCOPYKERNEL = zcopy.S endif ifndef SDOTKERNEL -SDOTKERNEL = dot_sse.S +SDOTKERNEL = ../arm/dot.c endif ifndef DDOTKERNEL @@ -369,11 +369,11 @@ endif GEMVDEP = ../l2param.h ifndef SGEMVNKERNEL -SGEMVNKERNEL = sgemv_n.S +SGEMVNKERNEL = ../arm/gemv_n.c endif ifndef SGEMVTKERNEL -SGEMVTKERNEL = sgemv_t.S +SGEMVTKERNEL = ../arm/gemv_t.c endif ifndef DGEMVNKERNEL From a35a1a9ae7e03e7c2f64347cd8134575dc9636b7 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 7 May 2014 11:33:02 +0200 Subject: [PATCH 08/98] changed makefiles for lapack development --- Makefile.system | 1 + driver/others/Makefile | 2 +- lapack-netlib/SRC/Makefile | 80 ++++++++++++++++++-------------------- lapack/Makefile | 3 +- make.inc | 6 +-- 5 files changed, 44 insertions(+), 48 deletions(-) diff --git a/Makefile.system b/Makefile.system index 7ba45f2e1..bbd7e5621 100644 --- a/Makefile.system +++ b/Makefile.system @@ -158,6 +158,7 @@ endif ifeq ($(OSNAME), Linux) EXTRALIB += -lm +NO_EXPRECISION = 1 endif ifeq ($(OSNAME), AIX) diff --git a/driver/others/Makefile b/driver/others/Makefile index d7a965c9a..ca05c5129 100644 --- a/driver/others/Makefile +++ b/driver/others/Makefile @@ -3,7 +3,7 @@ include ../../Makefile.system COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) -COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX) +#COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX) ifdef SMP COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX) diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 85154280f..46a3f7881 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -54,9 +54,9 @@ include ../make.inc # ####################################################################### -ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla_array.o iparmq.o \ +ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \ ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ - ../INSTALL/ilaver.o + ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o SCLAUX = \ sbdsdc.o \ @@ -92,7 +92,7 @@ DZLAUX = \ dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \ dsteqr.o dsterf.o dlaisnan.o disnan.o \ dlartgp.o dlartgs.o \ - ../INSTALL/dsecnd_$(TIMER).o + ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o SLASRC = \ sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \ @@ -102,7 +102,7 @@ SLASRC = \ sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ - sgetc2.o sgetri.o \ + sgetc2.o sgetf2.o sgetri.o \ sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ sggglm.o sgghrd.o sgglse.o sggqrf.o \ sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ @@ -118,16 +118,16 @@ SLASRC = \ slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \ slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \ slarrv.o slartv.o \ - slarz.o slarzb.o slarzt.o slasy2.o slasyf.o slasyf_rook.o \ + slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o slasyf_rook.o \ slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ - sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ + slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ spbstf.o spbsv.o spbsvx.o \ spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ - sposvx.o spotri.o spstrf.o spstf2.o \ + sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \ sppcon.o sppequ.o \ spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ @@ -147,7 +147,7 @@ SLASRC = \ stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ stptrs.o \ strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ - strtrs.o stzrqf.o stzrzf.o sstemr.o \ + strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ @@ -157,7 +157,7 @@ SLASRC = \ sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -DSLASRC = spotrs.o +DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o ifdef USEXBLAS SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ @@ -177,7 +177,7 @@ CLASRC = \ cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ - cgesvx.o cgetc2.o cgetri.o \ + cgesvx.o cgetc2.o cgetf2.o cgetri.o \ cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ cgghrd.o cgglse.o cggqrf.o cggrqf.o \ cggsvd.o cggsvp.o \ @@ -207,10 +207,10 @@ CLASRC = \ clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \ clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ - clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ - clatzm.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ + claswp.o clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ + clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ - cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ + cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ @@ -225,7 +225,7 @@ CLASRC = \ ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ ctprfs.o ctptri.o \ ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ - ctrsyl.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ + ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ @@ -252,7 +252,7 @@ CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o endif -ZCLASRC = cpotrs.o +ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o DLASRC = \ dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ @@ -262,8 +262,8 @@ DLASRC = \ dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ - dgetc2.o dgetri.o \ - dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ + dgetc2.o dgetf2.o dgetrf.o dgetri.o \ + dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ dggglm.o dgghrd.o dgglse.o dggqrf.o \ dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ @@ -278,16 +278,16 @@ DLASRC = \ dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \ dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ dlargv.o dlarrv.o dlartv.o \ - dlarz.o dlarzb.o dlarzt.o dlasy2.o dlasyf.o dlasyf_rook.o \ - dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o \ - dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ + dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o dlasyf_rook.o \ + dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ + dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ dpbstf.o dpbsv.o dpbsvx.o \ dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ - dposvx.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ + dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ dppcon.o dppequ.o \ dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ @@ -307,7 +307,7 @@ DLASRC = \ dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ dtptrs.o \ dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ - dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ + dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ @@ -335,8 +335,8 @@ ZLASRC = \ zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ - zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o \ - zgetri.o \ + zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ + zgetri.o zgetrs.o \ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ zgghrd.o zgglse.o zggqrf.o zggrqf.o \ zggsvd.o zggsvp.o \ @@ -368,11 +368,11 @@ ZLASRC = \ zlarfg.o zlarft.o zlarfgp.o \ zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ - zlassq.o zlasyf.o zlasyf_rook.o \ + zlassq.o zlaswp.o zlasyf.o zlasyf_rook.o \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ - zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ + zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ - zposv.o zposvx.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ + zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ @@ -387,7 +387,7 @@ ZLASRC = \ ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ ztprfs.o ztptri.o \ ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ - ztrsyl.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ + ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ @@ -417,8 +417,6 @@ endif ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \ $(SCLAUX) $(DZLAUX) $(ALLAUX) -ALLOBJ_P = $(ALLOBJ:.o=.$(PSUFFIX)) - ifdef USEXBLAS ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) endif @@ -435,6 +433,7 @@ lapacklib: $(ALLOBJ) $(ALLXOBJ) $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ_P) $(RANLIB) $@ + single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \ $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX) @@ -483,16 +482,11 @@ clean: %.$(PSUFFIX): %.f $(FORTRAN) $(POPTS) -c $< -o $@ -slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -zla_wwaddw.o: zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ - -slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -sla_wwaddw.$(PSUFFIX): sla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -dla_wwaddw.$(PSUFFIX): dla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -cla_wwaddw.$(PSUFFIX): cla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -zla_wwaddw.$(PSUFFIX): zla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ + +slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ +dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ +sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ +dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ +cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ +zla_wwaddw.o: zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ + diff --git a/lapack/Makefile b/lapack/Makefile index 215badb74..dd203d222 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -1,7 +1,8 @@ TOPDIR = .. include ../Makefile.system -SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs +#SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs +SUBDIRS = FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 diff --git a/make.inc b/make.inc index 01b9bde92..d3f91cbaa 100644 --- a/make.inc +++ b/make.inc @@ -5,7 +5,7 @@ LOADER = $(FORTRAN) TIMER = NONE ARCHFLAGS= -ru #RANLIB = ranlib -BLASLIB = +BLASLIB = ../../../libopenblas.a TMGLIB = tmglib.a -EIGSRCLIB = eigsrc.a -LINSRCLIB = linsrc.a +#EIGSRCLIB = eigsrc.a +#LINSRCLIB = linsrc.a From e673848a9be68e6eb620839d23696fda23f7287b Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 7 May 2014 14:36:49 +0200 Subject: [PATCH 09/98] added log file for lapack development --- lapack-devel.log | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lapack-devel.log diff --git a/lapack-devel.log b/lapack-devel.log new file mode 100644 index 000000000..8243bb890 --- /dev/null +++ b/lapack-devel.log @@ -0,0 +1,19 @@ +======================================================================================== +2014/05/07 Saar + +Platform: BULLDOZER single thread + + + --> LAPACK TESTING SUMMARY <-- + Processing LAPACK Testing output found in the TESTING direcory +SUMMARY nb test run numerical error other error +================ =========== ================= ================ +REAL 1079349 0 (0.000%) 0 (0.000%) +DOUBLE PRECISION 1080161 0 (0.000%) 0 (0.000%) +COMPLEX 556022 0 (0.000%) 0 (0.000%) +COMPLEX16 556834 0 (0.000%) 0 (0.000%) + +--> ALL PRECISIONS 3272366 0 (0.000%) 0 (0.000%) + +======================================================================================== + From 320c80590535e1448b9de70d24212fe1b6c0aad5 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Thu, 8 May 2014 11:06:32 +0200 Subject: [PATCH 10/98] fixed incorrect parameter 2 errors --- interface/syr2k.c | 15 ++++++++++++--- interface/syrk.c | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/interface/syr2k.c b/interface/syr2k.c index 01fbe648f..381e088a6 100644 --- a/interface/syr2k.c +++ b/interface/syr2k.c @@ -145,12 +145,21 @@ void NAME(char *UPLO, char *TRANS, if (uplo_arg == 'U') uplo = 0; if (uplo_arg == 'L') uplo = 1; +#ifndef COMPLEX if (trans_arg == 'N') trans = 0; -#ifndef HEMM if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; -#endif if (trans_arg == 'C') trans = 1; +#else +#ifdef HEMM + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'C') trans = 1; +#else + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; +#endif + +#endif + nrowa = args.n; if (trans & 1) nrowa = args.k; diff --git a/interface/syrk.c b/interface/syrk.c index b85e2c880..072cc86f5 100644 --- a/interface/syrk.c +++ b/interface/syrk.c @@ -148,12 +148,21 @@ void NAME(char *UPLO, char *TRANS, if (uplo_arg == 'U') uplo = 0; if (uplo_arg == 'L') uplo = 1; + +#ifndef COMPLEX if (trans_arg == 'N') trans = 0; -#ifndef HEMM if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; -#endif if (trans_arg == 'C') trans = 1; +#else +#ifdef HEMM + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'C') trans = 1; +#else + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; +#endif + +#endif nrowa = args.n; if (trans & 1) nrowa = args.k; From 6b252033ae7982eb797a7257e049c50842d062c2 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 9 May 2014 13:17:47 +0200 Subject: [PATCH 11/98] changed test ratio from 30.0 to 40.0 --- lapack-netlib/TESTING/ctest_rfp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack-netlib/TESTING/ctest_rfp.in b/lapack-netlib/TESTING/ctest_rfp.in index d6988f2a7..8ffb27a32 100644 --- a/lapack-netlib/TESTING/ctest_rfp.in +++ b/lapack-netlib/TESTING/ctest_rfp.in @@ -5,5 +5,5 @@ Data file for testing COMPLEX LAPACK linear equation routines RFP format 1 2 15 Values of NRHS (number of right hand sides) 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 1 2 3 4 5 6 7 8 9 Matrix Types -30.0 Threshold value of test ratio +40.0 Threshold value of test ratio T Put T to test the error exits From 2424af62fde4a0257e38310ef38b7ad56cfa8507 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 10:52:37 +0200 Subject: [PATCH 12/98] replaced dgemm-kernel because bug in lapack --- kernel/x86_64/KERNEL.NEHALEM | 27 ++++++++++++++++----------- param.h | 4 ++-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/kernel/x86_64/KERNEL.NEHALEM b/kernel/x86_64/KERNEL.NEHALEM index 1a1c7a2e0..878e3cdd8 100644 --- a/kernel/x86_64/KERNEL.NEHALEM +++ b/kernel/x86_64/KERNEL.NEHALEM @@ -7,15 +7,19 @@ SGEMMINCOPYOBJ = sgemm_incopy$(TSUFFIX).$(SUFFIX) SGEMMITCOPYOBJ = sgemm_itcopy$(TSUFFIX).$(SUFFIX) SGEMMONCOPYOBJ = sgemm_oncopy$(TSUFFIX).$(SUFFIX) SGEMMOTCOPYOBJ = sgemm_otcopy$(TSUFFIX).$(SUFFIX) -DGEMMKERNEL = gemm_kernel_2x8_nehalem.S -DGEMMINCOPY = dgemm_ncopy_2.S -DGEMMITCOPY = dgemm_tcopy_2.S -DGEMMONCOPY = ../generic/gemm_ncopy_8.c -DGEMMOTCOPY = dgemm_tcopy_8.S -DGEMMINCOPYOBJ = dgemm_incopy$(TSUFFIX).$(SUFFIX) -DGEMMITCOPYOBJ = dgemm_itcopy$(TSUFFIX).$(SUFFIX) + + +DGEMMKERNEL = gemm_kernel_4x4_core2.S +DGEMMINCOPY = +DGEMMITCOPY = +DGEMMONCOPY = gemm_ncopy_4.S +DGEMMOTCOPY = gemm_tcopy_4.S +DGEMMINCOPYOBJ = +DGEMMITCOPYOBJ = DGEMMONCOPYOBJ = dgemm_oncopy$(TSUFFIX).$(SUFFIX) DGEMMOTCOPYOBJ = dgemm_otcopy$(TSUFFIX).$(SUFFIX) + + CGEMMKERNEL = zgemm_kernel_2x4_nehalem.S CGEMMINCOPY = zgemm_ncopy_2.S CGEMMITCOPY = zgemm_tcopy_2.S @@ -40,10 +44,11 @@ STRSMKERNEL_LT = trsm_kernel_LT_4x8_nehalem.S STRSMKERNEL_RN = trsm_kernel_LT_4x8_nehalem.S STRSMKERNEL_RT = trsm_kernel_RT_4x8_nehalem.S -DTRSMKERNEL_LN = trsm_kernel_LN_2x8_nehalem.S -DTRSMKERNEL_LT = trsm_kernel_LT_2x8_nehalem.S -DTRSMKERNEL_RN = trsm_kernel_LT_2x8_nehalem.S -DTRSMKERNEL_RT = trsm_kernel_RT_2x8_nehalem.S +DTRSMKERNEL_LN = trsm_kernel_LN_4x4_core2.S +DTRSMKERNEL_LT = trsm_kernel_LT_4x4_core2.S +DTRSMKERNEL_RN = trsm_kernel_LT_4x4_core2.S +DTRSMKERNEL_RT = trsm_kernel_RT_4x4_core2.S + CTRSMKERNEL_LN = ztrsm_kernel_LN_2x4_nehalem.S CTRSMKERNEL_LT = ztrsm_kernel_LT_2x4_nehalem.S diff --git a/param.h b/param.h index aae648f8c..0065cf5e4 100644 --- a/param.h +++ b/param.h @@ -1032,14 +1032,14 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define XGEMM_DEFAULT_UNROLL_N 1 #else #define SGEMM_DEFAULT_UNROLL_M 4 -#define DGEMM_DEFAULT_UNROLL_M 2 +#define DGEMM_DEFAULT_UNROLL_M 4 #define QGEMM_DEFAULT_UNROLL_M 2 #define CGEMM_DEFAULT_UNROLL_M 2 #define ZGEMM_DEFAULT_UNROLL_M 1 #define XGEMM_DEFAULT_UNROLL_M 1 #define SGEMM_DEFAULT_UNROLL_N 8 -#define DGEMM_DEFAULT_UNROLL_N 8 +#define DGEMM_DEFAULT_UNROLL_N 4 #define QGEMM_DEFAULT_UNROLL_N 2 #define CGEMM_DEFAULT_UNROLL_N 4 #define ZGEMM_DEFAULT_UNROLL_N 4 From 5f3b68b4d454d2eebcc60df48f330f1ec65f79cc Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 11:24:07 +0200 Subject: [PATCH 13/98] replaced sgemm and cgemm kernels because lapack bugs --- kernel/x86_64/KERNEL.SANDYBRIDGE | 30 ++++++++++++++++-------------- param.h | 4 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/kernel/x86_64/KERNEL.SANDYBRIDGE b/kernel/x86_64/KERNEL.SANDYBRIDGE index c321be752..4d095d21f 100644 --- a/kernel/x86_64/KERNEL.SANDYBRIDGE +++ b/kernel/x86_64/KERNEL.SANDYBRIDGE @@ -1,34 +1,35 @@ -SGEMMKERNEL = sgemm_kernel_8x8_sandy.S -SGEMMINCOPY = -SGEMMITCOPY = +SGEMMKERNEL = gemm_kernel_4x8_nehalem.S +SGEMMINCOPY = gemm_ncopy_4.S +SGEMMITCOPY = gemm_tcopy_4.S SGEMMONCOPY = ../generic/gemm_ncopy_8.c SGEMMOTCOPY = ../generic/gemm_tcopy_8.c -SGEMMINCOPYOBJ = -SGEMMITCOPYOBJ = +SGEMMINCOPYOBJ = sgemm_incopy$(TSUFFIX).$(SUFFIX) +SGEMMITCOPYOBJ = sgemm_itcopy$(TSUFFIX).$(SUFFIX) SGEMMONCOPYOBJ = sgemm_oncopy$(TSUFFIX).$(SUFFIX) SGEMMOTCOPYOBJ = sgemm_otcopy$(TSUFFIX).$(SUFFIX) + + DGEMMKERNEL = dgemm_kernel_4x8_sandy.S DGEMMINCOPY = ../generic/gemm_ncopy_8.c DGEMMITCOPY = ../generic/gemm_tcopy_8.c -#DGEMMONCOPY = gemm_ncopy_4.S DGEMMONCOPY = ../generic/gemm_ncopy_4.c DGEMMOTCOPY = ../generic/gemm_tcopy_4.c -#DGEMMOTCOPY = gemm_tcopy_4.S DGEMMINCOPYOBJ = dgemm_incopy$(TSUFFIX).$(SUFFIX) DGEMMITCOPYOBJ = dgemm_itcopy$(TSUFFIX).$(SUFFIX) DGEMMONCOPYOBJ = dgemm_oncopy$(TSUFFIX).$(SUFFIX) DGEMMOTCOPYOBJ = dgemm_otcopy$(TSUFFIX).$(SUFFIX) -#CGEMMKERNEL = zgemm_kernel_2x4_nehalem.S -CGEMMKERNEL = cgemm_kernel_4x8_sandy.S -CGEMMINCOPY = ../generic/zgemm_ncopy_8_sandy.c -CGEMMITCOPY = ../generic/zgemm_tcopy_8_sandy.c -CGEMMONCOPY = ../generic/zgemm_ncopy_4_sandy.c -CGEMMOTCOPY = ../generic/zgemm_tcopy_4_sandy.c + +CGEMMKERNEL = zgemm_kernel_2x4_nehalem.S +CGEMMINCOPY = zgemm_ncopy_2.S +CGEMMITCOPY = zgemm_tcopy_2.S +CGEMMONCOPY = ../generic/zgemm_ncopy_4.c +CGEMMOTCOPY = ../generic/zgemm_tcopy_4.c CGEMMINCOPYOBJ = cgemm_incopy$(TSUFFIX).$(SUFFIX) CGEMMITCOPYOBJ = cgemm_itcopy$(TSUFFIX).$(SUFFIX) CGEMMONCOPYOBJ = cgemm_oncopy$(TSUFFIX).$(SUFFIX) CGEMMOTCOPYOBJ = cgemm_otcopy$(TSUFFIX).$(SUFFIX) -#ZGEMMKERNEL = zgemm_kernel_1x4_nehalem.S + + ZGEMMKERNEL = zgemm_kernel_4x4_sandy.S ZGEMMINCOPY = ZGEMMITCOPY = @@ -58,6 +59,7 @@ ZGEMMOTCOPYOBJ = zgemm_otcopy$(TSUFFIX).$(SUFFIX) #ZTRSMKERNEL_LT = ztrsm_kernel_LT_1x4_nehalem.S #ZTRSMKERNEL_RN = ztrsm_kernel_LT_1x4_nehalem.S #ZTRSMKERNEL_RT = ztrsm_kernel_RT_1x4_nehalem.S + STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c diff --git a/param.h b/param.h index 0065cf5e4..efec08b85 100644 --- a/param.h +++ b/param.h @@ -1104,10 +1104,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define ZGEMM_DEFAULT_UNROLL_N 2 #define XGEMM_DEFAULT_UNROLL_N 1 #else -#define SGEMM_DEFAULT_UNROLL_M 8 +#define SGEMM_DEFAULT_UNROLL_M 4 #define DGEMM_DEFAULT_UNROLL_M 8 #define QGEMM_DEFAULT_UNROLL_M 2 -#define CGEMM_DEFAULT_UNROLL_M 8 +#define CGEMM_DEFAULT_UNROLL_M 2 #define ZGEMM_DEFAULT_UNROLL_M 4 #define XGEMM_DEFAULT_UNROLL_M 1 From 0732238213669cd5daad0baaa8c46c11adea7569 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 21:25:17 +0200 Subject: [PATCH 14/98] removed all C files in interface --- interface/asum.c | 93 --------- interface/axpy.c | 121 ------------ interface/copy.c | 80 -------- interface/dot.c | 101 ---------- interface/dsdot.c | 102 ---------- interface/gbmv.c | 252 ------------------------- interface/gemm.c | 461 --------------------------------------------- interface/gemv.c | 237 ----------------------- interface/ger.c | 193 ------------------- interface/gesv.c | 154 --------------- interface/getf2.c | 109 ----------- interface/getrf.c | 121 ------------ interface/getrs.c | 152 --------------- interface/imax.c | 171 ----------------- interface/larf.c | 109 ----------- interface/laswp.c | 110 ----------- interface/lauu2.c | 128 ------------- interface/lauum.c | 139 -------------- interface/max.c | 169 ----------------- interface/nrm2.c | 93 --------- interface/potf2.c | 128 ------------- interface/potrf.c | 139 -------------- interface/potri.c | 160 ---------------- interface/rot.c | 82 -------- interface/rotg.c | 109 ----------- interface/rotm.c | 155 --------------- interface/rotmg.c | 235 ----------------------- interface/sbmv.c | 215 --------------------- interface/scal.c | 112 ----------- interface/sdsdot.c | 101 ---------- interface/spmv.c | 207 -------------------- interface/spr.c | 197 ------------------- interface/spr2.c | 203 -------------------- interface/swap.c | 115 ----------- interface/symm.c | 442 ------------------------------------------- interface/symv.c | 205 -------------------- interface/syr.c | 200 -------------------- interface/syr2.c | 204 -------------------- interface/syr2k.c | 377 ------------------------------------ interface/syrk.c | 366 ----------------------------------- interface/tbmv.c | 248 ------------------------ interface/tbsv.c | 213 --------------------- interface/tpmv.c | 239 ----------------------- interface/tpsv.c | 204 -------------------- interface/trmv.c | 243 ------------------------ interface/trsm.c | 391 -------------------------------------- interface/trsv.c | 208 -------------------- interface/trti2.c | 134 ------------- interface/trtri.c | 156 --------------- interface/zaxpy.c | 127 ------------- interface/zdot.c | 202 -------------------- interface/zgbmv.c | 271 -------------------------- interface/zgemv.c | 259 ------------------------- interface/zger.c | 249 ------------------------ interface/zgetf2.c | 109 ----------- interface/zgetrf.c | 122 ------------ interface/zgetrs.c | 153 --------------- interface/zhbmv.c | 223 ---------------------- interface/zhemv.c | 215 --------------------- interface/zher.c | 200 -------------------- interface/zher2.c | 207 -------------------- interface/zhpmv.c | 213 --------------------- interface/zhpr.c | 198 ------------------- interface/zhpr2.c | 207 -------------------- interface/zlaswp.c | 108 ----------- interface/zlauu2.c | 129 ------------- interface/zlauum.c | 141 -------------- interface/zpotf2.c | 129 ------------- interface/zpotrf.c | 141 -------------- interface/zpotri.c | 157 --------------- interface/zrot.c | 72 ------- interface/zrotg.c | 115 ----------- interface/zsbmv.c | 157 --------------- interface/zscal.c | 117 ------------ interface/zspmv.c | 154 --------------- interface/zspr.c | 146 -------------- interface/zspr2.c | 149 --------------- interface/zswap.c | 116 ------------ interface/zsymv.c | 143 -------------- interface/zsyr.c | 203 -------------------- interface/zsyr2.c | 151 --------------- interface/ztbmv.c | 260 ------------------------- interface/ztbsv.c | 219 --------------------- interface/ztpmv.c | 252 ------------------------- interface/ztpsv.c | 210 --------------------- interface/ztrmv.c | 255 ------------------------- interface/ztrsv.c | 216 --------------------- interface/ztrti2.c | 134 ------------- interface/ztrtri.c | 154 --------------- 89 files changed, 16066 deletions(-) delete mode 100644 interface/asum.c delete mode 100644 interface/axpy.c delete mode 100644 interface/copy.c delete mode 100644 interface/dot.c delete mode 100644 interface/dsdot.c delete mode 100644 interface/gbmv.c delete mode 100644 interface/gemm.c delete mode 100644 interface/gemv.c delete mode 100644 interface/ger.c delete mode 100644 interface/gesv.c delete mode 100644 interface/getf2.c delete mode 100644 interface/getrf.c delete mode 100644 interface/getrs.c delete mode 100644 interface/imax.c delete mode 100644 interface/larf.c delete mode 100644 interface/laswp.c delete mode 100644 interface/lauu2.c delete mode 100644 interface/lauum.c delete mode 100644 interface/max.c delete mode 100644 interface/nrm2.c delete mode 100644 interface/potf2.c delete mode 100644 interface/potrf.c delete mode 100644 interface/potri.c delete mode 100644 interface/rot.c delete mode 100644 interface/rotg.c delete mode 100644 interface/rotm.c delete mode 100644 interface/rotmg.c delete mode 100644 interface/sbmv.c delete mode 100644 interface/scal.c delete mode 100644 interface/sdsdot.c delete mode 100644 interface/spmv.c delete mode 100644 interface/spr.c delete mode 100644 interface/spr2.c delete mode 100644 interface/swap.c delete mode 100644 interface/symm.c delete mode 100644 interface/symv.c delete mode 100644 interface/syr.c delete mode 100644 interface/syr2.c delete mode 100644 interface/syr2k.c delete mode 100644 interface/syrk.c delete mode 100644 interface/tbmv.c delete mode 100644 interface/tbsv.c delete mode 100644 interface/tpmv.c delete mode 100644 interface/tpsv.c delete mode 100644 interface/trmv.c delete mode 100644 interface/trsm.c delete mode 100644 interface/trsv.c delete mode 100644 interface/trti2.c delete mode 100644 interface/trtri.c delete mode 100644 interface/zaxpy.c delete mode 100644 interface/zdot.c delete mode 100644 interface/zgbmv.c delete mode 100644 interface/zgemv.c delete mode 100644 interface/zger.c delete mode 100644 interface/zgetf2.c delete mode 100644 interface/zgetrf.c delete mode 100644 interface/zgetrs.c delete mode 100644 interface/zhbmv.c delete mode 100644 interface/zhemv.c delete mode 100644 interface/zher.c delete mode 100644 interface/zher2.c delete mode 100644 interface/zhpmv.c delete mode 100644 interface/zhpr.c delete mode 100644 interface/zhpr2.c delete mode 100644 interface/zlaswp.c delete mode 100644 interface/zlauu2.c delete mode 100644 interface/zlauum.c delete mode 100644 interface/zpotf2.c delete mode 100644 interface/zpotrf.c delete mode 100644 interface/zpotri.c delete mode 100644 interface/zrot.c delete mode 100644 interface/zrotg.c delete mode 100644 interface/zsbmv.c delete mode 100644 interface/zscal.c delete mode 100644 interface/zspmv.c delete mode 100644 interface/zspr.c delete mode 100644 interface/zspr2.c delete mode 100644 interface/zswap.c delete mode 100644 interface/zsymv.c delete mode 100644 interface/zsyr.c delete mode 100644 interface/zsyr2.c delete mode 100644 interface/ztbmv.c delete mode 100644 interface/ztbsv.c delete mode 100644 interface/ztpmv.c delete mode 100644 interface/ztpsv.c delete mode 100644 interface/ztrmv.c delete mode 100644 interface/ztrsv.c delete mode 100644 interface/ztrti2.c delete mode 100644 interface/ztrtri.c diff --git a/interface/asum.c b/interface/asum.c deleted file mode 100644 index 634836e28..000000000 --- a/interface/asum.c +++ /dev/null @@ -1,93 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - FLOATRET ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = (FLOATRET)ASUM_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, n); - - IDEBUG_END; - - return ret; -} - -#else - -FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ - - FLOAT ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = ASUM_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, n); - - IDEBUG_END; - - return ret; -} - -#endif diff --git a/interface/axpy.c b/interface/axpy.c deleted file mode 100644 index 82b0ee234..000000000 --- a/interface/axpy.c +++ /dev/null @@ -1,121 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - FLOAT alpha = *ALPHA; - -#else - -void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - -#endif - -#ifdef SMP - int mode, nthreads; -#endif - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (n <= 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - -#ifdef SMP - nthreads = num_cpu_avail(1); - - //disable multi-thread when incx==0 or incy==0 - //In that case, the threads would be dependent. - if (incx == 0 || incy == 0) - nthreads = 1; - - //Temporarily walk around the low performance issue with small imput size & multithreads. - if (n <= 10000) - nthreads = 1; - - if (nthreads == 1) { -#endif - - AXPYU_K(n, 0, 0, alpha, x, incx, y, incy, NULL, 0); - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_REAL; -#else - mode = BLAS_SINGLE | BLAS_REAL; -#endif - - blas_level1_thread(mode, n, 0, 0, &alpha, - x, incx, y, incy, NULL, 0, (void *)AXPYU_K, nthreads); - - } -#endif - - FUNCTION_PROFILE_END(1, 2 * n, 2 * n); - - IDEBUG_END; - - return; - -} diff --git a/interface/copy.c b/interface/copy.c deleted file mode 100644 index 6965682ec..000000000 --- a/interface/copy.c +++ /dev/null @@ -1,80 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - - PRINT_DEBUG_NAME; - -#else - -void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - - PRINT_DEBUG_CNAME; - -#endif - - if (n <= 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx * COMPSIZE; - if (incy < 0) y -= (n - 1) * incy * COMPSIZE; - - COPY_K(n, x, incx, y, incy); - - FUNCTION_PROFILE_END(COMPSIZE, COMPSIZE * n, 0); - - IDEBUG_END; - - return; - -} diff --git a/interface/dot.c b/interface/dot.c deleted file mode 100644 index 3744db5ea..000000000 --- a/interface/dot.c +++ /dev/null @@ -1,101 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - FLOATRET ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0.; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret = (FLOATRET)DOTU_K(n, x, incx, y, incy); - - FUNCTION_PROFILE_END(1, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; -} - -#else - -FLOAT CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - - FLOAT ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0.; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret = DOTU_K(n, x, incx, y, incy); - - FUNCTION_PROFILE_END(1, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; - -} - -#endif diff --git a/interface/dsdot.c b/interface/dsdot.c deleted file mode 100644 index 94237e0c4..000000000 --- a/interface/dsdot.c +++ /dev/null @@ -1,102 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -double NAME(blasint *N, float *x, blasint *INCX, float *y, blasint *INCY){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - double ret = 0.0; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret=DSDOT_K(n, x, incx, y, incy); - - FUNCTION_PROFILE_END(1, n, n); - - IDEBUG_END; - - return ret; - -} - -#else - -double CNAME(blasint n, float *x, blasint incx, float *y, blasint incy){ - - double ret = 0.0; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret=DSDOT_K(n, x, incx, y, incy); - - FUNCTION_PROFILE_END(1, n, n); - - IDEBUG_END; - - return ret; - -} - -#endif diff --git a/interface/gbmv.c b/interface/gbmv.c deleted file mode 100644 index a76c48d04..000000000 --- a/interface/gbmv.c +++ /dev/null @@ -1,252 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DGBMV " -#else -#define ERROR_NAME "SGBMV " -#endif - -static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, - FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qgbmv_n, qgbmv_t, -#elif defined(DOUBLE) - dgbmv_n, dgbmv_t, -#else - sgbmv_n, sgbmv_t, -#endif -}; - -#ifdef SMP -static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, - FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qgbmv_thread_n, qgbmv_thread_t, -#elif defined(DOUBLE) - dgbmv_thread_n, dgbmv_thread_t, -#else - sgbmv_thread_n, sgbmv_thread_t, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *TRANS, blasint *M, blasint *N, - blasint *KU, blasint *KL, - FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, - FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char trans = *TRANS; - blasint m = *M; - blasint n = *N; - blasint ku = *KU; - blasint kl = *KL; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - FLOAT alpha = *ALPHA; - FLOAT beta = *BETA; - - blasint info; - blasint lenx, leny; - blasint i; - - PRINT_DEBUG_NAME; - - TOUPPER(trans); - - info = 0; - - i = -1; - - if (trans == 'N') i = 0; - if (trans == 'T') i = 1; - if (trans == 'R') i = 0; - if (trans == 'C') i = 1; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (i < 0) info = 1; - - trans = i; - - if (info != 0){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_TRANSPOSE TransA, - blasint m, blasint n, - blasint ku, blasint kl, - FLOAT alpha, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT beta, - FLOAT *y, blasint incy){ - - FLOAT *buffer; - blasint lenx, leny, info, t; - int trans; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - info = -1; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - info = -1; - - t = n; - n = m; - m = t; - - t = ku; - ku = kl; - kl = t; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if ((m==0) || (n==0)) return; - - lenx = n; - leny = m; - if (trans) lenx = m; - if (trans) leny = n; - - if (beta != ONE) SCAL_K(leny, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (lenx-1)*incx; - if (incy < 0) y -= (leny-1)*incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (gbmv[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (gbmv_thread[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, m * n / 2 + n, m * n); - - IDEBUG_END; - - return; -} diff --git a/interface/gemm.c b/interface/gemm.c deleted file mode 100644 index 587175ec7..000000000 --- a/interface/gemm.c +++ /dev/null @@ -1,461 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QGEMM " -#elif defined(DOUBLE) -#define ERROR_NAME "DGEMM " -#else -#define ERROR_NAME "SGEMM " -#endif -#else -#ifndef GEMM3M -#ifdef XDOUBLE -#define ERROR_NAME "XGEMM " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGEMM " -#else -#define ERROR_NAME "CGEMM " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XGEMM3M " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGEMM3M " -#else -#define ERROR_NAME "CGEMM3M " -#endif -#endif -#endif - -#ifndef GEMM_MULTITHREAD_THRESHOLD -# define GEMM_MULTITHREAD_THRESHOLD 4 -#endif - -static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifndef GEMM3M - GEMM_NN, GEMM_TN, GEMM_RN, GEMM_CN, - GEMM_NT, GEMM_TT, GEMM_RT, GEMM_CT, - GEMM_NR, GEMM_TR, GEMM_RR, GEMM_CR, - GEMM_NC, GEMM_TC, GEMM_RC, GEMM_CC, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - GEMM_THREAD_NN, GEMM_THREAD_TN, GEMM_THREAD_RN, GEMM_THREAD_CN, - GEMM_THREAD_NT, GEMM_THREAD_TT, GEMM_THREAD_RT, GEMM_THREAD_CT, - GEMM_THREAD_NR, GEMM_THREAD_TR, GEMM_THREAD_RR, GEMM_THREAD_CR, - GEMM_THREAD_NC, GEMM_THREAD_TC, GEMM_THREAD_RC, GEMM_THREAD_CC, -#endif -#else - GEMM3M_NN, GEMM3M_TN, GEMM3M_RN, GEMM3M_CN, - GEMM3M_NT, GEMM3M_TT, GEMM3M_RT, GEMM3M_CT, - GEMM3M_NR, GEMM3M_TR, GEMM3M_RR, GEMM3M_CR, - GEMM3M_NC, GEMM3M_TC, GEMM3M_RC, GEMM3M_CC, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - GEMM3M_THREAD_NN, GEMM3M_THREAD_TN, GEMM3M_THREAD_RN, GEMM3M_THREAD_CN, - GEMM3M_THREAD_NT, GEMM3M_THREAD_TT, GEMM3M_THREAD_RT, GEMM3M_THREAD_CT, - GEMM3M_THREAD_NR, GEMM3M_THREAD_TR, GEMM3M_THREAD_RR, GEMM3M_THREAD_CR, - GEMM3M_THREAD_NC, GEMM3M_THREAD_TC, GEMM3M_THREAD_RC, GEMM3M_THREAD_CC, -#endif -#endif -}; - -#ifndef CBLAS - -void NAME(char *TRANSA, char *TRANSB, - blasint *M, blasint *N, blasint *K, - FLOAT *alpha, - FLOAT *a, blasint *ldA, - FLOAT *b, blasint *ldB, - FLOAT *beta, - FLOAT *c, blasint *ldC){ - - blas_arg_t args; - - int transa, transb, nrowa, nrowb; - blasint info; - - char transA, transB; - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - -#if defined(SMP) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) - int nodes; -#endif - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - args.k = *K; - - args.a = (void *)a; - args.b = (void *)b; - args.c = (void *)c; - - args.lda = *ldA; - args.ldb = *ldB; - args.ldc = *ldC; - - args.alpha = (void *)alpha; - args.beta = (void *)beta; - - transA = *TRANSA; - transB = *TRANSB; - - TOUPPER(transA); - TOUPPER(transB); - - transa = -1; - transb = -1; - - if (transA == 'N') transa = 0; - if (transA == 'T') transa = 1; -#ifndef COMPLEX - if (transA == 'R') transa = 0; - if (transA == 'C') transa = 1; -#else - if (transA == 'R') transa = 2; - if (transA == 'C') transa = 3; -#endif - - if (transB == 'N') transb = 0; - if (transB == 'T') transb = 1; -#ifndef COMPLEX - if (transB == 'R') transb = 0; - if (transB == 'C') transb = 1; -#else - if (transB == 'R') transb = 2; - if (transB == 'C') transb = 3; -#endif - - nrowa = args.m; - if (transa & 1) nrowa = args.k; - nrowb = args.k; - if (transb & 1) nrowb = args.n; - - info = 0; - - if (args.ldc < args.m) info = 13; - if (args.ldb < nrowb) info = 10; - if (args.lda < nrowa) info = 8; - if (args.k < 0) info = 5; - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (transb < 0) info = 2; - if (transa < 0) info = 1; - - if (info){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, - blasint m, blasint n, blasint k, -#ifndef COMPLEX - FLOAT alpha, -#else - FLOAT *alpha, -#endif - FLOAT *a, blasint lda, - FLOAT *b, blasint ldb, -#ifndef COMPLEX - FLOAT beta, -#else - FLOAT *beta, -#endif - FLOAT *c, blasint ldc) { - - blas_arg_t args; - int transa, transb; - blasint nrowa, nrowb, info; - - XFLOAT *buffer; - XFLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - -#if defined(SMP) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) - int nodes; -#endif - - PRINT_DEBUG_CNAME; - -#ifndef COMPLEX - args.alpha = (void *)α - args.beta = (void *)β -#else - args.alpha = (void *)alpha; - args.beta = (void *)beta; -#endif - - transa = -1; - transb = -1; - info = 0; - - if (order == CblasColMajor) { - args.m = m; - args.n = n; - args.k = k; - - args.a = (void *)a; - args.b = (void *)b; - args.c = (void *)c; - - args.lda = lda; - args.ldb = ldb; - args.ldc = ldc; - - if (TransA == CblasNoTrans) transa = 0; - if (TransA == CblasTrans) transa = 1; -#ifndef COMPLEX - if (TransA == CblasConjNoTrans) transa = 0; - if (TransA == CblasConjTrans) transa = 1; -#else - if (TransA == CblasConjNoTrans) transa = 2; - if (TransA == CblasConjTrans) transa = 3; -#endif - if (TransB == CblasNoTrans) transb = 0; - if (TransB == CblasTrans) transb = 1; -#ifndef COMPLEX - if (TransB == CblasConjNoTrans) transb = 0; - if (TransB == CblasConjTrans) transb = 1; -#else - if (TransB == CblasConjNoTrans) transb = 2; - if (TransB == CblasConjTrans) transb = 3; -#endif - - nrowa = args.m; - if (transa & 1) nrowa = args.k; - nrowb = args.k; - if (transb & 1) nrowb = args.n; - - info = -1; - - if (args.ldc < args.m) info = 13; - if (args.ldb < nrowb) info = 10; - if (args.lda < nrowa) info = 8; - if (args.k < 0) info = 5; - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (transb < 0) info = 2; - if (transa < 0) info = 1; - } - - if (order == CblasRowMajor) { - args.m = n; - args.n = m; - args.k = k; - - args.a = (void *)b; - args.b = (void *)a; - args.c = (void *)c; - - args.lda = ldb; - args.ldb = lda; - args.ldc = ldc; - - if (TransB == CblasNoTrans) transa = 0; - if (TransB == CblasTrans) transa = 1; -#ifndef COMPLEX - if (TransB == CblasConjNoTrans) transa = 0; - if (TransB == CblasConjTrans) transa = 1; -#else - if (TransB == CblasConjNoTrans) transa = 2; - if (TransB == CblasConjTrans) transa = 3; -#endif - if (TransA == CblasNoTrans) transb = 0; - if (TransA == CblasTrans) transb = 1; -#ifndef COMPLEX - if (TransA == CblasConjNoTrans) transb = 0; - if (TransA == CblasConjTrans) transb = 1; -#else - if (TransA == CblasConjNoTrans) transb = 2; - if (TransA == CblasConjTrans) transb = 3; -#endif - - nrowa = args.m; - if (transa & 1) nrowa = args.k; - nrowb = args.k; - if (transb & 1) nrowb = args.n; - - info = -1; - - if (args.ldc < args.m) info = 13; - if (args.ldb < nrowb) info = 10; - if (args.lda < nrowa) info = 8; - if (args.k < 0) info = 5; - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (transb < 0) info = 2; - if (transa < 0) info = 1; - - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if ((args.m == 0) || (args.n == 0)) return; - -#if 0 - fprintf(stderr, "m = %4d n = %d k = %d lda = %4d ldb = %4d ldc = %4d\n", - args.m, args.n, args.k, args.lda, args.ldb, args.ldc); -#endif - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - buffer = (XFLOAT *)blas_memory_alloc(0); - - sa = (XFLOAT *)((BLASLONG)buffer +GEMM_OFFSET_A); - sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); - -#ifdef SMP - mode |= (transa << BLAS_TRANSA_SHIFT); - mode |= (transb << BLAS_TRANSB_SHIFT); - - args.common = NULL; - - if(args.m <= GEMM_MULTITHREAD_THRESHOLD || args.n <= GEMM_MULTITHREAD_THRESHOLD - || args.k <=GEMM_MULTITHREAD_THRESHOLD){ - args.nthreads = 1; - }else{ - args.nthreads = num_cpu_avail(3); - } - if (args.nthreads == 1) { -#endif - - (gemm[(transb << 2) | transa])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - - } else { - -#ifndef USE_SIMPLE_THREADED_LEVEL3 - -#ifndef NO_AFFINITY - nodes = get_num_nodes(); - - if ((nodes > 1) && get_node_equal()) { - - args.nthreads /= nodes; - - gemm_thread_mn(mode, &args, NULL, NULL, gemm[16 | (transb << 2) | transa], sa, sb, nodes); - - } else { -#endif - - (gemm[16 | (transb << 2) | transa])(&args, NULL, NULL, sa, sb, 0); - -#else - - GEMM_THREAD(mode, &args, NULL, NULL, gemm[(transb << 2) | transa], sa, sb, args.nthreads); - -#endif - -#ifndef USE_SIMPLE_THREADED_LEVEL3 -#ifndef NO_AFFINITY - } -#endif -#endif - -#endif - -#ifdef SMP - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.k + args.k * args.n + args.m * args.n, 2 * args.m * args.n * args.k); - - IDEBUG_END; - - return; -} diff --git a/interface/gemv.c b/interface/gemv.c deleted file mode 100644 index 9ea8aa895..000000000 --- a/interface/gemv.c +++ /dev/null @@ -1,237 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGEMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DGEMV " -#else -#define ERROR_NAME "SGEMV " -#endif - -#ifdef SMP -static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qgemv_thread_n, qgemv_thread_t, -#elif defined DOUBLE - dgemv_thread_n, dgemv_thread_t, -#else - sgemv_thread_n, sgemv_thread_t, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *TRANS, blasint *M, blasint *N, - FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, - FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char trans = *TRANS; - blasint m = *M; - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - FLOAT alpha = *ALPHA; - FLOAT beta = *BETA; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - GEMV_N, GEMV_T, - }; - - blasint info; - blasint lenx, leny; - blasint i; - - PRINT_DEBUG_NAME; - - TOUPPER(trans); - - info = 0; - - i = -1; - - if (trans == 'N') i = 0; - if (trans == 'T') i = 1; - if (trans == 'R') i = 0; - if (trans == 'C') i = 1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1, m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (i < 0) info = 1; - - trans = i; - - if (info != 0){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_TRANSPOSE TransA, - blasint m, blasint n, - FLOAT alpha, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT beta, - FLOAT *y, blasint incy){ - - FLOAT *buffer; - blasint lenx, leny; - int trans; - blasint info, t; -#ifdef SMP - int nthreads; -#endif - - int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - GEMV_N, GEMV_T, - }; - - PRINT_DEBUG_CNAME; - - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1, m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - - } - - if (order == CblasRowMajor) { - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - info = -1; - - t = n; - n = m; - m = t; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1, m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if ((m==0) || (n==0)) return; - - lenx = n; - leny = m; - if (trans) lenx = m; - if (trans) leny = n; - - if (beta != ONE) SCAL_K(leny, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (lenx - 1) * incx; - if (incy < 0) y -= (leny - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (gemv[(int)trans])(m, n, 0, alpha, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (gemv_thread[(int)trans])(m, n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, m * n + m + n, 2 * m * n); - - IDEBUG_END; - - return; - -} diff --git a/interface/ger.c b/interface/ger.c deleted file mode 100644 index 0218d94dd..000000000 --- a/interface/ger.c +++ /dev/null @@ -1,193 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGER " -#elif defined DOUBLE -#define ERROR_NAME "DGER " -#else -#define ERROR_NAME "SGER " -#endif - -#define GER GERU_K - -#if defined XDOUBLE -#define GER_THREAD qger_thread -#elif defined DOUBLE -#define GER_THREAD dger_thread -#else -#define GER_THREAD sger_thread -#endif - - -#ifndef CBLAS - -void NAME(blasint *M, blasint *N, FLOAT *Alpha, - FLOAT *x, blasint *INCX, - FLOAT *y, blasint *INCY, - FLOAT *a, blasint *LDA){ - - blasint m = *M; - blasint n = *N; - FLOAT alpha = *Alpha; - blasint incx = *INCX; - blasint incy = *INCY; - blasint lda = *LDA; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - blasint info; - - PRINT_DEBUG_NAME; - - info = 0; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - - if (info){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - blasint m, blasint n, - FLOAT alpha, - FLOAT *x, blasint incx, - FLOAT *y, blasint incy, - FLOAT *a, blasint lda) { - - FLOAT *buffer; - blasint info, t; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - info = 0; - - if (order == CblasColMajor) { - info = -1; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - } - - if (order == CblasRowMajor) { - info = -1; - - t = n; - n = m; - m = t; - - t = incx; - incx = incy; - incy = t; - - buffer = x; - x = y; - y = buffer; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - /* Quick return if possible. */ - if (m == 0 || n == 0) return; - if (alpha == 0.) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incy < 0) y -= (n - 1) * incy; - if (incx < 0) x -= (m - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - GER(m, n, 0, alpha, x, incx, y, incy, a, lda, buffer); - -#ifdef SMP - } else { - - GER_THREAD(m, n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, m * n + m + n, 2 * m * n); - - IDEBUG_END; - - return; -} diff --git a/interface/gesv.c b/interface/gesv.c deleted file mode 100644 index ce6bcbd0b..000000000 --- a/interface/gesv.c +++ /dev/null @@ -1,154 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QGESV " -#elif defined(DOUBLE) -#define ERROR_NAME "DGESV " -#else -#define ERROR_NAME "SGESV " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XGESV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGESV " -#else -#define ERROR_NAME "CGESV " -#endif -#endif - -int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv, - FLOAT *b, blasint *ldB, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *N; - args.n = *NRHS; - args.a = (void *)a; - args.lda = *ldA; - args.b = (void *)b; - args.ldb = *ldB; - args.c = (void *)ipiv; - - info = 0; - if (args.ldb < MAX(1,args.m)) info = 7; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - args.alpha = NULL; - args.beta = NULL; - - *Info = 0; - - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - args.n = *N; - info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); - - if (info == 0){ - args.n = *NRHS; - GETRS_N_SINGLE(&args, NULL, NULL, sa, sb, 0); - } - -#ifdef SMP - } else { - - args.n = *N; - info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); - - if (info == 0){ - args.n = *NRHS; - GETRS_N_PARALLEL(&args, NULL, NULL, sa, sb, 0); - } - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - *Info = info; - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, *N * *N, 2. / 3. * *N * *N * *N + *N * *N); - - IDEBUG_END; - - return 0; -} diff --git a/interface/getf2.c b/interface/getf2.c deleted file mode 100644 index cae15953b..000000000 --- a/interface/getf2.c +++ /dev/null @@ -1,109 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGETF2" -#elif defined(DOUBLE) -#define ERROR_NAME "DGETF2" -#else -#define ERROR_NAME "SGETF2" -#endif - -int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - args.c = (void *)ipiv; - - info = 0; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = GETF2(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/getrf.c b/interface/getrf.c deleted file mode 100644 index aa799e8d3..000000000 --- a/interface/getrf.c +++ /dev/null @@ -1,121 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGETRF" -#elif defined(DOUBLE) -#define ERROR_NAME "DGETRF" -#else -#define ERROR_NAME "SGETRF" -#endif - -int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - args.c = (void *)ipiv; - - info = 0; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/getrs.c b/interface/getrs.c deleted file mode 100644 index 761a00160..000000000 --- a/interface/getrs.c +++ /dev/null @@ -1,152 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QGETRS" -#elif defined(DOUBLE) -#define ERROR_NAME "DGETRS" -#else -#define ERROR_NAME "SGETRS" -#endif - -static blasint (*getrs_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - GETRS_N_SINGLE, GETRS_T_SINGLE, -}; - -#ifdef SMP -static blasint (*getrs_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - GETRS_N_PARALLEL, GETRS_T_PARALLEL, -}; -#endif - -int NAME(char *TRANS, blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, - blasint *ipiv, FLOAT *b, blasint *ldB, blasint *Info){ - - char trans_arg = *TRANS; - - blas_arg_t args; - - blasint info; - int trans; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *N; - args.n = *NRHS; - args.a = (void *)a; - args.lda = *ldA; - args.b = (void *)b; - args.ldb = *ldB; - args.c = (void *)ipiv; - - info = 0; - - TOUPPER(trans_arg); - trans = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (args.ldb < MAX(1, args.m)) info = 8; - if (args.lda < MAX(1, args.m)) info = 5; - if (args.n < 0) info = 3; - if (args.m < 0) info = 2; - if (trans < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return 0; - } - - args.alpha = NULL; - args.beta = NULL; - - *Info = info; - - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - (getrs_single[trans])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - (getrs_parallel[trans])(&args, NULL, NULL, sa, sb, 0); - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2 * args.m * args.m * args.n); - - IDEBUG_END; - - return 0; - -} diff --git a/interface/imax.c b/interface/imax.c deleted file mode 100644 index 37396c7f8..000000000 --- a/interface/imax.c +++ /dev/null @@ -1,171 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#undef MAX_K - -#ifdef USE_ABS - -#ifndef USE_MIN - -/* ABS & MAX */ -#ifndef COMPLEX -#ifdef XDOUBLE -#define MAX_K IQAMAX_K -#elif defined(DOUBLE) -#define MAX_K IDAMAX_K -#else -#define MAX_K ISAMAX_K -#endif -#else -#ifdef XDOUBLE -#define MAX_K IXAMAX_K -#elif defined(DOUBLE) -#define MAX_K IZAMAX_K -#else -#define MAX_K ICAMAX_K -#endif -#endif - -#else - -/* ABS & MIN */ -#ifndef COMPLEX -#ifdef XDOUBLE -#define MAX_K IQAMIN_K -#elif defined(DOUBLE) -#define MAX_K IDAMIN_K -#else -#define MAX_K ISAMIN_K -#endif -#else -#ifdef XDOUBLE -#define MAX_K IXAMIN_K -#elif defined(DOUBLE) -#define MAX_K IZAMIN_K -#else -#define MAX_K ICAMIN_K -#endif -#endif - -#endif - -#else - -#ifndef USE_MIN - -/* MAX */ -#ifdef XDOUBLE -#define MAX_K IQMAX_K -#elif defined(DOUBLE) -#define MAX_K IDMAX_K -#else -#define MAX_K ISMAX_K -#endif - -#else - -/* MIN */ -#ifdef XDOUBLE -#define MAX_K IQMIN_K -#elif defined(DOUBLE) -#define MAX_K IDMIN_K -#else -#define MAX_K ISMIN_K -#endif - -#endif - -#endif - -#ifndef CBLAS - -blasint NAME(blasint *N, FLOAT *x, blasint *INCX){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - blasint ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = (blasint)MAX_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, 0); - - IDEBUG_END; - - return ret; -} - -#else - -CBLAS_INDEX CNAME(blasint n, FLOAT *x, blasint incx){ - - CBLAS_INDEX ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = MAX_K(n, x, incx); - - if (ret) ret --; - - FUNCTION_PROFILE_END(COMPSIZE, n, 0); - - IDEBUG_END; - - return ret; -} - -#endif diff --git a/interface/larf.c b/interface/larf.c deleted file mode 100644 index 3b538c4a2..000000000 --- a/interface/larf.c +++ /dev/null @@ -1,109 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -static int (*larf[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LARF_L, LARF_R, -}; - -int NAME(char *SIDE, blasint *M, blasint *N, FLOAT *v, blasint *incV, FLOAT *tau, FLOAT *c, blasint *ldC, FLOAT *work){ - - blas_arg_t args; - - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - char side_arg = *SIDE; - int side; - - PRINT_DEBUG_NAME; - - TOUPPER(side_arg); - - args.m = *M; - args.n = *N; - args.a = (void *)v; - args.lda = *incV; - args.c = (void *)c; - args.ldc = *ldC; - - args.alpha = (void *)tau; - - side = -1; - if (side_arg == 'L') side = 0; - if (side_arg == 'R') side = 1; - - if (args.m == 0 || args.n == 0) return 0; - -#ifndef COMPLEX - if (*tau == ZERO) return 0; -#else - if ((*(tau + 0) == ZERO) && (*(tau + 1) == ZERO)) return 0; -#endif - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - larf[side](&args, NULL, NULL, sa, sb, 0); - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/laswp.c b/interface/laswp.c deleted file mode 100644 index 026b5156f..000000000 --- a/interface/laswp.c +++ /dev/null @@ -1,110 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -static int (*laswp[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, blasint *, BLASLONG) = { -#ifdef XDOUBLE - qlaswp_plus, qlaswp_minus, -#elif defined(DOUBLE) - dlaswp_plus, dlaswp_minus, -#else - slaswp_plus, slaswp_minus, -#endif -}; - -int NAME(blasint *N, FLOAT *a, blasint *LDA, blasint *K1, blasint *K2, blasint *ipiv, blasint *INCX){ - - blasint n = *N; - blasint lda = *LDA; - blasint k1 = *K1; - blasint k2 = *K2; - blasint incx = *INCX; - int flag; - -#ifdef SMP - int mode, nthreads; - FLOAT dummyalpha[2] = {ZERO, ZERO}; -#endif - - PRINT_DEBUG_NAME; - - if (incx == 0 || n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - flag = (incx < 0); - -#ifdef SMP - nthreads = num_cpu_avail(1); - - if (nthreads == 1) { -#endif - - (laswp[flag])(n, k1, k2, ZERO, a, lda, NULL, 0, ipiv, incx); - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_REAL; -#else - mode = BLAS_SINGLE | BLAS_REAL; -#endif - - blas_level1_thread(mode, n, k1, k2, dummyalpha, - a, lda, NULL, 0, ipiv, incx, - laswp[flag], nthreads); - } -#endif - - FUNCTION_PROFILE_END(COMPSIZE, n * (k2 - k1), 0); - - IDEBUG_END; - - return 0; - -} diff --git a/interface/lauu2.c b/interface/lauu2.c deleted file mode 100644 index 14417e986..000000000 --- a/interface/lauu2.c +++ /dev/null @@ -1,128 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QLAUU2" -#elif defined(DOUBLE) -#define ERROR_NAME "DLAUU2" -#else -#define ERROR_NAME "SLAUU2" -#endif - -static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifdef XDOUBLE - qlauu2_U, qlauu2_L, -#elif defined(DOUBLE) - dlauu2_U, dlauu2_L, -#else - slauu2_U, slauu2_L, -#endif - }; - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/lauum.c b/interface/lauum.c deleted file mode 100644 index e5b593f30..000000000 --- a/interface/lauum.c +++ /dev/null @@ -1,139 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QLAUUM" -#elif defined(DOUBLE) -#define ERROR_NAME "DLAUUM" -#else -#define ERROR_NAME "SLAUUM" -#endif - -static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_SINGLE, LAUUM_L_SINGLE, -}; - -#ifdef SMP -static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/max.c b/interface/max.c deleted file mode 100644 index 9bedaddd0..000000000 --- a/interface/max.c +++ /dev/null @@ -1,169 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#undef MAX_K - -#ifdef USE_ABS - -#ifndef USE_MIN - -/* ABS & MAX */ -#ifndef COMPLEX -#ifdef XDOUBLE -#define MAX_K QAMAX_K -#elif defined(DOUBLE) -#define MAX_K DAMAX_K -#else -#define MAX_K SAMAX_K -#endif -#else -#ifdef XDOUBLE -#define MAX_K XAMAX_K -#elif defined(DOUBLE) -#define MAX_K ZAMAX_K -#else -#define MAX_K CAMAX_K -#endif -#endif - -#else - -/* ABS & MIN */ -#ifndef COMPLEX -#ifdef XDOUBLE -#define MAX_K QAMIN_K -#elif defined(DOUBLE) -#define MAX_K DAMIN_K -#else -#define MAX_K SAMIN_K -#endif -#else -#ifdef XDOUBLE -#define MAX_K XAMIN_K -#elif defined(DOUBLE) -#define MAX_K ZAMIN_K -#else -#define MAX_K CAMIN_K -#endif -#endif - -#endif - -#else - -#ifndef USE_MIN - -/* MAX */ -#ifdef XDOUBLE -#define MAX_K QMAX_K -#elif defined(DOUBLE) -#define MAX_K DMAX_K -#else -#define MAX_K SMAX_K -#endif - -#else - -/* MIN */ -#ifdef XDOUBLE -#define MAX_K QMIN_K -#elif defined(DOUBLE) -#define MAX_K DMIN_K -#else -#define MAX_K SMIN_K -#endif - -#endif - -#endif - -#ifndef CBLAS - -FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - FLOATRET ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = (FLOATRET)MAX_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, 0); - - IDEBUG_END; - - return ret; -} - -#else - -FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ - - FLOAT ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = MAX_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, 0); - - IDEBUG_END; - - return ret; -} - -#endif diff --git a/interface/nrm2.c b/interface/nrm2.c deleted file mode 100644 index ff8ef6d0d..000000000 --- a/interface/nrm2.c +++ /dev/null @@ -1,93 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - FLOATRET ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return 0.; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = (FLOATRET)NRM2_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, 2 * n); - - IDEBUG_END; - - return ret; -} - -#else - -FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ - - FLOAT ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return 0.; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - ret = NRM2_K(n, x, incx); - - FUNCTION_PROFILE_END(COMPSIZE, n, 2 * n); - - IDEBUG_END; - - return ret; -} - -#endif diff --git a/interface/potf2.c b/interface/potf2.c deleted file mode 100644 index 76822a49c..000000000 --- a/interface/potf2.c +++ /dev/null @@ -1,128 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QPOTF2" -#elif defined(DOUBLE) -#define ERROR_NAME "DPOTF2" -#else -#define ERROR_NAME "SPOTF2" -#endif - -static blasint (*potf2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifdef XDOUBLE - qpotf2_U, qpotf2_L, -#elif defined(DOUBLE) - dpotf2_U, dpotf2_L, -#else - spotf2_U, spotf2_L, -#endif - }; - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (potf2[uplo])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/potrf.c b/interface/potrf.c deleted file mode 100644 index 9a15012d3..000000000 --- a/interface/potrf.c +++ /dev/null @@ -1,139 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QPOTRF" -#elif defined(DOUBLE) -#define ERROR_NAME "DPOTRF" -#else -#define ERROR_NAME "SPOTRF" -#endif - -static blasint (*potrf_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - POTRF_U_SINGLE, POTRF_L_SINGLE, -}; - -#ifdef SMP -static blasint (*potrf_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - POTRF_U_PARALLEL, POTRF_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (potrf_single[uplo])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - *Info = (potrf_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/potri.c b/interface/potri.c deleted file mode 100644 index a4f33221a..000000000 --- a/interface/potri.c +++ /dev/null @@ -1,160 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QPOTRI" -#elif defined(DOUBLE) -#define ERROR_NAME "DPOTRI" -#else -#define ERROR_NAME "SPOTRI" -#endif - -static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UN_SINGLE, TRTRI_LN_SINGLE, -}; - -static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - LAUUM_U_SINGLE, LAUUM_L_SINGLE, -}; - -#ifdef SMP -static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UN_PARALLEL, TRTRI_LN_PARALLEL, -}; - -static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - info = (trtri_single[uplo])(&args, NULL, NULL, sa, sb, 0); - - if (!info) { - info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); - } - - *Info = info; - -#ifdef SMP - } else { - info = (trtri_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - - if (!info) { - info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - } - - *Info = info; - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); - - IDEBUG_END; - - return 0; -} diff --git a/interface/rot.c b/interface/rot.c deleted file mode 100644 index 2e458b12d..000000000 --- a/interface/rot.c +++ /dev/null @@ -1,82 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *C, FLOAT *S){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - FLOAT c = *C; - FLOAT s = *S; - - PRINT_DEBUG_NAME; - -#else - -void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT c, FLOAT s){ - - PRINT_DEBUG_CNAME; - -#endif - - if (n <= 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ROT_K(n, x, incx, y, incy, c, s); - - FUNCTION_PROFILE_END(1, n, n); - - IDEBUG_END; - - return; - -} diff --git a/interface/rotg.c b/interface/rotg.c deleted file mode 100644 index 49088ab02..000000000 --- a/interface/rotg.c +++ /dev/null @@ -1,109 +0,0 @@ -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ - -#else - -void CNAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ - -#endif - - -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) - - long double da = *DA; - long double db = *DB; - long double c; - long double s; - long double r, roe, z; - - long double ada = fabs(da); - long double adb = fabs(db); - long double scale = ada + adb; - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - roe = db; - if (ada > adb) roe = da; - - if (scale == ZERO) { - *C = ONE; - *S = ZERO; - *DA = ZERO; - *DB = ZERO; - } else { - r = sqrt(da * da + db * db); - if (roe < 0) r = -r; - c = da / r; - s = db / r; - z = ONE; - if (da != ZERO) { - if (ada > adb){ - z = s; - } else { - z = ONE / c; - } - } - - *C = c; - *S = s; - *DA = r; - *DB = z; - } - -#else - FLOAT da = *DA; - FLOAT db = *DB; - FLOAT c = *C; - FLOAT s = *S; - FLOAT r, roe, z; - - FLOAT ada = fabs(da); - FLOAT adb = fabs(db); - FLOAT scale = ada + adb; - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - roe = db; - if (ada > adb) roe = da; - - if (scale == ZERO) { - *C = ONE; - *S = ZERO; - *DA = ZERO; - *DB = ZERO; - } else { - FLOAT aa = da / scale; - FLOAT bb = db / scale; - - r = scale * sqrt(aa * aa + bb * bb); - if (roe < 0) r = -r; - c = da / r; - s = db / r; - z = ONE; - if (ada > adb) z = s; - if ((ada < adb) && (c != ZERO)) z = ONE / c; - - *C = c; - *S = s; - *DA = r; - *DB = z; - } -#endif - - return; -} diff --git a/interface/rotm.c b/interface/rotm.c deleted file mode 100644 index 4f026c75d..000000000 --- a/interface/rotm.c +++ /dev/null @@ -1,155 +0,0 @@ -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *dx, blasint *INCX, FLOAT *dy, blasint *INCY, FLOAT *dparam){ - - blasint n = *N; - blasint incx = *INCX; - blasint incy = *INCY; - -#else - -void CNAME(blasint n, FLOAT *dx, blasint incx, FLOAT *dy, blasint incy, FLOAT *dparam){ - -#endif - - blasint i__1, i__2; - - blasint i__; - FLOAT w, z__; - blasint kx, ky; - FLOAT dh11, dh12, dh22, dh21, dflag; - blasint nsteps; - -#ifndef CBLAS - PRINT_DEBUG_CNAME; -#else - PRINT_DEBUG_CNAME; -#endif - - --dparam; - --dy; - --dx; - - dflag = dparam[1]; - if (n <= 0 || dflag == - 2.0) goto L140; - - if (! (incx == incy && incx > 0)) goto L70; - - nsteps = n * incx; - if (dflag < 0.) { - goto L50; - } else if (dflag == 0) { - goto L10; - } else { - goto L30; - } -L10: - dh12 = dparam[4]; - dh21 = dparam[3]; - i__1 = nsteps; - i__2 = incx; - for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { - w = dx[i__]; - z__ = dy[i__]; - dx[i__] = w + z__ * dh12; - dy[i__] = w * dh21 + z__; -/* L20: */ - } - goto L140; -L30: - dh11 = dparam[2]; - dh22 = dparam[5]; - i__2 = nsteps; - i__1 = incx; - for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) { - w = dx[i__]; - z__ = dy[i__]; - dx[i__] = w * dh11 + z__; - dy[i__] = -w + dh22 * z__; -/* L40: */ - } - goto L140; -L50: - dh11 = dparam[2]; - dh12 = dparam[4]; - dh21 = dparam[3]; - dh22 = dparam[5]; - i__1 = nsteps; - i__2 = incx; - for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { - w = dx[i__]; - z__ = dy[i__]; - dx[i__] = w * dh11 + z__ * dh12; - dy[i__] = w * dh21 + z__ * dh22; -/* L60: */ - } - goto L140; -L70: - kx = 1; - ky = 1; - if (incx < 0) { - kx = (1 - n) * incx + 1; - } - if (incy < 0) { - ky = (1 - n) * incy + 1; - } - - if (dflag < 0.) { - goto L120; - } else if (dflag == 0) { - goto L80; - } else { - goto L100; - } -L80: - dh12 = dparam[4]; - dh21 = dparam[3]; - i__2 = n; - for (i__ = 1; i__ <= i__2; ++i__) { - w = dx[kx]; - z__ = dy[ky]; - dx[kx] = w + z__ * dh12; - dy[ky] = w * dh21 + z__; - kx += incx; - ky += incy; -/* L90: */ - } - goto L140; -L100: - dh11 = dparam[2]; - dh22 = dparam[5]; - i__2 = n; - for (i__ = 1; i__ <= i__2; ++i__) { - w = dx[kx]; - z__ = dy[ky]; - dx[kx] = w * dh11 + z__; - dy[ky] = -w + dh22 * z__; - kx += incx; - ky += incy; -/* L110: */ - } - goto L140; -L120: - dh11 = dparam[2]; - dh12 = dparam[4]; - dh21 = dparam[3]; - dh22 = dparam[5]; - i__2 = n; - for (i__ = 1; i__ <= i__2; ++i__) { - w = dx[kx]; - z__ = dy[ky]; - dx[kx] = w * dh11 + z__ * dh12; - dy[ky] = w * dh21 + z__ * dh22; - kx += incx; - ky += incy; -/* L130: */ - } -L140: - return; -} - diff --git a/interface/rotmg.c b/interface/rotmg.c deleted file mode 100644 index 4dbb580eb..000000000 --- a/interface/rotmg.c +++ /dev/null @@ -1,235 +0,0 @@ -/*************************************************************************** -Copyright (c) 2013, The OpenBLAS Project -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the -distribution. -3. Neither the name of the OpenBLAS project nor the names of -its contributors may be used to endorse or promote products -derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*****************************************************************************/ - -/************************************************************************************** -* 2014/05/02 Saar -* fixed two bugs as reported by Brendan Tracey -* Test with lapack-3.5.0 : OK -* -**************************************************************************************/ - - -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#define GAM 4096.e0 -#define GAMSQ 16777216.e0 -#define RGAMSQ 5.9604645e-8 - -#define TWO 2.e0 - -#ifdef DOUBLE -#define ABS(x) fabs(x) -#else -#define ABS(x) fabsf(x) -#endif - -#ifndef CBLAS - -void NAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT *DY1, FLOAT *dparam){ - - FLOAT dy1 = *DY1; - -#else - -void CNAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT dy1, FLOAT *dparam){ - -#endif - - FLOAT du, dp1, dp2, dq2, dq1, dh11, dh21, dh12, dh22, dflag, dtemp; - - if(*dd1 < ZERO) - { - dflag = -ONE; - dh11 = ZERO; - dh12 = ZERO; - dh21 = ZERO; - dh22 = ZERO; - - *dd1 = ZERO; - *dd2 = ZERO; - *dx1 = ZERO; - } - else - { - dp2 = *dd2 * dy1; - if(dp2 == ZERO) - { - dflag = -TWO; - dparam[0] = dflag; - return; - } - dp1 = *dd1 * *dx1; - dq2 = dp2 * dy1; - dq1 = dp1 * *dx1; - if(ABS(dq1) > ABS(dq2)) - { - dh21 = - dy1 / *dx1; - dh12 = dp2 / dp1; - - du = ONE - dh12 * dh21; - if(du > ZERO) - { - dflag = ZERO; - *dd1 = *dd1 / du; - *dd2 = *dd2 / du; - *dx1 = *dx1 * du; - - } - } - else - { - if(dq2 < ZERO) - { - dflag = -ONE; - - dh11 = ZERO; - dh12 = ZERO; - dh21 = ZERO; - dh22 = ZERO; - - *dd1 = ZERO; - *dd2 = ZERO; - *dx1 = ZERO; - } - else - { - dflag = ONE; - - dh11 = dp1 / dp2; - dh22 = *dx1 / dy1; - du = ONE + dh11 * dh22; - dtemp = *dd2 / du; - - *dd2 = *dd1 / du; - *dd1 = dtemp; - *dx1 = dy1 * du; - } - } - - - if(*dd1 != ZERO) - { - while( (*dd1 <= RGAMSQ) || (*dd1 >= GAMSQ) ) - { - if(dflag == ZERO) - { - dh11 = ONE; - dh22 = ONE; - dflag = -ONE; - } - else - { - if(dflag == ONE) - { - dh21 = -ONE; - dh12 = ONE; - dflag = -ONE; - } - } - if( *dd1 <= RGAMSQ ) - { - *dd1 = *dd1 * (GAM * GAM); - *dx1 = *dx1 / GAM; - dh11 = dh11 / GAM; - dh12 = dh12 / GAM; - } - else - { - *dd1 = *dd1 / (GAM * GAM); - *dx1 = *dx1 * GAM; - dh11 = dh11 * GAM; - dh12 = dh12 * GAM; - } - } - } - - if(*dd2 != ZERO) - { - while( (ABS(*dd2) <= RGAMSQ) || (ABS(*dd2) >= GAMSQ) ) - { - if(dflag == ZERO) - { - dh11 = ONE; - dh22 = ONE; - dflag = -ONE; - } - else - { - if(dflag == ONE) - { - dh21 = -ONE; - dh12 = ONE; - dflag = -ONE; - } - } - if( ABS(*dd2) <= RGAMSQ ) - { - *dd2 = *dd2 * (GAM * GAM); - dh21 = dh21 / GAM; - dh22 = dh22 / GAM; - } - else - { - *dd2 = *dd2 / (GAM * GAM); - dh21 = dh21 * GAM; - dh22 = dh22 * GAM; - } - } - } - - } - - if(dflag < ZERO) - { - dparam[1] = dh11; - dparam[2] = dh21; - dparam[3] = dh12; - dparam[4] = dh22; - } - else - { - if(dflag == ZERO) - { - dparam[2] = dh21; - dparam[3] = dh12; - } - else - { - dparam[1] = dh11; - dparam[4] = dh22; - } - } - - - dparam[0] = dflag; - return; -} - - diff --git a/interface/sbmv.c b/interface/sbmv.c deleted file mode 100644 index 2ffe7f166..000000000 --- a/interface/sbmv.c +++ /dev/null @@ -1,215 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DSBMV " -#else -#define ERROR_NAME "SSBMV " -#endif - -static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qsbmv_U, qsbmv_L, -#elif defined(DOUBLE) - dsbmv_U, dsbmv_L, -#else - ssbmv_U, ssbmv_L, -#endif -}; - -#ifdef SMP -static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qsbmv_thread_U, qsbmv_thread_L, -#elif defined(DOUBLE) - dsbmv_thread_U, dsbmv_thread_L, -#else - ssbmv_thread_U, ssbmv_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - blasint k = *K; - FLOAT alpha = *ALPHA; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta = *BETA; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, blasint k, - FLOAT alpha, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT beta, - FLOAT *y, blasint incy){ - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (sbmv[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (sbmv_thread[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/scal.c b/interface/scal.c deleted file mode 100644 index 7b72ca01c..000000000 --- a/interface/scal.c +++ /dev/null @@ -1,112 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX){ - - blasint n = *N; - blasint incx = *INCX; - FLOAT alpha = *ALPHA; - -#else - -void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx){ - -#endif - -#ifdef SMP - int mode, nthreads; -#endif - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (incx <= 0 || n <= 0) return; - - if (alpha == ONE) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - -#ifdef SMP - nthreads = num_cpu_avail(1); - - if (nthreads == 1) { -#endif - - SCAL_K(n, 0, 0, alpha, x, incx, NULL, 0, NULL, 0); - -#ifdef SMP - } else { - -#ifdef DOUBLE - mode = BLAS_DOUBLE | BLAS_REAL; -#else - mode = BLAS_SINGLE | BLAS_REAL; -#endif - - blas_level1_thread(mode, n, 0, 0, -#ifndef CBLAS - ALPHA, -#else - &alpha, -#endif - x, incx, NULL, 0, NULL, 0, (void *)SCAL_K, nthreads); - - } -#endif - - FUNCTION_PROFILE_END(1, n, n); - - IDEBUG_END; - - return; - -} diff --git a/interface/sdsdot.c b/interface/sdsdot.c deleted file mode 100644 index 168468c3a..000000000 --- a/interface/sdsdot.c +++ /dev/null @@ -1,101 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -FLOATRET NAME(blasint *N, FLOAT *a, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - FLOATRET ret; - - PRINT_DEBUG_NAME; - - if (n <= 0) return(*a) ; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret = (FLOATRET)(SDSDOT_K(n, x, incx, y, incy) + *a); - - FUNCTION_PROFILE_END(1, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; - -} - -#else - -FLOAT CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - - FLOAT ret; - - PRINT_DEBUG_CNAME; - - if (n <= 0) return (alpha); - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - - ret = SDSDOT_K(n, x, incx, y, incy) + alpha; - - FUNCTION_PROFILE_END(1, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; -} - -#endif diff --git a/interface/spmv.c b/interface/spmv.c deleted file mode 100644 index 8d8902763..000000000 --- a/interface/spmv.c +++ /dev/null @@ -1,207 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSPMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DSPMV " -#else -#define ERROR_NAME "SSPMV " -#endif - -static int (*spmv[])(BLASLONG, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qspmv_U, qspmv_L, -#elif defined(DOUBLE) - dspmv_U, dspmv_L, -#else - sspmv_U, sspmv_L, -#endif -}; - -#ifdef SMP -static int (*spmv_thread[])(BLASLONG, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qspmv_thread_U, qspmv_thread_L, -#elif defined(DOUBLE) - dspmv_thread_U, dspmv_thread_L, -#else - sspmv_thread_U, sspmv_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint incx = *INCX; - FLOAT beta = *BETA; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT alpha, - FLOAT *a, - FLOAT *x, blasint incx, - FLOAT beta, - FLOAT *y, blasint incy){ - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spmv[uplo])(n, alpha, a, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (spmv_thread[uplo])(n, alpha, a, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/spr.c b/interface/spr.c deleted file mode 100644 index aa2ff8f3f..000000000 --- a/interface/spr.c +++ /dev/null @@ -1,197 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSPR " -#elif defined(DOUBLE) -#define ERROR_NAME "DSPR " -#else -#define ERROR_NAME "SSPR " -#endif - -static int (*spr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - qspr_U, qspr_L, -#elif defined(DOUBLE) - dspr_U, dspr_L, -#else - sspr_U, sspr_L, -#endif -}; - -#ifdef SMP -static int (*spr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - qspr_thread_U, qspr_thread_L, -#elif defined(DOUBLE) - dspr_thread_U, dspr_thread_L, -#else - sspr_thread_U, sspr_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT alpha, - FLOAT *x, blasint incx, - FLOAT *a) { - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spr[uplo])(n, alpha, x, incx, a, buffer); - -#ifdef SMP - } else { - - (spr_thread[uplo])(n, alpha, x, incx, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/spr2.c b/interface/spr2.c deleted file mode 100644 index e556d3fa8..000000000 --- a/interface/spr2.c +++ /dev/null @@ -1,203 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSPR2 " -#elif defined(DOUBLE) -#define ERROR_NAME "DSPR2 " -#else -#define ERROR_NAME "SSPR2 " -#endif - -static int (*spr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - qspr2_U, qspr2_L, -#elif defined(DOUBLE) - dspr2_U, dspr2_L, -#else - sspr2_U, sspr2_L, -#endif -}; - -#ifdef SMP -static int (*spr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - qspr2_thread_U, qspr2_thread_L, -#elif defined(DOUBLE) - dspr2_thread_U, dspr2_thread_L, -#else - sspr2_thread_U, sspr2_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT alpha, - FLOAT *x, blasint incx, - FLOAT *y, blasint incy, - FLOAT *a) { - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spr2[uplo])(n, alpha, x, incx, y, incy, a, buffer); - -#ifdef SMP - } else { - - (spr2_thread[uplo])(n, alpha, x, incx, y, incy, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/swap.c b/interface/swap.c deleted file mode 100644 index 271fa083a..000000000 --- a/interface/swap.c +++ /dev/null @@ -1,115 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - blasint n = *N; - blasint incx = *INCX; - blasint incy = *INCY; - -#else - -void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - -#endif - -#ifdef SMP - int mode, nthreads; - FLOAT dummyalpha[2] = {ZERO, ZERO}; -#endif - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (n <= 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx; - if (incy < 0) y -= (n - 1) * incy; - -#ifdef SMP - nthreads = num_cpu_avail(1); - - //disable multi-thread when incx==0 or incy==0 - //In that case, the threads would be dependent. - if (incx == 0 || incy == 0) - nthreads = 1; - - if (nthreads == 1) { -#endif - - SWAP_K(n, 0, 0, ZERO, x, incx, y, incy, NULL, 0); - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_REAL; -#else - mode = BLAS_SINGLE | BLAS_REAL; -#endif - - blas_level1_thread(mode, n, 0, 0, dummyalpha, - x, incx, y, incy, NULL, 0, (void *)SWAP_K, nthreads); - } - -#endif - - FUNCTION_PROFILE_END(1, 2 * n, 0); - - IDEBUG_END; - - return; - -} diff --git a/interface/symm.c b/interface/symm.c deleted file mode 100644 index b447f13e8..000000000 --- a/interface/symm.c +++ /dev/null @@ -1,442 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QSYMM " -#elif defined(DOUBLE) -#define ERROR_NAME "DSYMM " -#else -#define ERROR_NAME "SSYMM " -#endif -#else -#ifndef GEMM3M -#ifndef HEMM -#ifdef XDOUBLE -#define ERROR_NAME "XSYMM " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYMM " -#else -#define ERROR_NAME "CSYMM " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XHEMM " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHEMM " -#else -#define ERROR_NAME "CHEMM " -#endif -#endif -#else -#ifndef HEMM -#ifdef XDOUBLE -#define ERROR_NAME "XSYMM3M " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYMM3M " -#else -#define ERROR_NAME "CSYMM3M " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XHEMM3M " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHEMM3M " -#else -#define ERROR_NAME "CHEMM3M " -#endif -#endif -#endif -#endif - -static int (*symm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifndef GEMM3M -#ifndef HEMM - SYMM_LU, SYMM_LL, SYMM_RU, SYMM_RL, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - SYMM_THREAD_LU, SYMM_THREAD_LL, SYMM_THREAD_RU, SYMM_THREAD_RL, -#endif -#else - HEMM_LU, HEMM_LL, HEMM_RU, HEMM_RL, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - HEMM_THREAD_LU, HEMM_THREAD_LL, HEMM_THREAD_RU, HEMM_THREAD_RL, -#endif -#endif -#else -#ifndef HEMM - SYMM3M_LU, SYMM3M_LL, SYMM3M_RU, SYMM3M_RL, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - SYMM3M_THREAD_LU, SYMM3M_THREAD_LL, SYMM3M_THREAD_RU, SYMM3M_THREAD_RL, -#endif -#else - HEMM3M_LU, HEMM3M_LL, HEMM3M_RU, HEMM3M_RL, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - HEMM3M_THREAD_LU, HEMM3M_THREAD_LL, HEMM3M_THREAD_RU, HEMM3M_THREAD_RL, -#endif -#endif -#endif -}; - -#ifndef CBLAS - -void NAME(char *SIDE, char *UPLO, - blasint *M, blasint *N, - FLOAT *alpha, FLOAT *a, blasint *ldA, - FLOAT *b, blasint *ldB, - FLOAT *beta, FLOAT *c, blasint *ldC){ - - char side_arg = *SIDE; - char uplo_arg = *UPLO; - - blas_arg_t args; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - -#if defined(SMP) && !defined(NO_AFFINITY) - int nodes; -#endif - - blasint info; - int side; - int uplo; - - PRINT_DEBUG_NAME; - - args.alpha = (void *)alpha; - args.beta = (void *)beta; - - TOUPPER(side_arg); - TOUPPER(uplo_arg); - - side = -1; - uplo = -1; - - if (side_arg == 'L') side = 0; - if (side_arg == 'R') side = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - args.m = *M; - args.n = *N; - - args.c = (void *)c; - args.ldc = *ldC; - - info = 0; - - if (args.ldc < MAX(1, args.m)) info = 12; - - if (!side) { - args.a = (void *)a; - args.b = (void *)b; - - args.lda = *ldA; - args.ldb = *ldB; - - if (args.ldb < MAX(1, args.m)) info = 9; - if (args.lda < MAX(1, args.m)) info = 7; - - } else { - args.a = (void *)b; - args.b = (void *)a; - - args.lda = *ldB; - args.ldb = *ldA; - - if (args.lda < MAX(1, args.m)) info = 9; - if (args.ldb < MAX(1, args.n)) info = 7; - } - - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, - blasint m, blasint n, -#ifndef COMPLEX - FLOAT alpha, -#else - FLOAT *alpha, -#endif - FLOAT *a, blasint lda, - FLOAT *b, blasint ldb, -#ifndef COMPLEX - FLOAT beta, -#else - FLOAT *beta, -#endif - FLOAT *c, blasint ldc) { - - blas_arg_t args; - int side, uplo; - blasint info; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - -#if defined(SMP) && !defined(NO_AFFINITY) - int nodes; -#endif - - PRINT_DEBUG_CNAME; - -#ifndef COMPLEX - args.alpha = (void *)α - args.beta = (void *)β -#else - args.alpha = (void *)alpha; - args.beta = (void *)beta; -#endif - - args.c = (void *)c; - args.ldc = ldc; - - side = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Side == CblasLeft) side = 0; - if (Side == CblasRight) side = 1; - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - args.m = m; - args.n = n; - - if (args.ldc < MAX(1, args.m)) info = 12; - - if (!side) { - args.a = (void *)a; - args.b = (void *)b; - - args.lda = lda; - args.ldb = ldb; - - if (args.ldb < MAX(1, args.m)) info = 9; - if (args.lda < MAX(1, args.m)) info = 7; - - } else { - args.a = (void *)b; - args.b = (void *)a; - - args.lda = ldb; - args.ldb = lda; - - if (args.lda < MAX(1, args.m)) info = 9; - if (args.ldb < MAX(1, args.n)) info = 7; - } - - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Side == CblasLeft) side = 1; - if (Side == CblasRight) side = 0; - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - args.m = n; - args.n = m; - - if (args.ldc < MAX(1, args.m)) info = 12; - - if (!side) { - args.a = (void *)a; - args.b = (void *)b; - - args.lda = lda; - args.ldb = ldb; - - if (args.ldb < MAX(1, args.m)) info = 9; - if (args.lda < MAX(1, args.m)) info = 7; - - } else { - args.a = (void *)b; - args.b = (void *)a; - - args.lda = ldb; - args.ldb = lda; - - if (args.lda < MAX(1, args.m)) info = 9; - if (args.ldb < MAX(1, args.n)) info = 7; - } - - if (args.n < 0) info = 4; - if (args.m < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (args.m == 0 || args.n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - buffer = (FLOAT *)blas_memory_alloc(0); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(3); - - if (args.nthreads == 1) { -#endif - - (symm[(side << 1) | uplo ])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - - } else { - -#ifndef NO_AFFINITY - nodes = get_num_nodes(); - - if (nodes > 1) { - - args.nthreads /= nodes; - - gemm_thread_mn(mode, &args, NULL, NULL, - symm[4 | (side << 1) | uplo ], sa, sb, nodes); - - } else { -#endif - -#ifndef USE_SIMPLE_THREADED_LEVEL3 - - (symm[4 | (side << 1) | uplo ])(&args, NULL, NULL, sa, sb, 0); - -#else - - GEMM_THREAD(mode, &args, NULL, NULL, symm[(side << 1) | uplo ], sa, sb, args.nthreads); - -#endif - -#ifndef NO_AFFINITY - } -#endif - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, - (!side)? args.m * (args.m / 2 + args.n) : args.n * (args.m + args.n / 2), - (!side)? 2 * args.m * args.m * args.n : 2 * args.m * args.n * args.n); - - IDEBUG_END; - - return; -} diff --git a/interface/symv.c b/interface/symv.c deleted file mode 100644 index e8c24df66..000000000 --- a/interface/symv.c +++ /dev/null @@ -1,205 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSYMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DSYMV " -#else -#define ERROR_NAME "SSYMV " -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta = *BETA; - blasint incy = *INCY; - - int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - SYMV_U, SYMV_L, - }; - -#ifdef SMP - int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { - SYMV_THREAD_U, SYMV_THREAD_L, - }; -#endif - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, - FLOAT *a, blasint lda, FLOAT *x, blasint incx, FLOAT beta, FLOAT *y, blasint incy) { - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - SYMV_U, SYMV_L, - }; - -#ifdef SMP - int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { - SYMV_THREAD_U, SYMV_THREAD_L, - }; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (symv[uplo])(n, n, alpha, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (symv_thread[uplo])(n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/syr.c b/interface/syr.c deleted file mode 100644 index 2b2d3d1e2..000000000 --- a/interface/syr.c +++ /dev/null @@ -1,200 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSYR " -#elif defined(DOUBLE) -#define ERROR_NAME "DSYR " -#else -#define ERROR_NAME "SSYR " -#endif - -static int (*syr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - qsyr_U, qsyr_L, -#elif defined(DOUBLE) - dsyr_U, dsyr_L, -#else - ssyr_U, ssyr_L, -#endif -}; - -#ifdef SMP -static int (*syr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qsyr_thread_U, qsyr_thread_L, -#elif defined(DOUBLE) - dsyr_thread_U, dsyr_thread_L, -#else - ssyr_thread_U, ssyr_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *a, blasint lda) { - - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (syr[uplo])(n, alpha, x, incx, a, lda, buffer); - -#ifdef SMP - } else { - - (syr_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/syr2.c b/interface/syr2.c deleted file mode 100644 index 15dbae4bd..000000000 --- a/interface/syr2.c +++ /dev/null @@ -1,204 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSYR2 " -#elif defined(DOUBLE) -#define ERROR_NAME "DSYR2 " -#else -#define ERROR_NAME "SSYR2 " -#endif - -static int (*syr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - qsyr2_U, qsyr2_L, -#elif defined(DOUBLE) - dsyr2_U, dsyr2_L, -#else - ssyr2_U, ssyr2_L, -#endif -}; - -#ifdef SMP -static int (*syr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qsyr2_thread_U, qsyr2_thread_L, -#elif defined(DOUBLE) - dsyr2_thread_U, dsyr2_thread_L, -#else - ssyr2_thread_U, ssyr2_thread_L, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT *a, blasint lda) { - - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (syr2[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer); - -#ifdef SMP - } else { - - (syr2_thread[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/syr2k.c b/interface/syr2k.c deleted file mode 100644 index 381e088a6..000000000 --- a/interface/syr2k.c +++ /dev/null @@ -1,377 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QSYR2K" -#elif defined(DOUBLE) -#define ERROR_NAME "DSYR2K" -#else -#define ERROR_NAME "SSYR2K" -#endif -#else -#ifndef HEMM -#ifdef XDOUBLE -#define ERROR_NAME "XSYR2K" -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYR2K" -#else -#define ERROR_NAME "CSYR2K" -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XHER2K" -#elif defined(DOUBLE) -#define ERROR_NAME "ZHER2K" -#else -#define ERROR_NAME "CHER2K" -#endif -#endif -#endif - -static int (*syr2k[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifndef HEMM - SYR2K_UN, SYR2K_UC, SYR2K_LN, SYR2K_LC, -#else - HER2K_UN, HER2K_UC, HER2K_LN, HER2K_LC, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, - blasint *N, blasint *K, - FLOAT *alpha, FLOAT *a, blasint *ldA, - FLOAT *b, blasint *ldB, - FLOAT *beta, FLOAT *c, blasint *ldC){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - - blas_arg_t args; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - blasint info; - int uplo; - int trans; - int nrowa; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.k = *K; - - args.a = (void *)a; - args.b = (void *)b; - args.c = (void *)c; - - args.lda = *ldA; - args.ldb = *ldB; - args.ldc = *ldC; - - args.alpha = (void *)alpha; - args.beta = (void *)beta; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - - uplo = -1; - trans = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - -#ifndef COMPLEX - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'C') trans = 1; -#else -#ifdef HEMM - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'C') trans = 1; -#else - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; -#endif - -#endif - - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - info = 0; - - if (args.ldc < MAX(1,args.n)) info = 12; - if (args.ldb < MAX(1,nrowa)) info = 9; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, - blasint n, blasint k, -#ifndef COMPLEX - FLOAT alpha, -#else - FLOAT *alpha, -#endif - FLOAT *a, blasint lda, - FLOAT *b, blasint ldb, -#if !defined(COMPLEX) || defined(HEMM) - FLOAT beta, -#else - FLOAT *beta, -#endif - FLOAT *c, blasint ldc) { - - blas_arg_t args; - int uplo, trans; - blasint info, nrowa; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef HEMM - FLOAT CAlpha[2]; -#endif - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - PRINT_DEBUG_CNAME; - - args.n = n; - args.k = k; - - args.a = (void *)a; - args.b = (void *)b; - args.c = (void *)c; - - args.lda = lda; - args.ldb = ldb; - args.ldc = ldc; - -#ifndef COMPLEX - args.alpha = (void *)α -#else - args.alpha = (void *)alpha; -#endif - -#if !defined(COMPLEX) || defined(HEMM) - args.beta = (void *)β -#else - args.beta = (void *)beta; -#endif - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (Trans == CblasNoTrans) trans = 0; -#ifndef COMPLEX - if (Trans == CblasTrans) trans = 1; - if (Trans == CblasConjNoTrans) trans = 0; - if (Trans == CblasConjTrans) trans = 1; -#elif !defined(HEMM) - if (Trans == CblasTrans) trans = 1; -#else - if (Trans == CblasConjTrans) trans = 1; -#endif - - info = -1; - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - if (args.ldc < MAX(1,args.n)) info = 12; - if (args.ldb < MAX(1,nrowa)) info = 9; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - -#ifdef HEMM - CAlpha[0] = alpha[0]; - CAlpha[1] = -alpha[1]; - - args.alpha = (void *)CAlpha; -#endif - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (Trans == CblasNoTrans) trans = 1; -#ifndef COMPLEX - if (Trans == CblasTrans) trans = 0; - if (Trans == CblasConjNoTrans) trans = 1; - if (Trans == CblasConjTrans) trans = 0; -#elif !defined(HEMM) - if (Trans == CblasTrans) trans = 0; -#else - if (Trans == CblasConjTrans) trans = 0; -#endif - - info = -1; - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - if (args.ldc < MAX(1,args.n)) info = 12; - if (args.ldb < MAX(1,nrowa)) info = 9; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (args.n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - buffer = (FLOAT *)blas_memory_alloc(0); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); - -#ifdef SMP - if (!trans){ - mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); - } else { - mode |= (BLAS_TRANSA_T | BLAS_TRANSB_N); - } - - mode |= (uplo << BLAS_UPLO_SHIFT); - - args.common = NULL; - args.nthreads = num_cpu_avail(3); - - if (args.nthreads == 1) { -#endif - - (syr2k[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - - } else { - - syrk_thread(mode, &args, NULL, NULL, syr2k[(uplo << 1) | trans ], sa, sb, args.nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, 2 * args.n * args.k + args.n * args.n, 2 * args.n * args.n * args.k); - - IDEBUG_END; - - return; -} diff --git a/interface/syrk.c b/interface/syrk.c deleted file mode 100644 index 072cc86f5..000000000 --- a/interface/syrk.c +++ /dev/null @@ -1,366 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QSYRK " -#elif defined(DOUBLE) -#define ERROR_NAME "DSYRK " -#else -#define ERROR_NAME "SSYRK " -#endif -#else -#ifndef HEMM -#ifdef XDOUBLE -#define ERROR_NAME "XSYRK " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYRK " -#else -#define ERROR_NAME "CSYRK " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XHERK " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHERK " -#else -#define ERROR_NAME "CHERK " -#endif -#endif -#endif - -static int (*syrk[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifndef HEMM - SYRK_UN, SYRK_UC, SYRK_LN, SYRK_LC, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - SYRK_THREAD_UN, SYRK_THREAD_UC, SYRK_THREAD_LN, SYRK_THREAD_LC, -#endif -#else - HERK_UN, HERK_UC, HERK_LN, HERK_LC, -#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) - HERK_THREAD_UN, HERK_THREAD_UC, HERK_THREAD_LN, HERK_THREAD_LC, -#endif -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, - blasint *N, blasint *K, - FLOAT *alpha, FLOAT *a, blasint *ldA, - FLOAT *beta, FLOAT *c, blasint *ldC){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - - blas_arg_t args; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - blasint info; - int uplo; - int trans; - int nrowa; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.k = *K; - - args.a = (void *)a; - args.c = (void *)c; - - args.lda = *ldA; - args.ldc = *ldC; - - args.alpha = (void *)alpha; - args.beta = (void *)beta; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - - uplo = -1; - trans = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - -#ifndef COMPLEX - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'C') trans = 1; -#else -#ifdef HEMM - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'C') trans = 1; -#else - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; -#endif - -#endif - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - info = 0; - - if (args.ldc < MAX(1,args.n)) info = 10; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, - blasint n, blasint k, -#if !defined(COMPLEX) || defined(HEMM) - FLOAT alpha, -#else - FLOAT *alpha, -#endif - FLOAT *a, blasint lda, -#if !defined(COMPLEX) || defined(HEMM) - FLOAT beta, -#else - FLOAT *beta, -#endif - FLOAT *c, blasint ldc) { - - blas_arg_t args; - int uplo, trans; - blasint info, nrowa; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - PRINT_DEBUG_CNAME; - - args.n = n; - args.k = k; - - args.a = (void *)a; - args.c = (void *)c; - - args.lda = lda; - args.ldc = ldc; - -#if !defined(COMPLEX) || defined(HEMM) - args.alpha = (void *)α - args.beta = (void *)β -#else - args.alpha = (void *)alpha; - args.beta = (void *)beta; -#endif - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (Trans == CblasNoTrans) trans = 0; -#ifndef COMPLEX - if (Trans == CblasTrans) trans = 1; - if (Trans == CblasConjNoTrans) trans = 0; - if (Trans == CblasConjTrans) trans = 1; -#elif !defined(HEMM) - if (Trans == CblasTrans) trans = 1; -#else - if (Trans == CblasConjTrans) trans = 1; -#endif - - info = -1; - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - if (args.ldc < MAX(1,args.n)) info = 10; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (Trans == CblasNoTrans) trans = 1; -#ifndef COMPLEX - if (Trans == CblasTrans) trans = 0; - if (Trans == CblasConjNoTrans) trans = 1; - if (Trans == CblasConjTrans) trans = 0; -#elif !defined(HEMM) - if (Trans == CblasTrans) trans = 0; -#else - if (Trans == CblasConjTrans) trans = 0; -#endif - - info = -1; - - nrowa = args.n; - if (trans & 1) nrowa = args.k; - - if (args.ldc < MAX(1,args.n)) info = 10; - if (args.lda < MAX(1,nrowa)) info = 7; - if (args.k < 0) info = 4; - if (args.n < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (args.n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - buffer = (FLOAT *)blas_memory_alloc(0); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); - -#ifdef SMP - if (!trans){ - mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); - } else { - mode |= (BLAS_TRANSA_T | BLAS_TRANSB_N); - } - - mode |= (uplo << BLAS_UPLO_SHIFT); - - args.common = NULL; - args.nthreads = num_cpu_avail(3); - - if (args.nthreads == 1) { -#endif - - (syrk[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - - } else { - -#ifndef USE_SIMPLE_THREADED_LEVEL3 - - (syrk[4 | (uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); - -#else - - syrk_thread(mode, &args, NULL, NULL, syrk[(uplo << 1) | trans ], sa, sb, args.nthreads); - -#endif - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.n * args.k + args.n * args.n / 2, args.n * args.n * args.k); - - IDEBUG_END; - - return; -} diff --git a/interface/tbmv.c b/interface/tbmv.c deleted file mode 100644 index cec2be465..000000000 --- a/interface/tbmv.c +++ /dev/null @@ -1,248 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTBMV " -#else -#define ERROR_NAME "STBMV " -#endif - -static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qtbmv_NUU, qtbmv_NUN, qtbmv_NLU, qtbmv_NLN, - qtbmv_TUU, qtbmv_TUN, qtbmv_TLU, qtbmv_TLN, -#elif defined(DOUBLE) - dtbmv_NUU, dtbmv_NUN, dtbmv_NLU, dtbmv_NLN, - dtbmv_TUU, dtbmv_TUN, dtbmv_TLU, dtbmv_TLN, -#else - stbmv_NUU, stbmv_NUN, stbmv_NLU, stbmv_NLN, - stbmv_TUU, stbmv_TUN, stbmv_TLU, stbmv_TLN, -#endif -}; - -#ifdef SMP -static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qtbmv_thread_NUU, qtbmv_thread_NUN, qtbmv_thread_NLU, qtbmv_thread_NLN, - qtbmv_thread_TUU, qtbmv_thread_TUN, qtbmv_thread_TLU, qtbmv_thread_TLN, -#elif defined(DOUBLE) - dtbmv_thread_NUU, dtbmv_thread_NUN, dtbmv_thread_NLU, dtbmv_thread_NLN, - dtbmv_thread_TUU, dtbmv_thread_TUN, dtbmv_thread_TLU, dtbmv_thread_TLN, -#else - stbmv_thread_NUU, stbmv_thread_NUN, stbmv_thread_NLU, stbmv_thread_NLN, - stbmv_thread_TUU, stbmv_thread_TUN, stbmv_thread_TLU, stbmv_thread_TLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, blasint *K, - FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint k = *K; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); - -#ifdef SMP - } else { - - (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/tbsv.c b/interface/tbsv.c deleted file mode 100644 index a07c4c584..000000000 --- a/interface/tbsv.c +++ /dev/null @@ -1,213 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTBSV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTBSV " -#else -#define ERROR_NAME "STBSV " -#endif - -static int (*tbsv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qtbsv_NUU, qtbsv_NUN, qtbsv_NLU, qtbsv_NLN, - qtbsv_TUU, qtbsv_TUN, qtbsv_TLU, qtbsv_TLN, -#elif defined(DOUBLE) - dtbsv_NUU, dtbsv_NUN, dtbsv_NLU, dtbsv_NLN, - dtbsv_TUU, dtbsv_TUN, dtbsv_TLU, dtbsv_TLN, -#else - stbsv_NUU, stbsv_NUN, stbsv_NLU, stbsv_NLN, - stbsv_TUU, stbsv_TUN, stbsv_TLU, stbsv_TLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, blasint *K, - FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint k = *K; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (tbsv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/tpmv.c b/interface/tpmv.c deleted file mode 100644 index f0fc4f71c..000000000 --- a/interface/tpmv.c +++ /dev/null @@ -1,239 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTPMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTPMV " -#else -#define ERROR_NAME "STPMV " -#endif - -static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qtpmv_NUU, qtpmv_NUN, qtpmv_NLU, qtpmv_NLN, - qtpmv_TUU, qtpmv_TUN, qtpmv_TLU, qtpmv_TLN, -#elif defined(DOUBLE) - dtpmv_NUU, dtpmv_NUN, dtpmv_NLU, dtpmv_NLN, - dtpmv_TUU, dtpmv_TUN, dtpmv_TLU, dtpmv_TLN, -#else - stpmv_NUU, stpmv_NUN, stpmv_NLU, stpmv_NLN, - stpmv_TUU, stpmv_TUN, stpmv_TLU, stpmv_TLN, -#endif -}; - -#ifdef SMP -static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qtpmv_thread_NUU, qtpmv_thread_NUN, qtpmv_thread_NLU, qtpmv_thread_NLN, - qtpmv_thread_TUU, qtpmv_thread_TUN, qtpmv_thread_TLU, qtpmv_thread_TLN, -#elif defined(DOUBLE) - dtpmv_thread_NUU, dtpmv_thread_NUN, dtpmv_thread_NLU, dtpmv_thread_NLN, - dtpmv_thread_TUU, dtpmv_thread_TUN, dtpmv_thread_TLU, dtpmv_thread_TLN, -#else - stpmv_thread_NUU, stpmv_thread_NUN, stpmv_thread_NLU, stpmv_thread_NLN, - stpmv_thread_TUU, stpmv_thread_TUN, stpmv_thread_TLU, stpmv_thread_TLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); - -#ifdef SMP - } else { - - (tpmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/tpsv.c b/interface/tpsv.c deleted file mode 100644 index 9dafd0b68..000000000 --- a/interface/tpsv.c +++ /dev/null @@ -1,204 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTPSV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTPSV " -#else -#define ERROR_NAME "STPSV " -#endif - -static int (*tpsv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qtpsv_NUU, qtpsv_NUN, qtpsv_NLU, qtpsv_NLN, - qtpsv_TUU, qtpsv_TUN, qtpsv_TLU, qtpsv_TLN, -#elif defined(DOUBLE) - dtpsv_NUU, dtpsv_NUN, dtpsv_NLU, dtpsv_NLN, - dtpsv_TUU, dtpsv_TUN, dtpsv_TLU, dtpsv_TLN, -#else - stpsv_NUU, stpsv_NUN, stpsv_NLU, stpsv_NLN, - stpsv_TUU, stpsv_TUN, stpsv_TLU, stpsv_TLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (tpsv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/trmv.c b/interface/trmv.c deleted file mode 100644 index ed23cedc6..000000000 --- a/interface/trmv.c +++ /dev/null @@ -1,243 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTRMV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTRMV " -#else -#define ERROR_NAME "STRMV " -#endif - -static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - qtrmv_NUU, qtrmv_NUN, qtrmv_NLU, qtrmv_NLN, - qtrmv_TUU, qtrmv_TUN, qtrmv_TLU, qtrmv_TLN, -#elif defined(DOUBLE) - dtrmv_NUU, dtrmv_NUN, dtrmv_NLU, dtrmv_NLN, - dtrmv_TUU, dtrmv_TUN, dtrmv_TLU, dtrmv_TLN, -#else - strmv_NUU, strmv_NUN, strmv_NLU, strmv_NLN, - strmv_TUU, strmv_TUN, strmv_TLU, strmv_TLN, -#endif -}; - -#ifdef SMP -static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - qtrmv_thread_NUU, qtrmv_thread_NUN, qtrmv_thread_NLU, qtrmv_thread_NLN, - qtrmv_thread_TUU, qtrmv_thread_TUN, qtrmv_thread_TLU, qtrmv_thread_TLN, -#elif defined(DOUBLE) - dtrmv_thread_NUU, dtrmv_thread_NUN, dtrmv_thread_NLU, dtrmv_thread_NLN, - dtrmv_thread_TUU, dtrmv_thread_TUN, dtrmv_thread_TLU, dtrmv_thread_TLN, -#else - strmv_thread_NUU, strmv_thread_NUN, strmv_thread_NLU, strmv_thread_NLN, - strmv_thread_TUU, strmv_thread_TUN, strmv_thread_TLU, strmv_thread_TLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); - -#ifdef SMP - } else { - - (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/trsm.c b/interface/trsm.c deleted file mode 100644 index 5836ce2f0..000000000 --- a/interface/trsm.c +++ /dev/null @@ -1,391 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef TRMM -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QTRSM " -#elif defined(DOUBLE) -#define ERROR_NAME "DTRSM " -#else -#define ERROR_NAME "STRSM " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XTRSM " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRSM " -#else -#define ERROR_NAME "CTRSM " -#endif -#endif -#else -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QTRMM " -#elif defined(DOUBLE) -#define ERROR_NAME "DTRMM " -#else -#define ERROR_NAME "STRMM " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XTRMM " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRMM " -#else -#define ERROR_NAME "CTRMM " -#endif -#endif -#endif - -static int (*trsm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifndef TRMM - TRSM_LNUU, TRSM_LNUN, TRSM_LNLU, TRSM_LNLN, - TRSM_LTUU, TRSM_LTUN, TRSM_LTLU, TRSM_LTLN, - TRSM_LRUU, TRSM_LRUN, TRSM_LRLU, TRSM_LRLN, - TRSM_LCUU, TRSM_LCUN, TRSM_LCLU, TRSM_LCLN, - TRSM_RNUU, TRSM_RNUN, TRSM_RNLU, TRSM_RNLN, - TRSM_RTUU, TRSM_RTUN, TRSM_RTLU, TRSM_RTLN, - TRSM_RRUU, TRSM_RRUN, TRSM_RRLU, TRSM_RRLN, - TRSM_RCUU, TRSM_RCUN, TRSM_RCLU, TRSM_RCLN, -#else - TRMM_LNUU, TRMM_LNUN, TRMM_LNLU, TRMM_LNLN, - TRMM_LTUU, TRMM_LTUN, TRMM_LTLU, TRMM_LTLN, - TRMM_LRUU, TRMM_LRUN, TRMM_LRLU, TRMM_LRLN, - TRMM_LCUU, TRMM_LCUN, TRMM_LCLU, TRMM_LCLN, - TRMM_RNUU, TRMM_RNUN, TRMM_RNLU, TRMM_RNLN, - TRMM_RTUU, TRMM_RTUN, TRMM_RTLU, TRMM_RTLN, - TRMM_RRUU, TRMM_RRUN, TRMM_RRLU, TRMM_RRLN, - TRMM_RCUU, TRMM_RCUN, TRMM_RCLU, TRMM_RCLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *SIDE, char *UPLO, char *TRANS, char *DIAG, - blasint *M, blasint *N, FLOAT *alpha, - FLOAT *a, blasint *ldA, FLOAT *b, blasint *ldB){ - - char side_arg = *SIDE; - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blas_arg_t args; - - FLOAT *buffer; - FLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - blasint info; - int side; - int uplo; - int unit; - int trans; - int nrowa; - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - - args.a = (void *)a; - args.b = (void *)b; - - args.lda = *ldA; - args.ldb = *ldB; - - args.beta = (void *)alpha; - - TOUPPER(side_arg); - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - side = -1; - trans = -1; - unit = -1; - uplo = -1; - - if (side_arg == 'L') side = 0; - if (side_arg == 'R') side = 1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - nrowa = args.m; - if (side & 1) nrowa = args.n; - - info = 0; - - if (args.ldb < MAX(1,args.m)) info = 11; - if (args.lda < MAX(1,nrowa)) info = 9; - if (args.n < 0) info = 6; - if (args.m < 0) info = 5; - if (unit < 0) info = 4; - if (trans < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE Trans, enum CBLAS_DIAG Diag, - blasint m, blasint n, -#ifndef COMPLEX - FLOAT alpha, -#else - FLOAT *alpha, -#endif - FLOAT *a, blasint lda, - FLOAT *b, blasint ldb) { - - blas_arg_t args; - int side, uplo, trans, unit; - blasint info, nrowa; - - XFLOAT *buffer; - XFLOAT *sa, *sb; - -#ifdef SMP -#ifndef COMPLEX -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_REAL; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_REAL; -#else - int mode = BLAS_SINGLE | BLAS_REAL; -#endif -#else -#ifdef XDOUBLE - int mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - int mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - int mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif -#endif -#endif - - PRINT_DEBUG_CNAME; - - args.a = (void *)a; - args.b = (void *)b; - - args.lda = lda; - args.ldb = ldb; - -#ifndef COMPLEX - args.beta = (void *)α -#else - args.beta = (void *)alpha; -#endif - - side = -1; - uplo = -1; - trans = -1; - unit = -1; - info = 0; - - if (order == CblasColMajor) { - args.m = m; - args.n = n; - - if (Side == CblasLeft) side = 0; - if (Side == CblasRight) side = 1; - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (Trans == CblasNoTrans) trans = 0; - if (Trans == CblasTrans) trans = 1; -#ifndef COMPLEX - if (Trans == CblasConjNoTrans) trans = 0; - if (Trans == CblasConjTrans) trans = 1; -#else - if (Trans == CblasConjNoTrans) trans = 2; - if (Trans == CblasConjTrans) trans = 3; -#endif - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - nrowa = args.m; - if (side & 1) nrowa = args.n; - - if (args.ldb < MAX(1,args.m)) info = 11; - if (args.lda < MAX(1,nrowa)) info = 9; - if (args.n < 0) info = 6; - if (args.m < 0) info = 5; - if (unit < 0) info = 4; - if (trans < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - } - - if (order == CblasRowMajor) { - args.m = n; - args.n = m; - - if (Side == CblasLeft) side = 1; - if (Side == CblasRight) side = 0; - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (Trans == CblasNoTrans) trans = 0; - if (Trans == CblasTrans) trans = 1; -#ifndef COMPLEX - if (Trans == CblasConjNoTrans) trans = 0; - if (Trans == CblasConjTrans) trans = 1; -#else - if (Trans == CblasConjNoTrans) trans = 2; - if (Trans == CblasConjTrans) trans = 3; -#endif - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - nrowa = args.m; - if (side & 1) nrowa = args.n; - - if (args.ldb < MAX(1,args.m)) info = 11; - if (args.lda < MAX(1,nrowa)) info = 9; - if (args.n < 0) info = 6; - if (args.m < 0) info = 5; - if (unit < 0) info = 4; - if (trans < 0) info = 3; - if (uplo < 0) info = 2; - if (side < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if ((args.m == 0) || (args.n == 0)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - buffer = (FLOAT *)blas_memory_alloc(0); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); - -#ifdef SMP - mode |= (trans << BLAS_TRANSA_SHIFT); - mode |= (side << BLAS_RSIDE_SHIFT); - - args.nthreads = num_cpu_avail(3); - - if (args.nthreads == 1) { -#endif - - (trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - if (!side) { - gemm_thread_n(mode, &args, NULL, NULL, trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit], sa, sb, args.nthreads); - } else { - gemm_thread_m(mode, &args, NULL, NULL, trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit], sa, sb, args.nthreads); - } - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, - (!side) ? args.m * (args.m + args.n) : args.n * (args.m + args.n), - (!side) ? args.m * args.m * args.n : args.m * args.n * args.n); - - IDEBUG_END; - - return; -} - diff --git a/interface/trsv.c b/interface/trsv.c deleted file mode 100644 index 8ef6998db..000000000 --- a/interface/trsv.c +++ /dev/null @@ -1,208 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTRSV " -#elif defined(DOUBLE) -#define ERROR_NAME "DTRSV " -#else -#define ERROR_NAME "STRSV " -#endif - -static int (*trsv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - qtrsv_NUU, qtrsv_NUN, qtrsv_NLU, qtrsv_NLN, - qtrsv_TUU, qtrsv_TUN, qtrsv_TLU, qtrsv_TLN, -#elif defined(DOUBLE) - dtrsv_NUU, dtrsv_NUN, dtrsv_NLU, dtrsv_NLN, - dtrsv_TUU, dtrsv_TUN, dtrsv_TLU, dtrsv_TLN, -#else - strsv_NUU, strsv_NUN, strsv_NLU, strsv_NLN, - strsv_TUU, strsv_TUN, strsv_TLU, strsv_TLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 0; - if (trans_arg == 'C') trans = 1; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 0; - if (TransA == CblasConjTrans) trans = 1; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 1; - if (TransA == CblasConjTrans) trans = 0; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (trsv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/trti2.c b/interface/trti2.c deleted file mode 100644 index e119b45af..000000000 --- a/interface/trti2.c +++ /dev/null @@ -1,134 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTRTI2" -#elif defined(DOUBLE) -#define ERROR_NAME "DTRTI2" -#else -#define ERROR_NAME "STRTI2" -#endif - -static blasint (*trti2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifdef XDOUBLE - qtrti2_UU, qtrti2_UN, qtrti2_LU, qtrti2_LN, -#elif defined(DOUBLE) - dtrti2_UU, dtrti2_UN, dtrti2_LU, dtrti2_LN, -#else - strti2_UU, strti2_UN, strti2_LU, strti2_LN, -#endif - }; - -int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint diag_arg = *DIAG; - blasint uplo, diag; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - TOUPPER(diag_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - diag = -1; - if (diag_arg == 'U') diag = 0; - if (diag_arg == 'N') diag = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 5; - if (args.n < 0) info = 3; - if (diag < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (trti2[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); - - IDEBUG_END; - - return 0; -} diff --git a/interface/trtri.c b/interface/trtri.c deleted file mode 100644 index 5aa5e9b9b..000000000 --- a/interface/trtri.c +++ /dev/null @@ -1,156 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QTRTRI" -#elif defined(DOUBLE) -#define ERROR_NAME "DTRTRI" -#else -#define ERROR_NAME "STRTRI" -#endif - -static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, -}; - -#ifdef SMP -static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, -}; -#endif - - -int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint diag_arg = *DIAG; - blasint uplo, diag; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - TOUPPER(diag_arg); - - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - diag = -1; - if (diag_arg == 'U') diag = 0; - if (diag_arg == 'N') diag = 1; - - - info = 0; - if (args.lda < MAX(1,args.n)) info = 5; - if (args.n < 0) info = 3; - if (diag < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - if (diag) { - if (AMIN_K(args.n, args.a, args.lda + 1) == ZERO) { - *Info = IAMIN_K(args.n, args.a, args.lda + 1); - return 0; - } - } - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, - args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zaxpy.c b/interface/zaxpy.c deleted file mode 100644 index 9ed72efb9..000000000 --- a/interface/zaxpy.c +++ /dev/null @@ -1,127 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - blasint n = *N; - blasint incx = *INCX; - blasint incy = *INCY; - -#else - -void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - -#endif - - FLOAT alpha_r = *(ALPHA + 0); - FLOAT alpha_i = *(ALPHA + 1); - -#ifdef SMP - int mode, nthreads; -#endif - -#ifndef CBLAS - PRINT_DEBUG_CNAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (n <= 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx * 2; - if (incy < 0) y -= (n - 1) * incy * 2; - -#ifdef SMP - nthreads = num_cpu_avail(1); - - //disable multi-thread when incx==0 or incy==0 - //In that case, the threads would be dependent. - if (incx == 0 || incy == 0) - nthreads = 1; - - if (nthreads == 1) { -#endif - -#ifndef CONJ - AXPYU_K (n, 0, 0, alpha_r, alpha_i, x, incx, y, incy, NULL, 0); -#else - AXPYC_K(n, 0, 0, alpha_r, alpha_i, x, incx, y, incy, NULL, 0); -#endif - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif - - blas_level1_thread(mode, n, 0, 0, ALPHA, x, incx, y, incy, NULL, 0, -#ifndef CONJ - (void *)AXPYU_K, -#else - (void *)AXPYC_K, -#endif - nthreads); - } -#endif - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - - return; - -} diff --git a/interface/zdot.c b/interface/zdot.c deleted file mode 100644 index 1380ce292..000000000 --- a/interface/zdot.c +++ /dev/null @@ -1,202 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef RETURN_BY_STRUCT -#ifdef XDOUBLE -#define MYTYPE myxcomplex_t -#elif defined DOUBLE -#define MYTYPE myzcomplex_t -#else -#define MYTYPE myccomplex_t -#endif -#endif - -#ifndef CBLAS - -#ifdef RETURN_BY_STRUCT -MYTYPE NAME( blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { -#elif defined RETURN_BY_STACK -void NAME(FLOAT _Complex *result, blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { -#else -FLOAT _Complex NAME( blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { -#endif - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; -#ifndef RETURN_BY_STACK - FLOAT _Complex ret; -#endif -#ifdef RETURN_BY_STRUCT - MYTYPE myret; -#endif - - PRINT_DEBUG_NAME; - - if (n <= 0) { -#ifdef RETURN_BY_STRUCT - myret.r = 0.; - myret.i = 0.; - return myret; -#elif defined RETURN_BY_STACK - *result = ZERO; - return; -#else - return ZERO; -#endif - } - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx * 2; - if (incy < 0) y -= (n - 1) * incy * 2; - -#ifdef RETURN_BY_STRUCT - -#ifndef CONJ - ret = DOTU_K(n, x, incx, y, incy); -#else - ret = DOTC_K(n, x, incx, y, incy); -#endif - - myret.r = CREAL ret; - myret.i = CIMAG ret; - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - - return myret; - -#elif defined RETURN_BY_STACK - -#ifndef CONJ - *result = DOTU_K(n, x, incx, y, incy); -#else - *result = DOTC_K(n, x, incx, y, incy); -#endif - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - -#else - -#ifndef CONJ - ret = DOTU_K(n, x, incx, y, incy); -#else - ret = DOTC_K(n, x, incx, y, incy); -#endif - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; - -#endif - -} - -#else - -#ifdef FORCE_USE_STACK -void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT _Complex *result){ -#else -FLOAT _Complex CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - - FLOAT _Complex ret; -#endif - - PRINT_DEBUG_CNAME; - - if (n <= 0) { -#ifdef FORCE_USE_STACK - *result = ZERO; - return; -#else - return ZERO; -#endif - } - - if (incx < 0) x -= (n - 1) * incx * 2; - if (incy < 0) y -= (n - 1) * incy * 2; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifdef FORCE_USE_STACK - -#ifndef CONJ - *result = DOTU_K(n, x, incx, y, incy); -#else - *result = DOTC_K(n, x, incx, y, incy); -#endif - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - -#else - -#ifndef CONJ - ret = DOTU_K(n, x, incx, y, incy); -#else - ret = DOTC_K(n, x, incx, y, incy); -#endif - - FUNCTION_PROFILE_END(4, 2 * n, 2 * n); - - IDEBUG_END; - - return ret; - -#endif - -} - -#endif diff --git a/interface/zgbmv.c b/interface/zgbmv.c deleted file mode 100644 index ae1fd24bf..000000000 --- a/interface/zgbmv.c +++ /dev/null @@ -1,271 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XGBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGBMV " -#else -#define ERROR_NAME "CGBMV " -#endif - -static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, - FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xgbmv_n, xgbmv_t, xgbmv_r, xgbmv_c, - xgbmv_o, xgbmv_u, xgbmv_s, xgbmv_d, -#elif defined(DOUBLE) - zgbmv_n, zgbmv_t, zgbmv_r, zgbmv_c, - zgbmv_o, zgbmv_u, zgbmv_s, zgbmv_d, -#else - cgbmv_n, cgbmv_t, cgbmv_r, cgbmv_c, - cgbmv_o, cgbmv_u, cgbmv_s, cgbmv_d, -#endif -}; - -#ifdef SMP -static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT *, - FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xgbmv_thread_n, xgbmv_thread_t, xgbmv_thread_r, xgbmv_thread_c, - xgbmv_thread_o, xgbmv_thread_u, xgbmv_thread_s, xgbmv_thread_d, -#elif defined(DOUBLE) - zgbmv_thread_n, zgbmv_thread_t, zgbmv_thread_r, zgbmv_thread_c, - zgbmv_thread_o, zgbmv_thread_u, zgbmv_thread_s, zgbmv_thread_d, -#else - cgbmv_thread_n, cgbmv_thread_t, cgbmv_thread_r, cgbmv_thread_c, - cgbmv_thread_o, cgbmv_thread_u, cgbmv_thread_s, cgbmv_thread_d, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *TRANS, blasint *M, blasint *N, - blasint *KU, blasint *KL, - FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, - FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char trans = *TRANS; - blasint m = *M; - blasint n = *N; - blasint ku = *KU; - blasint kl = *KL; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - - blasint info; - blasint lenx, leny; - blasint i; - - PRINT_DEBUG_NAME; - - TOUPPER(trans); - - info = 0; - - i = -1; - - if (trans == 'N') i = 0; - if (trans == 'T') i = 1; - if (trans == 'R') i = 2; - if (trans == 'C') i = 3; - if (trans == 'O') i = 4; - if (trans == 'U') i = 5; - if (trans == 'S') i = 6; - if (trans == 'D') i = 7; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (i < 0) info = 1; - - trans = i; - - if (info != 0){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_TRANSPOSE TransA, - blasint m, blasint n, - blasint ku, blasint kl, - FLOAT *ALPHA, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT *BETA, - FLOAT *y, blasint incy){ - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - - FLOAT *buffer; - blasint lenx, leny; - int trans; - blasint info, t; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - info = -1; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - info = -1; - - t = n; - n = m; - m = t; - - t = ku; - ku = kl; - kl = t; - - if (incy == 0) info = 13; - if (incx == 0) info = 10; - if (lda < kl + ku + 1) info = 8; - if (kl < 0) info = 5; - if (ku < 0) info = 4; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if ((m==0) || (n==0)) return; - - lenx = n; - leny = m; - if (trans & 1) lenx = m; - if (trans & 1) leny = n; - - if (beta_r != ONE || beta_i != ZERO) SCAL_K(leny, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha_r == ZERO && alpha_i == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (lenx - 1) * incx * 2; - if (incy < 0) y -= (leny - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (gbmv[(int)trans])(m, n, kl, ku, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - - } else { - - (gbmv_thread[(int)trans])(m, n, kl, ku, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, m * n / 2 + n, m * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zgemv.c b/interface/zgemv.c deleted file mode 100644 index fb4784202..000000000 --- a/interface/zgemv.c +++ /dev/null @@ -1,259 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XGEMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGEMV " -#else -#define ERROR_NAME "CGEMV " -#endif - -#ifdef SMP -static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xgemv_thread_n, xgemv_thread_t, xgemv_thread_r, xgemv_thread_c, xgemv_thread_o, xgemv_thread_u, xgemv_thread_s, xgemv_thread_d, -#elif defined DOUBLE - zgemv_thread_n, zgemv_thread_t, zgemv_thread_r, zgemv_thread_c, zgemv_thread_o, zgemv_thread_u, zgemv_thread_s, zgemv_thread_d, -#else - cgemv_thread_n, cgemv_thread_t, cgemv_thread_r, cgemv_thread_c, cgemv_thread_o, cgemv_thread_u, cgemv_thread_s, cgemv_thread_d, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *TRANS, blasint *M, blasint *N, - FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, - FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char trans = *TRANS; - blasint m = *M; - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, - FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - GEMV_N, GEMV_T, GEMV_R, GEMV_C, - GEMV_O, GEMV_U, GEMV_S, GEMV_D, - }; - - blasint info; - blasint lenx, leny; - blasint i; - - PRINT_DEBUG_NAME; - - FLOAT alpha_r = *(ALPHA + 0); - FLOAT alpha_i = *(ALPHA + 1); - - FLOAT beta_r = *(BETA + 0); - FLOAT beta_i = *(BETA + 1); - - TOUPPER(trans); - - info = 0; - - i = -1; - - if (trans == 'N') i = 0; - if (trans == 'T') i = 1; - if (trans == 'R') i = 2; - if (trans == 'C') i = 3; - if (trans == 'O') i = 4; - if (trans == 'U') i = 5; - if (trans == 'S') i = 6; - if (trans == 'D') i = 7; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1,m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (i < 0) info = 1; - - trans = i; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_TRANSPOSE TransA, - blasint m, blasint n, - FLOAT *ALPHA, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT *BETA, - FLOAT *y, blasint incy){ - - FLOAT *buffer; - blasint lenx, leny; - int trans; - blasint info, t; -#ifdef SMP - int nthreads; -#endif - - int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, - FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - GEMV_N, GEMV_T, GEMV_R, GEMV_C, - GEMV_O, GEMV_U, GEMV_S, GEMV_D, - }; - - PRINT_DEBUG_CNAME; - - FLOAT alpha_r = *(ALPHA + 0); - FLOAT alpha_i = *(ALPHA + 1); - - FLOAT beta_r = *(BETA + 0); - FLOAT beta_i = *(BETA + 1); - - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1, m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - - } - - if (order == CblasRowMajor) { - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - info = -1; - - t = n; - n = m; - m = t; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < MAX(1, m)) info = 6; - if (n < 0) info = 3; - if (m < 0) info = 2; - if (trans < 0) info = 1; - - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - /* Quick return if possible. */ - - if (m == 0 || n == 0) return; - - lenx = n; - leny = m; - - if (trans & 1) lenx = m; - if (trans & 1) leny = n; - - if (beta_r != ONE || beta_i != ZERO) SCAL_K(leny, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); - - if (alpha_r == ZERO && alpha_i == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (lenx - 1) * incx * 2; - if (incy < 0) y -= (leny - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (gemv[(int)trans])(m, n, 0, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - - } else { - - (gemv_thread[(int)trans])(m, n, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, m * n + m + n, 2 * m * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zger.c b/interface/zger.c deleted file mode 100644 index ad52f40bb..000000000 --- a/interface/zger.c +++ /dev/null @@ -1,249 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#ifndef CONJ -#define ERROR_NAME "XGERU " -#else -#define ERROR_NAME "XGERC " -#endif -#elif defined DOUBLE -#ifndef CONJ -#define ERROR_NAME "ZGERU " -#else -#define ERROR_NAME "ZGERC " -#endif -#else -#ifndef CONJ -#define ERROR_NAME "CGERU " -#else -#define ERROR_NAME "CGERC " -#endif -#endif - -#if defined XDOUBLE -#ifndef CONJ -#define GER GERU_K -#define GER_THREAD xger_thread_U -#else -#define GER GERC_K -#define GER_THREAD xger_thread_C -#define GERV GERV_K -#define GERV_THREAD xger_thread_V -#endif -#elif defined DOUBLE -#ifndef CONJ -#define GER GERU_K -#define GER_THREAD zger_thread_U -#else -#define GER GERC_K -#define GER_THREAD zger_thread_C -#define GERV GERV_K -#define GERV_THREAD zger_thread_V -#endif -#else -#ifndef CONJ -#define GER GERU_K -#define GER_THREAD cger_thread_U -#else -#define GER GERC_K -#define GER_THREAD cger_thread_C -#define GERV GERV_K -#define GERV_THREAD cger_thread_V -#endif -#endif - -#ifndef CBLAS - -void NAME(blasint *M, blasint *N, FLOAT *Alpha, - FLOAT *x, blasint *INCX, - FLOAT *y, blasint *INCY, - FLOAT *a, blasint *LDA){ - - blasint m = *M; - blasint n = *N; - FLOAT alpha_r = Alpha[0]; - FLOAT alpha_i = Alpha[1]; - blasint incx = *INCX; - blasint incy = *INCY; - blasint lda = *LDA; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - blasint info; - - PRINT_DEBUG_NAME; - - info = 0; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - - if (info){ - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - blasint m, blasint n, - FLOAT *Alpha, - FLOAT *x, blasint incx, - FLOAT *y, blasint incy, - FLOAT *a, blasint lda) { - - FLOAT alpha_r = Alpha[0]; - FLOAT alpha_i = Alpha[1]; - - FLOAT *buffer; - blasint info, t; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - info = 0; - - if (order == CblasColMajor) { - info = -1; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - } - - if (order == CblasRowMajor) { - info = -1; - - t = n; - n = m; - m = t; - - t = incx; - incx = incy; - incy = t; - - buffer = x; - x = y; - y = buffer; - - if (lda < MAX(1,m)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (m < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - /* Quick return if possible. */ - if (m == 0 || n == 0) return; - - if ((alpha_r == 0.) && (alpha_i == 0.)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incy < 0) y -= (n - 1) * incy * 2; - if (incx < 0) x -= (m - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - -#if !defined(CBLAS) || !defined(CONJ) - GER(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); -#else - if (order == CblasColMajor) { - GER(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); - } else { - GERV(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); - } -#endif - -#ifdef SMP - - } else { - -#if !defined(CBLAS) || !defined(CONJ) - GER_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); -#else - if (order == CblasColMajor) { - GER_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); - } else { - GERV_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); - } -#endif - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, m * n + m + n, 2 * m * n); - - IDEBUG_END; - - return; - -} diff --git a/interface/zgetf2.c b/interface/zgetf2.c deleted file mode 100644 index 950ef46e9..000000000 --- a/interface/zgetf2.c +++ /dev/null @@ -1,109 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XGETF2" -#elif defined(DOUBLE) -#define ERROR_NAME "ZGETF2" -#else -#define ERROR_NAME "CGETF2" -#endif - -int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - args.c = (void *)ipiv; - - info = 0; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = GETF2(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zgetrf.c b/interface/zgetrf.c deleted file mode 100644 index 9f041d9bd..000000000 --- a/interface/zgetrf.c +++ /dev/null @@ -1,122 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XGETRF" -#elif defined(DOUBLE) -#define ERROR_NAME "ZGETRF" -#else -#define ERROR_NAME "CGETRF" -#endif - -int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *M; - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - args.c = (void *)ipiv; - - info = 0; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zgetrs.c b/interface/zgetrs.c deleted file mode 100644 index 81d50e34f..000000000 --- a/interface/zgetrs.c +++ /dev/null @@ -1,153 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XGETRS" -#elif defined(DOUBLE) -#define ERROR_NAME "ZGETRS" -#else -#define ERROR_NAME "CGETRS" -#endif - -static blasint (*getrs_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - GETRS_N_SINGLE, GETRS_T_SINGLE, GETRS_R_SINGLE, GETRS_C_SINGLE, -}; - -#ifdef SMP -static blasint (*getrs_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - GETRS_N_PARALLEL, GETRS_T_PARALLEL, GETRS_R_PARALLEL, GETRS_C_PARALLEL, -}; -#endif - -int NAME(char *TRANS, blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, - blasint *ipiv, FLOAT *b, blasint *ldB, blasint *Info){ - - char trans_arg = *TRANS; - - blas_arg_t args; - - blasint info; - int trans; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *N; - args.n = *NRHS; - args.a = (void *)a; - args.lda = *ldA; - args.b = (void *)b; - args.ldb = *ldB; - args.c = (void *)ipiv; - - info = 0; - - TOUPPER(trans_arg); - trans = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (args.ldb < MAX(1, args.m)) info = 8; - if (args.lda < MAX(1, args.m)) info = 5; - if (args.n < 0) info = 3; - if (args.m < 0) info = 2; - if (trans < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return 0; - } - - args.alpha = NULL; - args.beta = NULL; - - *Info = info; - - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - (getrs_single[trans])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - (getrs_parallel[trans])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2 * args.m * args.m * args.n); - - IDEBUG_END; - - return 0; - -} diff --git a/interface/zhbmv.c b/interface/zhbmv.c deleted file mode 100644 index c14ad9859..000000000 --- a/interface/zhbmv.c +++ /dev/null @@ -1,223 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHBMV " -#else -#define ERROR_NAME "CHBMV " -#endif - -static int (*hbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xhbmv_U, xhbmv_L, xhbmv_V, xhbmv_M, -#elif defined(DOUBLE) - zhbmv_U, zhbmv_L, zhbmv_V, zhbmv_M, -#else - chbmv_U, chbmv_L, chbmv_V, chbmv_M, -#endif -}; - -#ifdef SMP -static int (*hbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xhbmv_thread_U, xhbmv_thread_L, xhbmv_thread_V, xhbmv_thread_M, -#elif defined(DOUBLE) - zhbmv_thread_U, zhbmv_thread_L, zhbmv_thread_V, zhbmv_thread_M, -#else - chbmv_thread_U, chbmv_thread_L, chbmv_thread_V, chbmv_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - blasint k = *K; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - if (uplo_arg == 'V') uplo = 2; - if (uplo_arg == 'M') uplo = 3; - - info = 0; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, blasint k, - FLOAT *ALPHA, - FLOAT *a, blasint lda, - FLOAT *x, blasint incx, - FLOAT *BETA, - FLOAT *y, blasint incy){ - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * COMPSIZE; - if (incy < 0 ) y -= (n - 1) * incy * COMPSIZE; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (hbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (hbmv_thread[uplo])(n, k, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/zhemv.c b/interface/zhemv.c deleted file mode 100644 index 3cba445c2..000000000 --- a/interface/zhemv.c +++ /dev/null @@ -1,215 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHEMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHEMV " -#else -#define ERROR_NAME "CHEMV " -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; -#ifdef SMP - int nthreads; -#endif - - int (*hemv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - HEMV_U, HEMV_L, HEMV_V, HEMV_M, - }; - -#ifdef SMP - int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { - HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, - }; -#endif - - blasint info; - int uplo; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - if (uplo_arg == 'V') uplo = 2; - if (uplo_arg == 'M') uplo = 3; - - info = 0; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA, - FLOAT *a, blasint lda, FLOAT *x, blasint incx, FLOAT *BETA, FLOAT *y, blasint incy) { - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - int (*hemv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - HEMV_U, HEMV_L, HEMV_V, HEMV_M, - }; - -#ifdef SMP - int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { - HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, - }; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - if (incy < 0 ) y -= (n - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (hemv[uplo])(n, n, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (hemv_thread[uplo])(n, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zher.c b/interface/zher.c deleted file mode 100644 index ad982dd68..000000000 --- a/interface/zher.c +++ /dev/null @@ -1,200 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHER " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHER " -#else -#define ERROR_NAME "CHER " -#endif - -static int (*her[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - xher_U, xher_L, xher_V, xher_M, -#elif defined(DOUBLE) - zher_U, zher_L, zher_V, zher_M, -#else - cher_U, cher_L, cher_V, cher_M, -#endif -}; - -#ifdef SMP -static int (*her_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xher_thread_U, xher_thread_L, xher_thread_V, xher_thread_M, -#elif defined(DOUBLE) - zher_thread_U, zher_thread_L, zher_thread_V, zher_thread_M, -#else - cher_thread_U, cher_thread_L, cher_thread_V, cher_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *a, blasint lda) { - - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (her[uplo])(n, alpha, x, incx, a, lda, buffer); - -#ifdef SMP - } else { - - (her_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zher2.c b/interface/zher2.c deleted file mode 100644 index 88fececf7..000000000 --- a/interface/zher2.c +++ /dev/null @@ -1,207 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHER2 " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHER2 " -#else -#define ERROR_NAME "CHER2 " -#endif - -static int (*her2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - xher2_U, xher2_L, xher2_V, xher2_M, -#elif defined(DOUBLE) - zher2_U, zher2_L, zher2_V, zher2_M, -#else - cher2_U, cher2_L, cher2_V, cher2_M, -#endif -}; - -#ifdef SMP -static int (*her2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xher2_thread_U, xher2_thread_L, xher2_thread_V, xher2_thread_M, -#elif defined(DOUBLE) - zher2_thread_U, zher2_thread_L, zher2_thread_V, zher2_thread_M, -#else - cher2_thread_U, cher2_thread_L, cher2_thread_V, cher2_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT *a, blasint lda) { - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (lda < MAX(1, n)) info = 9; - if (incx == 0) info = 7; - if (incy == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - if (incy < 0 ) y -= (n - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (her2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); - -#ifdef SMP - } else { - - (her2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zhpmv.c b/interface/zhpmv.c deleted file mode 100644 index d7013e668..000000000 --- a/interface/zhpmv.c +++ /dev/null @@ -1,213 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHPMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHPMV " -#else -#define ERROR_NAME "CHPMV " -#endif - -static int (*hpmv[])(BLASLONG, FLOAT, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xhpmv_U, xhpmv_L, xhpmv_V, xhpmv_M, -#elif defined(DOUBLE) - zhpmv_U, zhpmv_L, zhpmv_V, zhpmv_M, -#else - chpmv_U, chpmv_L, chpmv_V, chpmv_M, -#endif -}; - -#ifdef SMP -static int (*hpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xhpmv_thread_U, xhpmv_thread_L, xhpmv_thread_V, xhpmv_thread_M, -#elif defined(DOUBLE) - zhpmv_thread_U, zhpmv_thread_L, zhpmv_thread_V, zhpmv_thread_M, -#else - chpmv_thread_U, chpmv_thread_L, chpmv_thread_V, chpmv_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, - FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT *ALPHA, - FLOAT *a, - FLOAT *x, blasint incx, - FLOAT *BETA, - FLOAT *y, blasint incy){ - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - if (incy < 0 ) y -= (n - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (hpmv[uplo])(n, alpha_r, alpha_i, a, x, incx, y, incy, buffer); - -#ifdef SMP - } else { - - (hpmv_thread[uplo])(n, ALPHA, a, x, incx, y, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zhpr.c b/interface/zhpr.c deleted file mode 100644 index c48e35238..000000000 --- a/interface/zhpr.c +++ /dev/null @@ -1,198 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHPR " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHPR " -#else -#define ERROR_NAME "CHPR " -#endif - -static int (*hpr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - xhpr_U, xhpr_L, xhpr_V, xhpr_M, -#elif defined(DOUBLE) - zhpr_U, zhpr_L, zhpr_V, zhpr_M, -#else - chpr_U, chpr_L, chpr_V, chpr_M, -#endif -}; - -#ifdef SMP -static int (*hpr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - xhpr_thread_U, xhpr_thread_L, xhpr_thread_V, xhpr_thread_M, -#elif defined(DOUBLE) - zhpr_thread_U, zhpr_thread_L, zhpr_thread_V, zhpr_thread_M, -#else - chpr_thread_U, chpr_thread_L, chpr_thread_V, chpr_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha = *ALPHA; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT alpha, - FLOAT *x, blasint incx, - FLOAT *a) { - - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if (alpha == ZERO) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (hpr[uplo])(n, alpha, x, incx, a, buffer); - -#ifdef SMP - - } else { - - (hpr_thread[uplo])(n, alpha, x, incx, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zhpr2.c b/interface/zhpr2.c deleted file mode 100644 index cf1d5f9fc..000000000 --- a/interface/zhpr2.c +++ /dev/null @@ -1,207 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XHPR2 " -#elif defined(DOUBLE) -#define ERROR_NAME "ZHPR2 " -#else -#define ERROR_NAME "CHPR2 " -#endif - -static int (*hpr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - xhpr2_U, xhpr2_L, xhpr2_V, xhpr2_M, -#elif defined(DOUBLE) - zhpr2_U, zhpr2_L, zhpr2_V, zhpr2_M, -#else - chpr2_U, chpr2_L, chpr2_V, chpr2_M, -#endif -}; - -#ifdef SMP -static int (*hpr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - xhpr2_thread_U, xhpr2_thread_L, xhpr2_thread_V, xhpr2_thread_M, -#elif defined(DOUBLE) - zhpr2_thread_U, zhpr2_thread_L, zhpr2_thread_V, zhpr2_thread_M, -#else - chpr2_thread_U, chpr2_thread_L, chpr2_thread_V, chpr2_thread_M, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, - enum CBLAS_UPLO Uplo, - blasint n, - FLOAT *ALPHA, - FLOAT *x, blasint incx, - FLOAT *y, blasint incy, - FLOAT *a) { - - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - FLOAT *buffer; - int uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 3; - if (Uplo == CblasLower) uplo = 2; - - info = -1; - - if (incx == 0) info = 7; - if (incy == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - if (incy < 0 ) y -= (n - 1) * incy * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (hpr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); - -#ifdef SMP - } else { - - (hpr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zlaswp.c b/interface/zlaswp.c deleted file mode 100644 index 85ead2c86..000000000 --- a/interface/zlaswp.c +++ /dev/null @@ -1,108 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -static int (*laswp[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, blasint *, BLASLONG) = { -#ifdef XDOUBLE - xlaswp_plus, xlaswp_minus, -#elif defined(DOUBLE) - zlaswp_plus, zlaswp_minus, -#else - claswp_plus, claswp_minus, -#endif -}; - -int NAME(blasint *N, FLOAT *a, blasint *LDA, blasint *K1, blasint *K2, blasint *ipiv, blasint *INCX){ - - blasint n = *N; - blasint lda = *LDA; - blasint k1 = *K1; - blasint k2 = *K2; - blasint incx = *INCX; - int flag; - -#ifdef SMP - int mode; - FLOAT dummyalpha[2] = {ZERO, ZERO}; - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - if (incx == 0 || n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - flag = (incx < 0); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (laswp[flag])(n, k1, k2, ZERO, ZERO, a, lda, NULL, 0, ipiv, incx); - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif - - blas_level1_thread(mode, n, k1, k2, dummyalpha, a, lda, NULL, 0, ipiv, incx, laswp[flag], nthreads); - } -#endif - - FUNCTION_PROFILE_END(COMPSIZE, n * (k2 - k1), 0); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zlauu2.c b/interface/zlauu2.c deleted file mode 100644 index 05603fe1b..000000000 --- a/interface/zlauu2.c +++ /dev/null @@ -1,129 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QLAUU2" -#elif defined(DOUBLE) -#define ERROR_NAME "ZLAUU2" -#else -#define ERROR_NAME "CLAUU2" -#endif - -static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - -#ifdef XDOUBLE - xlauu2_U, xlauu2_L, -#elif defined(DOUBLE) - zlauu2_U, zlauu2_L, -#else - clauu2_U, clauu2_L, -#endif - }; - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zlauum.c b/interface/zlauum.c deleted file mode 100644 index 23990e8e4..000000000 --- a/interface/zlauum.c +++ /dev/null @@ -1,141 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XLAUUM" -#elif defined(DOUBLE) -#define ERROR_NAME "ZLAUUM" -#else -#define ERROR_NAME "CLAUUM" -#endif - -static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_SINGLE, LAUUM_L_SINGLE, -}; - -#ifdef SMP -static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zpotf2.c b/interface/zpotf2.c deleted file mode 100644 index f8f81e2c5..000000000 --- a/interface/zpotf2.c +++ /dev/null @@ -1,129 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XPOTF2" -#elif defined(DOUBLE) -#define ERROR_NAME "ZPOTF2" -#else -#define ERROR_NAME "CPOTF2" -#endif - -static blasint (*potf2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - -#ifdef XDOUBLE - xpotf2_U, xpotf2_L, -#elif defined(DOUBLE) - zpotf2_U, zpotf2_L, -#else - cpotf2_U, cpotf2_L, -#endif - }; - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (potf2[uplo])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zpotrf.c b/interface/zpotrf.c deleted file mode 100644 index e2004d744..000000000 --- a/interface/zpotrf.c +++ /dev/null @@ -1,141 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XPOTRF" -#elif defined(DOUBLE) -#define ERROR_NAME "ZPOTRF" -#else -#define ERROR_NAME "CPOTRF" -#endif - -static blasint (*potrf_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - POTRF_U_SINGLE, POTRF_L_SINGLE, -}; - -#ifdef SMP -static blasint (*potrf_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - POTRF_U_PARALLEL, POTRF_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (potrf_single[uplo])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = (potrf_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zpotri.c b/interface/zpotri.c deleted file mode 100644 index df325424e..000000000 --- a/interface/zpotri.c +++ /dev/null @@ -1,157 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XPOTRI" -#elif defined(DOUBLE) -#define ERROR_NAME "ZPOTRI" -#else -#define ERROR_NAME "CPOTRI" -#endif - -static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UN_SINGLE, TRTRI_LN_SINGLE, -}; - -static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - LAUUM_U_SINGLE, LAUUM_L_SINGLE, -}; - -#ifdef SMP -static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UN_PARALLEL, TRTRI_LN_PARALLEL, -}; - -static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - info = (trtri_single[uplo])(&args, NULL, NULL, sa, sb, 0); - - if (!info) { - info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); - } - - *Info = info; - -#ifdef SMP - } else { - info = (trtri_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - - if (!info) { - info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - } - - *Info = info; - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} diff --git a/interface/zrot.c b/interface/zrot.c deleted file mode 100644 index f18bbc6d1..000000000 --- a/interface/zrot.c +++ /dev/null @@ -1,72 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *C, FLOAT *S){ - - BLASLONG n = *N; - BLASLONG incx = *INCX; - BLASLONG incy = *INCY; - FLOAT c = *C; - FLOAT s = *S; - - PRINT_DEBUG_NAME; - - if (n <= 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * 2 * incx; - if (incy < 0) y -= (n - 1) * 2 * incy; - - ROT_K(n, x, incx, y, incy, c, s); - - FUNCTION_PROFILE_END(4, n, n); - - IDEBUG_END; - - return; - -} diff --git a/interface/zrotg.c b/interface/zrotg.c deleted file mode 100644 index e9e8a11df..000000000 --- a/interface/zrotg.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ - - PRINT_DEBUG_NAME; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) - - long double da_r = *(DA + 0); - long double da_i = *(DA + 1); - long double db_r = *(DB + 0); - long double db_i = *(DB + 1); - long double r; - - long double ada = fabs(da_r) + fabs(da_i); - - if (ada == ZERO) { - *C = ZERO; - *(S + 0) = ONE; - *(S + 1) = ZERO; - *(DA + 0) = db_r; - *(DA + 1) = db_i; - } else { - long double alpha_r, alpha_i; - - ada = sqrt(da_r * da_r + da_i * da_i); - - r = sqrt(da_r * da_r + da_i * da_i + db_r * db_r + db_i * db_i); - - alpha_r = da_r / ada; - alpha_i = da_i / ada; - - *(C + 0) = ada / r; - *(S + 0) = (alpha_r * db_r + alpha_i *db_i) / r; - *(S + 1) = (alpha_i * db_r - alpha_r *db_i) / r; - *(DA + 0) = alpha_r * r; - *(DA + 1) = alpha_i * r; - } -#else - FLOAT da_r = *(DA + 0); - FLOAT da_i = *(DA + 1); - FLOAT db_r = *(DB + 0); - FLOAT db_i = *(DB + 1); - FLOAT r; - - FLOAT ada = fabs(da_r) + fabs(da_i); - FLOAT adb; - - if (ada == ZERO) { - *C = ZERO; - *(S + 0) = ONE; - *(S + 1) = ZERO; - *(DA + 0) = db_r; - *(DA + 1) = db_i; - } else { - FLOAT scale; - FLOAT aa_r, aa_i, bb_r, bb_i; - FLOAT alpha_r, alpha_i; - - aa_r = fabs(da_r); - aa_i = fabs(da_i); - - if (aa_i > aa_r) { - aa_r = fabs(da_i); - aa_i = fabs(da_r); - } - - scale = (aa_i / aa_r); - ada = aa_r * sqrt(ONE + scale * scale); - - bb_r = fabs(db_r); - bb_i = fabs(db_i); - - if (bb_i > bb_r) { - bb_r = fabs(bb_i); - bb_i = fabs(bb_r); - } - - scale = (bb_i / bb_r); - adb = bb_r * sqrt(ONE + scale * scale); - - scale = ada + adb; - - aa_r = da_r / scale; - aa_i = da_i / scale; - bb_r = db_r / scale; - bb_i = db_i / scale; - - r = scale * sqrt(aa_r * aa_r + aa_i * aa_i + bb_r * bb_r + bb_i * bb_i); - - alpha_r = da_r / ada; - alpha_i = da_i / ada; - - *(C + 0) = ada / r; - *(S + 0) = (alpha_r * db_r + alpha_i *db_i) / r; - *(S + 1) = (alpha_i * db_r - alpha_r *db_i) / r; - *(DA + 0) = alpha_r * r; - *(DA + 1) = alpha_i * r; - } -#endif - - FUNCTION_PROFILE_END(4, 4, 4); - - IDEBUG_END; - - return; -} diff --git a/interface/zsbmv.c b/interface/zsbmv.c deleted file mode 100644 index 71c03a660..000000000 --- a/interface/zsbmv.c +++ /dev/null @@ -1,157 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XSBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSBMV " -#else -#define ERROR_NAME "CSBMV " -#endif - -static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xsbmv_U, xsbmv_L, -#elif defined(DOUBLE) - zsbmv_U, zsbmv_L, -#else - csbmv_U, csbmv_L, -#endif -}; - -#ifdef SMP -static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xsbmv_thread_U, xsbmv_thread_L, -#elif defined(DOUBLE) - zsbmv_thread_U, zsbmv_thread_L, -#else - csbmv_thread_U, csbmv_thread_L, -#endif -}; -#endif - -void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - blasint k = *K; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 11; - if (incx == 0) info = 8; - if (lda < k + 1) info = 6; - if (k < 0) info = 3; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; - if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (sbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); - -#ifdef SMP - } else { - - (sbmv_thread[uplo])(n, k, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/zscal.c b/interface/zscal.c deleted file mode 100644 index ad99874dc..000000000 --- a/interface/zscal.c +++ /dev/null @@ -1,117 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX){ - - blasint n = *N; - blasint incx = *INCX; - -#ifndef SSCAL - FLOAT *alpha=ALPHA; -#else - FLOAT alpha[2] = {ALPHA[0], ZERO}; -#endif - -#else - -#ifndef SSCAL -void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx){ - - FLOAT *alpha=ALPHA; -#else -void CNAME(blasint n, FLOAT alpha_r, FLOAT *x, blasint incx){ - - FLOAT alpha[2] = {alpha_r, ZERO}; -#endif -#endif - -#ifdef SMP - int mode; - int nthreads; -#endif - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (incx <= 0 || n <= 0) return; - - if ((alpha[0] == ONE) && (alpha[1] == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifdef SMP - nthreads = num_cpu_avail(1); - - if (nthreads == 1) { -#endif - - SCAL_K(n, 0, 0, alpha[0], alpha[1], x, incx, NULL, 0, NULL, 0); - -#ifdef SMP - } else { -#ifdef DOUBLE - mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif - - blas_level1_thread(mode, n, 0, 0, alpha, x, incx, NULL, 0, NULL, 0, (void *)SCAL_K, nthreads); - - } -#endif - - FUNCTION_PROFILE_END(4, n, n); - - IDEBUG_END; - - return; - -} diff --git a/interface/zspmv.c b/interface/zspmv.c deleted file mode 100644 index ecf1af586..000000000 --- a/interface/zspmv.c +++ /dev/null @@ -1,154 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "ZSPMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSPMV " -#else -#define ERROR_NAME "CSPMV " -#endif - -static int (*spmv[])(BLASLONG, FLOAT, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xspmv_U, xspmv_L, -#elif defined(DOUBLE) - zspmv_U, zspmv_L, -#else - cspmv_U, cspmv_L, -#endif -}; - -#ifdef SMP -static int (*spmv_thread[])(BLASLONG, FLOAT *, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xspmv_thread_U, xspmv_thread_L, -#elif defined(DOUBLE) - zspmv_thread_U, zspmv_thread_L, -#else - cspmv_thread_U, cspmv_thread_L, -#endif -}; -#endif - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, - FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 9; - if (incx == 0) info = 6; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; - if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spmv[uplo])(n, alpha_r, alpha_i, a, b, incx, c, incy, buffer); - -#ifdef SMP - - } else { - - (spmv_thread[uplo])(n, ALPHA, a, b, incx, c, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zspr.c b/interface/zspr.c deleted file mode 100644 index 0021bcda4..000000000 --- a/interface/zspr.c +++ /dev/null @@ -1,146 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XSPR " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSPR " -#else -#define ERROR_NAME "CSPR " -#endif - -static int (*spr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - xspr_U, xspr_L, -#elif defined(DOUBLE) - zspr_U, zspr_L, -#else - cspr_U, cspr_L, -#endif -}; - -#ifdef SMP -static int (*spr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - xspr_thread_U, xspr_thread_L, -#elif defined(DOUBLE) - zspr_thread_U, zspr_thread_L, -#else - cspr_thread_U, cspr_thread_L, -#endif -}; -#endif - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spr[uplo])(n, alpha_r, alpha_i, x, incx, a, buffer); - -#ifdef SMP - } else { - - (spr_thread[uplo])(n, ALPHA, x, incx, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zspr2.c b/interface/zspr2.c deleted file mode 100644 index b54e1651a..000000000 --- a/interface/zspr2.c +++ /dev/null @@ -1,149 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XSPR2 " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSPR2 " -#else -#define ERROR_NAME "CSPR2 " -#endif - -static int (*spr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { -#ifdef XDOUBLE - xspr2_U, xspr2_L, -#elif defined(DOUBLE) - zspr2_U, zspr2_L, -#else - cspr2_U, cspr2_L, -#endif -}; - -#ifdef SMP -static int (*spr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { -#ifdef XDOUBLE - xspr2_thread_U, xspr2_thread_L, -#elif defined(DOUBLE) - zspr2_thread_U, zspr2_thread_L, -#else - cspr2_thread_U, cspr2_thread_L, -#endif -}; -#endif - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (spr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); - -#ifdef SMP - } else { - - (spr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zswap.c b/interface/zswap.c deleted file mode 100644 index 06a889204..000000000 --- a/interface/zswap.c +++ /dev/null @@ -1,116 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef CBLAS - -void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ - - blasint n = *N; - blasint incx = *INCX; - blasint incy = *INCY; - -#else - -void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ - -#endif - -#ifdef SMP - int mode; - FLOAT dummyalpha[2] = {ZERO, ZERO}; - int nthreads; -#endif - -#ifndef CBLAS - PRINT_DEBUG_NAME; -#else - PRINT_DEBUG_CNAME; -#endif - - if (n <= 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0) x -= (n - 1) * incx * 2; - if (incy < 0) y -= (n - 1) * incy * 2; - -#ifdef SMP - nthreads = num_cpu_avail(1); - - //disable multi-thread when incx==0 or incy==0 - //In that case, the threads would be dependent. - if (incx == 0 || incy == 0) - nthreads = 1; - - if (nthreads == 1) { -#endif - - SWAP_K(n, 0, 0, ZERO, ZERO, x, incx, y, incy, NULL, 0); - -#ifdef SMP - } else { - -#ifdef XDOUBLE - mode = BLAS_XDOUBLE | BLAS_COMPLEX; -#elif defined(DOUBLE) - mode = BLAS_DOUBLE | BLAS_COMPLEX; -#else - mode = BLAS_SINGLE | BLAS_COMPLEX; -#endif - - blas_level1_thread(mode, n, 0, 0, dummyalpha, - x, incx, y, incy, NULL, 0, (void *)SWAP_K, nthreads); - - } -#endif - - FUNCTION_PROFILE_END(2, 2 * n, 0); - - IDEBUG_END; - - return; - -} diff --git a/interface/zsymv.c b/interface/zsymv.c deleted file mode 100644 index afb2c1734..000000000 --- a/interface/zsymv.c +++ /dev/null @@ -1,143 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XSYMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYMV " -#else -#define ERROR_NAME "CSYMV " -#endif - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, - FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - FLOAT beta_r = BETA[0]; - FLOAT beta_i = BETA[1]; - blasint incy = *INCY; - - int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { - SYMV_U, SYMV_L, - }; - -#ifdef SMP - int (*symv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { - SYMV_THREAD_U, SYMV_THREAD_L, - }; -#endif - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incy == 0) info = 10; - if (incx == 0) info = 7; - if (lda < MAX(1, n)) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; - if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (symv[uplo])(n, n, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); - -#ifdef SMP - } else { - - (symv_thread[uplo])(n, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zsyr.c b/interface/zsyr.c deleted file mode 100644 index b6b5202ec..000000000 --- a/interface/zsyr.c +++ /dev/null @@ -1,203 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XSYR " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYR " -#else -#define ERROR_NAME "CSYR " -#endif - -static int (*syr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - xsyr_U, xsyr_L, -#elif defined(DOUBLE) - zsyr_U, zsyr_L, -#else - csyr_U, csyr_L, -#endif -}; - -#ifdef SMP -static int (*syr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xsyr_thread_U, xsyr_thread_L, -#elif defined(DOUBLE) - zsyr_thread_U, zsyr_thread_L, -#else - csyr_thread_U, csyr_thread_L, -#endif -}; -#endif - - -#ifndef CBLAS - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLOAT *x, int incx, FLOAT *a, int lda) { - - FLOAT *buffer; - int trans, uplo; - blasint info; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - trans = -1; - uplo = -1; - info = 0; - - if (order == CblasColMajor) { - - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - } - - if (order == CblasRowMajor) { - - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - info = -1; - - if (lda < MAX(1, n)) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (syr[uplo])(n, alpha_r, alpha_i, x, incx, a, lda, buffer); - -#ifdef SMP - } else { - - (syr_thread[uplo])(n, ALPHA, x, incx, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/zsyr2.c b/interface/zsyr2.c deleted file mode 100644 index 0c705cb12..000000000 --- a/interface/zsyr2.c +++ /dev/null @@ -1,151 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QSYR2 " -#elif defined(DOUBLE) -#define ERROR_NAME "ZSYR2 " -#else -#define ERROR_NAME "CSYR2 " -#endif - -static int (*syr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - xsyr2_U, xsyr2_L, -#elif defined(DOUBLE) - zsyr2_U, zsyr2_L, -#else - csyr2_U, csyr2_L, -#endif -}; - -#ifdef SMP -static int (*syr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xsyr2_thread_U, xsyr2_thread_L, -#elif defined(DOUBLE) - zsyr2_thread_U, zsyr2_thread_L, -#else - csyr2_thread_U, csyr2_thread_L, -#endif -}; -#endif - -void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, - FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ - - char uplo_arg = *UPLO; - blasint n = *N; - FLOAT alpha_r = ALPHA[0]; - FLOAT alpha_i = ALPHA[1]; - blasint lda = *LDA; - blasint incx = *INCX; - blasint incy = *INCY; - - blasint info; - int uplo; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - uplo = -1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (lda < MAX(1, n)) info = 9; - if (incy == 0) info = 7; - if (incx == 0) info = 5; - if (n < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - if (n == 0) return; - - if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx; - if (incy < 0 ) y -= (n - 1) * incy; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (syr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); - -#ifdef SMP - } else { - - (syr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/ztbmv.c b/interface/ztbmv.c deleted file mode 100644 index 85f53c4be..000000000 --- a/interface/ztbmv.c +++ /dev/null @@ -1,260 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTBMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTBMV " -#else -#define ERROR_NAME "CTBMV " -#endif - -static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xtbmv_NUU, xtbmv_NUN, xtbmv_NLU, xtbmv_NLN, - xtbmv_TUU, xtbmv_TUN, xtbmv_TLU, xtbmv_TLN, - xtbmv_RUU, xtbmv_RUN, xtbmv_RLU, xtbmv_RLN, - xtbmv_CUU, xtbmv_CUN, xtbmv_CLU, xtbmv_CLN, -#elif defined(DOUBLE) - ztbmv_NUU, ztbmv_NUN, ztbmv_NLU, ztbmv_NLN, - ztbmv_TUU, ztbmv_TUN, ztbmv_TLU, ztbmv_TLN, - ztbmv_RUU, ztbmv_RUN, ztbmv_RLU, ztbmv_RLN, - ztbmv_CUU, ztbmv_CUN, ztbmv_CLU, ztbmv_CLN, -#else - ctbmv_NUU, ctbmv_NUN, ctbmv_NLU, ctbmv_NLN, - ctbmv_TUU, ctbmv_TUN, ctbmv_TLU, ctbmv_TLN, - ctbmv_RUU, ctbmv_RUN, ctbmv_RLU, ctbmv_RLN, - ctbmv_CUU, ctbmv_CUN, ctbmv_CLU, ctbmv_CLN, -#endif -}; - -#ifdef SMP -static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xtbmv_thread_NUU, xtbmv_thread_NUN, xtbmv_thread_NLU, xtbmv_thread_NLN, - xtbmv_thread_TUU, xtbmv_thread_TUN, xtbmv_thread_TLU, xtbmv_thread_TLN, - xtbmv_thread_RUU, xtbmv_thread_RUN, xtbmv_thread_RLU, xtbmv_thread_RLN, - xtbmv_thread_CUU, xtbmv_thread_CUN, xtbmv_thread_CLU, xtbmv_thread_CLN, -#elif defined(DOUBLE) - ztbmv_thread_NUU, ztbmv_thread_NUN, ztbmv_thread_NLU, ztbmv_thread_NLN, - ztbmv_thread_TUU, ztbmv_thread_TUN, ztbmv_thread_TLU, ztbmv_thread_TLN, - ztbmv_thread_RUU, ztbmv_thread_RUN, ztbmv_thread_RLU, ztbmv_thread_RLN, - ztbmv_thread_CUU, ztbmv_thread_CUN, ztbmv_thread_CLU, ztbmv_thread_CLN, -#else - ctbmv_thread_NUU, ctbmv_thread_NUN, ctbmv_thread_NLU, ctbmv_thread_NLN, - ctbmv_thread_TUU, ctbmv_thread_TUN, ctbmv_thread_TLU, ctbmv_thread_TLN, - ctbmv_thread_RUU, ctbmv_thread_RUN, ctbmv_thread_RLU, ctbmv_thread_RLN, - ctbmv_thread_CUU, ctbmv_thread_CUN, ctbmv_thread_CLU, ctbmv_thread_CLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, blasint *K, - FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint k = *K; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); - -#ifdef SMP - } else { - - (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/ztbsv.c b/interface/ztbsv.c deleted file mode 100644 index 3846a4b3d..000000000 --- a/interface/ztbsv.c +++ /dev/null @@ -1,219 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTBSV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTBSV " -#else -#define ERROR_NAME "CTBSV " -#endif - -static int (*tbsv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xtbsv_NUU, xtbsv_NUN, xtbsv_NLU, xtbsv_NLN, - xtbsv_TUU, xtbsv_TUN, xtbsv_TLU, xtbsv_TLN, - xtbsv_RUU, xtbsv_RUN, xtbsv_RLU, xtbsv_RLN, - xtbsv_CUU, xtbsv_CUN, xtbsv_CLU, xtbsv_CLN, -#elif defined(DOUBLE) - ztbsv_NUU, ztbsv_NUN, ztbsv_NLU, ztbsv_NLN, - ztbsv_TUU, ztbsv_TUN, ztbsv_TLU, ztbsv_TLN, - ztbsv_RUU, ztbsv_RUN, ztbsv_RLU, ztbsv_RLN, - ztbsv_CUU, ztbsv_CUN, ztbsv_CLU, ztbsv_CLN, -#else - ctbsv_NUU, ctbsv_NUN, ctbsv_NLU, ctbsv_NLN, - ctbsv_TUU, ctbsv_TUN, ctbsv_TLU, ctbsv_TLN, - ctbsv_RUU, ctbsv_RUN, ctbsv_RLU, ctbsv_RLN, - ctbsv_CUU, ctbsv_CUN, ctbsv_CLU, ctbsv_CLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, blasint *K, - FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint k = *K; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 9; - if (lda < k + 1) info = 7; - if (k < 0) info = 5; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (tbsv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); - - IDEBUG_END; - - return; -} diff --git a/interface/ztpmv.c b/interface/ztpmv.c deleted file mode 100644 index 2f9c48f5a..000000000 --- a/interface/ztpmv.c +++ /dev/null @@ -1,252 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTPMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTPMV " -#else -#define ERROR_NAME "CTPMV " -#endif - -static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xtpmv_NUU, xtpmv_NUN, xtpmv_NLU, xtpmv_NLN, - xtpmv_TUU, xtpmv_TUN, xtpmv_TLU, xtpmv_TLN, - xtpmv_RUU, xtpmv_RUN, xtpmv_RLU, xtpmv_RLN, - xtpmv_CUU, xtpmv_CUN, xtpmv_CLU, xtpmv_CLN, -#elif defined(DOUBLE) - ztpmv_NUU, ztpmv_NUN, ztpmv_NLU, ztpmv_NLN, - ztpmv_TUU, ztpmv_TUN, ztpmv_TLU, ztpmv_TLN, - ztpmv_RUU, ztpmv_RUN, ztpmv_RLU, ztpmv_RLN, - ztpmv_CUU, ztpmv_CUN, ztpmv_CLU, ztpmv_CLN, -#else - ctpmv_NUU, ctpmv_NUN, ctpmv_NLU, ctpmv_NLN, - ctpmv_TUU, ctpmv_TUN, ctpmv_TLU, ctpmv_TLN, - ctpmv_RUU, ctpmv_RUN, ctpmv_RLU, ctpmv_RLN, - ctpmv_CUU, ctpmv_CUN, ctpmv_CLU, ctpmv_CLN, -#endif -}; - -#ifdef SMP -static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xtpmv_thread_NUU, xtpmv_thread_NUN, xtpmv_thread_NLU, xtpmv_thread_NLN, - xtpmv_thread_TUU, xtpmv_thread_TUN, xtpmv_thread_TLU, xtpmv_thread_TLN, - xtpmv_thread_RUU, xtpmv_thread_RUN, xtpmv_thread_RLU, xtpmv_thread_RLN, - xtpmv_thread_CUU, xtpmv_thread_CUN, xtpmv_thread_CLU, xtpmv_thread_CLN, -#elif defined(DOUBLE) - ztpmv_thread_NUU, ztpmv_thread_NUN, ztpmv_thread_NLU, ztpmv_thread_NLN, - ztpmv_thread_TUU, ztpmv_thread_TUN, ztpmv_thread_TLU, ztpmv_thread_TLN, - ztpmv_thread_RUU, ztpmv_thread_RUN, ztpmv_thread_RLU, ztpmv_thread_RLN, - ztpmv_thread_CUU, ztpmv_thread_CUN, ztpmv_thread_CLU, ztpmv_thread_CLN, -#else - ctpmv_thread_NUU, ctpmv_thread_NUN, ctpmv_thread_NLU, ctpmv_thread_NLN, - ctpmv_thread_TUU, ctpmv_thread_TUN, ctpmv_thread_TLU, ctpmv_thread_TLN, - ctpmv_thread_RUU, ctpmv_thread_RUN, ctpmv_thread_RLU, ctpmv_thread_RLN, - ctpmv_thread_CUU, ctpmv_thread_CUN, ctpmv_thread_CLU, ctpmv_thread_CLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; -#ifdef SMP - int nthreads; -#endif - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); - -#ifdef SMP - - } else { - - (tpmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/ztpsv.c b/interface/ztpsv.c deleted file mode 100644 index fde500e37..000000000 --- a/interface/ztpsv.c +++ /dev/null @@ -1,210 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTPSV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTPSV " -#else -#define ERROR_NAME "CTPSV " -#endif - -static int (*tpsv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xtpsv_NUU, xtpsv_NUN, xtpsv_NLU, xtpsv_NLN, - xtpsv_TUU, xtpsv_TUN, xtpsv_TLU, xtpsv_TLN, - xtpsv_RUU, xtpsv_RUN, xtpsv_RLU, xtpsv_RLN, - xtpsv_CUU, xtpsv_CUN, xtpsv_CLU, xtpsv_CLN, -#elif defined(DOUBLE) - ztpsv_NUU, ztpsv_NUN, ztpsv_NLU, ztpsv_NLN, - ztpsv_TUU, ztpsv_TUN, ztpsv_TLU, ztpsv_TLN, - ztpsv_RUU, ztpsv_RUN, ztpsv_RLU, ztpsv_RLN, - ztpsv_CUU, ztpsv_CUN, ztpsv_CLU, ztpsv_CLN, -#else - ctpsv_NUU, ctpsv_NUN, ctpsv_NLU, ctpsv_NLN, - ctpsv_TUU, ctpsv_TUN, ctpsv_TLU, ctpsv_TLN, - ctpsv_RUU, ctpsv_RUN, ctpsv_RLU, ctpsv_RLN, - ctpsv_CUU, ctpsv_CUN, ctpsv_CLU, ctpsv_CLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 7; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (tpsv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/ztrmv.c b/interface/ztrmv.c deleted file mode 100644 index 5a18a85b1..000000000 --- a/interface/ztrmv.c +++ /dev/null @@ -1,255 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTRMV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRMV " -#else -#define ERROR_NAME "CTRMV " -#endif - -static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { -#ifdef XDOUBLE - xtrmv_NUU, xtrmv_NUN, xtrmv_NLU, xtrmv_NLN, - xtrmv_TUU, xtrmv_TUN, xtrmv_TLU, xtrmv_TLN, - xtrmv_RUU, xtrmv_RUN, xtrmv_RLU, xtrmv_RLN, - xtrmv_CUU, xtrmv_CUN, xtrmv_CLU, xtrmv_CLN, -#elif defined(DOUBLE) - ztrmv_NUU, ztrmv_NUN, ztrmv_NLU, ztrmv_NLN, - ztrmv_TUU, ztrmv_TUN, ztrmv_TLU, ztrmv_TLN, - ztrmv_RUU, ztrmv_RUN, ztrmv_RLU, ztrmv_RLN, - ztrmv_CUU, ztrmv_CUN, ztrmv_CLU, ztrmv_CLN, -#else - ctrmv_NUU, ctrmv_NUN, ctrmv_NLU, ctrmv_NLN, - ctrmv_TUU, ctrmv_TUN, ctrmv_TLU, ctrmv_TLN, - ctrmv_RUU, ctrmv_RUN, ctrmv_RLU, ctrmv_RLN, - ctrmv_CUU, ctrmv_CUN, ctrmv_CLU, ctrmv_CLN, -#endif -}; - -#ifdef SMP -static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { -#ifdef XDOUBLE - xtrmv_thread_NUU, xtrmv_thread_NUN, xtrmv_thread_NLU, xtrmv_thread_NLN, - xtrmv_thread_TUU, xtrmv_thread_TUN, xtrmv_thread_TLU, xtrmv_thread_TLN, - xtrmv_thread_RUU, xtrmv_thread_RUN, xtrmv_thread_RLU, xtrmv_thread_RLN, - xtrmv_thread_CUU, xtrmv_thread_CUN, xtrmv_thread_CLU, xtrmv_thread_CLN, -#elif defined(DOUBLE) - ztrmv_thread_NUU, ztrmv_thread_NUN, ztrmv_thread_NLU, ztrmv_thread_NLN, - ztrmv_thread_TUU, ztrmv_thread_TUN, ztrmv_thread_TLU, ztrmv_thread_TLN, - ztrmv_thread_RUU, ztrmv_thread_RUN, ztrmv_thread_RLU, ztrmv_thread_RLN, - ztrmv_thread_CUU, ztrmv_thread_CUN, ztrmv_thread_CLU, ztrmv_thread_CLN, -#else - ctrmv_thread_NUU, ctrmv_thread_NUN, ctrmv_thread_NLU, ctrmv_thread_NLN, - ctrmv_thread_TUU, ctrmv_thread_TUN, ctrmv_thread_TLU, ctrmv_thread_TLN, - ctrmv_thread_RUU, ctrmv_thread_RUN, ctrmv_thread_RLU, ctrmv_thread_RLN, - ctrmv_thread_CUU, ctrmv_thread_CUN, ctrmv_thread_CLU, ctrmv_thread_CLN, -#endif -}; -#endif - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; -#ifdef SMP - int nthreads; -#endif - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - -#ifdef SMP - nthreads = num_cpu_avail(2); - - if (nthreads == 1) { -#endif - - (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); - -#ifdef SMP - } else { - - (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); - - } -#endif - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/ztrsv.c b/interface/ztrsv.c deleted file mode 100644 index 08f7dc68c..000000000 --- a/interface/ztrsv.c +++ /dev/null @@ -1,216 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTRSV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRSV " -#else -#define ERROR_NAME "CTRSV " -#endif - -static int (*trsv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { -#ifdef XDOUBLE - xtrsv_NUU, xtrsv_NUN, xtrsv_NLU, xtrsv_NLN, - xtrsv_TUU, xtrsv_TUN, xtrsv_TLU, xtrsv_TLN, - xtrsv_RUU, xtrsv_RUN, xtrsv_RLU, xtrsv_RLN, - xtrsv_CUU, xtrsv_CUN, xtrsv_CLU, xtrsv_CLN, -#elif defined(DOUBLE) - ztrsv_NUU, ztrsv_NUN, ztrsv_NLU, ztrsv_NLN, - ztrsv_TUU, ztrsv_TUN, ztrsv_TLU, ztrsv_TLN, - ztrsv_RUU, ztrsv_RUN, ztrsv_RLU, ztrsv_RLN, - ztrsv_CUU, ztrsv_CUN, ztrsv_CLU, ztrsv_CLN, -#else - ctrsv_NUU, ctrsv_NUN, ctrsv_NLU, ctrsv_NLN, - ctrsv_TUU, ctrsv_TUN, ctrsv_TLU, ctrsv_TLN, - ctrsv_RUU, ctrsv_RUN, ctrsv_RLU, ctrsv_RLN, - ctrsv_CUU, ctrsv_CUN, ctrsv_CLU, ctrsv_CLN, -#endif -}; - -#ifndef CBLAS - -void NAME(char *UPLO, char *TRANS, char *DIAG, - blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ - - char uplo_arg = *UPLO; - char trans_arg = *TRANS; - char diag_arg = *DIAG; - - blasint n = *N; - blasint lda = *LDA; - blasint incx = *INCX; - - blasint info; - int uplo; - int unit; - int trans; - FLOAT *buffer; - - PRINT_DEBUG_NAME; - - TOUPPER(uplo_arg); - TOUPPER(trans_arg); - TOUPPER(diag_arg); - - trans = -1; - unit = -1; - uplo = -1; - - if (trans_arg == 'N') trans = 0; - if (trans_arg == 'T') trans = 1; - if (trans_arg == 'R') trans = 2; - if (trans_arg == 'C') trans = 3; - - if (diag_arg == 'U') unit = 0; - if (diag_arg == 'N') unit = 1; - - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - - info = 0; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - - if (info != 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - - -#else - -void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, - enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, - blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { - - int trans, uplo, unit; - blasint info; - FLOAT *buffer; - - PRINT_DEBUG_CNAME; - - unit = -1; - uplo = -1; - trans = -1; - info = 0; - - if (order == CblasColMajor) { - if (Uplo == CblasUpper) uplo = 0; - if (Uplo == CblasLower) uplo = 1; - - if (TransA == CblasNoTrans) trans = 0; - if (TransA == CblasTrans) trans = 1; - if (TransA == CblasConjNoTrans) trans = 2; - if (TransA == CblasConjTrans) trans = 3; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (order == CblasRowMajor) { - if (Uplo == CblasUpper) uplo = 1; - if (Uplo == CblasLower) uplo = 0; - - if (TransA == CblasNoTrans) trans = 1; - if (TransA == CblasTrans) trans = 0; - if (TransA == CblasConjNoTrans) trans = 3; - if (TransA == CblasConjTrans) trans = 2; - - if (Diag == CblasUnit) unit = 0; - if (Diag == CblasNonUnit) unit = 1; - - info = -1; - - if (incx == 0) info = 8; - if (lda < MAX(1, n)) info = 6; - if (n < 0) info = 4; - if (unit < 0) info = 3; - if (trans < 0) info = 2; - if (uplo < 0) info = 1; - } - - if (info >= 0) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - return; - } - -#endif - - if (n == 0) return; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - - if (incx < 0 ) x -= (n - 1) * incx * 2; - - buffer = (FLOAT *)blas_memory_alloc(1); - - (trsv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); - - blas_memory_free(buffer); - - FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); - - IDEBUG_END; - - return; -} diff --git a/interface/ztrti2.c b/interface/ztrti2.c deleted file mode 100644 index 017374c37..000000000 --- a/interface/ztrti2.c +++ /dev/null @@ -1,134 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTRTI2" -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRTI2" -#else -#define ERROR_NAME "CTRTI2" -#endif - -static blasint (*trti2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { -#ifdef XDOUBLE - xtrti2_UU, xtrti2_UN, xtrti2_LU, xtrti2_LN, -#elif defined(DOUBLE) - ztrti2_UU, ztrti2_UN, ztrti2_LU, ztrti2_LN, -#else - ctrti2_UU, ctrti2_UN, ctrti2_LU, ctrti2_LN, -#endif - }; - -int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint diag_arg = *DIAG; - blasint uplo, diag; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - TOUPPER(diag_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - diag = -1; - if (diag_arg == 'U') diag = 0; - if (diag_arg == 'N') diag = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 5; - if (args.n < 0) info = 3; - if (diag < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (trti2[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); - - IDEBUG_END; - - return 0; -} diff --git a/interface/ztrtri.c b/interface/ztrtri.c deleted file mode 100644 index 89caf80d3..000000000 --- a/interface/ztrtri.c +++ /dev/null @@ -1,154 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XTRTRI" -#elif defined(DOUBLE) -#define ERROR_NAME "ZTRTRI" -#else -#define ERROR_NAME "CTRTRI" -#endif - -static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, -}; - -#ifdef SMP -static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ - TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, -}; -#endif - -int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint diag_arg = *DIAG; - blasint uplo, diag; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - TOUPPER(diag_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - diag = -1; - if (diag_arg == 'U') diag = 0; - if (diag_arg == 'N') diag = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 5; - if (args.n < 0) info = 3; - if (diag < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - if (diag) { - if (AMIN_K(args.n, args.a, args.lda + 1) == ZERO) { - *Info = IAMIN_K(args.n, args.a, args.lda + 1); - return 0; - } - } - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); - - IDEBUG_END; - - return 0; -} From e265c4ec8685e05c79ef47ced26a35b3d4d76e41 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 21:27:47 +0200 Subject: [PATCH 15/98] added C files in interface --- interface/asum.c | 93 +++++++++ interface/axpy.c | 121 ++++++++++++ interface/copy.c | 80 ++++++++ interface/dot.c | 101 ++++++++++ interface/dsdot.c | 102 ++++++++++ interface/gbmv.c | 252 +++++++++++++++++++++++++ interface/gemm.c | 461 +++++++++++++++++++++++++++++++++++++++++++++ interface/gemv.c | 237 +++++++++++++++++++++++ interface/ger.c | 193 +++++++++++++++++++ interface/gesv.c | 154 +++++++++++++++ interface/imax.c | 171 +++++++++++++++++ interface/max.c | 169 +++++++++++++++++ interface/nrm2.c | 93 +++++++++ interface/rot.c | 82 ++++++++ interface/rotg.c | 109 +++++++++++ interface/rotm.c | 155 +++++++++++++++ interface/rotmg.c | 235 +++++++++++++++++++++++ interface/sbmv.c | 215 +++++++++++++++++++++ interface/scal.c | 112 +++++++++++ interface/sdsdot.c | 101 ++++++++++ interface/spmv.c | 207 ++++++++++++++++++++ interface/spr.c | 197 +++++++++++++++++++ interface/spr2.c | 203 ++++++++++++++++++++ interface/swap.c | 115 +++++++++++ interface/symm.c | 442 +++++++++++++++++++++++++++++++++++++++++++ interface/symv.c | 205 ++++++++++++++++++++ interface/syr.c | 200 ++++++++++++++++++++ interface/syr2.c | 204 ++++++++++++++++++++ interface/syr2k.c | 377 ++++++++++++++++++++++++++++++++++++ interface/syrk.c | 366 +++++++++++++++++++++++++++++++++++ interface/tbmv.c | 248 ++++++++++++++++++++++++ interface/tbsv.c | 213 +++++++++++++++++++++ interface/tpmv.c | 239 +++++++++++++++++++++++ interface/tpsv.c | 204 ++++++++++++++++++++ interface/trmv.c | 243 ++++++++++++++++++++++++ interface/trsm.c | 391 ++++++++++++++++++++++++++++++++++++++ interface/trsv.c | 208 ++++++++++++++++++++ interface/trti2.c | 134 +++++++++++++ interface/trtri.c | 156 +++++++++++++++ interface/zaxpy.c | 127 +++++++++++++ interface/zdot.c | 202 ++++++++++++++++++++ interface/zgbmv.c | 271 ++++++++++++++++++++++++++ interface/zgemv.c | 259 +++++++++++++++++++++++++ interface/zger.c | 249 ++++++++++++++++++++++++ interface/zhbmv.c | 223 ++++++++++++++++++++++ interface/zhemv.c | 215 +++++++++++++++++++++ interface/zher.c | 200 ++++++++++++++++++++ interface/zher2.c | 207 ++++++++++++++++++++ interface/zhpmv.c | 213 +++++++++++++++++++++ interface/zhpr.c | 198 +++++++++++++++++++ interface/zhpr2.c | 207 ++++++++++++++++++++ interface/zrot.c | 72 +++++++ interface/zrotg.c | 115 +++++++++++ interface/zsbmv.c | 157 +++++++++++++++ interface/zscal.c | 117 ++++++++++++ interface/zspmv.c | 154 +++++++++++++++ interface/zspr.c | 146 ++++++++++++++ interface/zspr2.c | 149 +++++++++++++++ interface/zswap.c | 116 ++++++++++++ interface/zsymv.c | 143 ++++++++++++++ interface/zsyr.c | 203 ++++++++++++++++++++ interface/zsyr2.c | 151 +++++++++++++++ interface/ztbmv.c | 260 +++++++++++++++++++++++++ interface/ztbsv.c | 219 +++++++++++++++++++++ interface/ztpmv.c | 252 +++++++++++++++++++++++++ interface/ztpsv.c | 210 +++++++++++++++++++++ interface/ztrmv.c | 255 +++++++++++++++++++++++++ interface/ztrsv.c | 216 +++++++++++++++++++++ interface/ztrti2.c | 134 +++++++++++++ interface/ztrtri.c | 154 +++++++++++++++ 70 files changed, 13582 insertions(+) create mode 100644 interface/asum.c create mode 100644 interface/axpy.c create mode 100644 interface/copy.c create mode 100644 interface/dot.c create mode 100644 interface/dsdot.c create mode 100644 interface/gbmv.c create mode 100644 interface/gemm.c create mode 100644 interface/gemv.c create mode 100644 interface/ger.c create mode 100644 interface/gesv.c create mode 100644 interface/imax.c create mode 100644 interface/max.c create mode 100644 interface/nrm2.c create mode 100644 interface/rot.c create mode 100644 interface/rotg.c create mode 100644 interface/rotm.c create mode 100644 interface/rotmg.c create mode 100644 interface/sbmv.c create mode 100644 interface/scal.c create mode 100644 interface/sdsdot.c create mode 100644 interface/spmv.c create mode 100644 interface/spr.c create mode 100644 interface/spr2.c create mode 100644 interface/swap.c create mode 100644 interface/symm.c create mode 100644 interface/symv.c create mode 100644 interface/syr.c create mode 100644 interface/syr2.c create mode 100644 interface/syr2k.c create mode 100644 interface/syrk.c create mode 100644 interface/tbmv.c create mode 100644 interface/tbsv.c create mode 100644 interface/tpmv.c create mode 100644 interface/tpsv.c create mode 100644 interface/trmv.c create mode 100644 interface/trsm.c create mode 100644 interface/trsv.c create mode 100644 interface/trti2.c create mode 100644 interface/trtri.c create mode 100644 interface/zaxpy.c create mode 100644 interface/zdot.c create mode 100644 interface/zgbmv.c create mode 100644 interface/zgemv.c create mode 100644 interface/zger.c create mode 100644 interface/zhbmv.c create mode 100644 interface/zhemv.c create mode 100644 interface/zher.c create mode 100644 interface/zher2.c create mode 100644 interface/zhpmv.c create mode 100644 interface/zhpr.c create mode 100644 interface/zhpr2.c create mode 100644 interface/zrot.c create mode 100644 interface/zrotg.c create mode 100644 interface/zsbmv.c create mode 100644 interface/zscal.c create mode 100644 interface/zspmv.c create mode 100644 interface/zspr.c create mode 100644 interface/zspr2.c create mode 100644 interface/zswap.c create mode 100644 interface/zsymv.c create mode 100644 interface/zsyr.c create mode 100644 interface/zsyr2.c create mode 100644 interface/ztbmv.c create mode 100644 interface/ztbsv.c create mode 100644 interface/ztpmv.c create mode 100644 interface/ztpsv.c create mode 100644 interface/ztrmv.c create mode 100644 interface/ztrsv.c create mode 100644 interface/ztrti2.c create mode 100644 interface/ztrtri.c diff --git a/interface/asum.c b/interface/asum.c new file mode 100644 index 000000000..634836e28 --- /dev/null +++ b/interface/asum.c @@ -0,0 +1,93 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + FLOATRET ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = (FLOATRET)ASUM_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, n); + + IDEBUG_END; + + return ret; +} + +#else + +FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ + + FLOAT ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = ASUM_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, n); + + IDEBUG_END; + + return ret; +} + +#endif diff --git a/interface/axpy.c b/interface/axpy.c new file mode 100644 index 000000000..b8a96c94e --- /dev/null +++ b/interface/axpy.c @@ -0,0 +1,121 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + FLOAT alpha = *ALPHA; + +#else + +void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + +#endif + +#ifdef SMPTEST + int mode, nthreads; +#endif + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (n <= 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + +#ifdef SMPTEST + nthreads = num_cpu_avail(1); + + //disable multi-thread when incx==0 or incy==0 + //In that case, the threads would be dependent. + if (incx == 0 || incy == 0) + nthreads = 1; + + //Temporarily walk around the low performance issue with small imput size & multithreads. + if (n <= 10000) + nthreads = 1; + + if (nthreads == 1) { +#endif + + AXPYU_K(n, 0, 0, alpha, x, incx, y, incy, NULL, 0); + +#ifdef SMPTEST + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_REAL; +#else + mode = BLAS_SINGLE | BLAS_REAL; +#endif + + blas_level1_thread(mode, n, 0, 0, &alpha, + x, incx, y, incy, NULL, 0, (void *)AXPYU_K, nthreads); + + } +#endif + + FUNCTION_PROFILE_END(1, 2 * n, 2 * n); + + IDEBUG_END; + + return; + +} diff --git a/interface/copy.c b/interface/copy.c new file mode 100644 index 000000000..6965682ec --- /dev/null +++ b/interface/copy.c @@ -0,0 +1,80 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + + PRINT_DEBUG_NAME; + +#else + +void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + + PRINT_DEBUG_CNAME; + +#endif + + if (n <= 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx * COMPSIZE; + if (incy < 0) y -= (n - 1) * incy * COMPSIZE; + + COPY_K(n, x, incx, y, incy); + + FUNCTION_PROFILE_END(COMPSIZE, COMPSIZE * n, 0); + + IDEBUG_END; + + return; + +} diff --git a/interface/dot.c b/interface/dot.c new file mode 100644 index 000000000..3744db5ea --- /dev/null +++ b/interface/dot.c @@ -0,0 +1,101 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + FLOATRET ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0.; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret = (FLOATRET)DOTU_K(n, x, incx, y, incy); + + FUNCTION_PROFILE_END(1, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; +} + +#else + +FLOAT CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + + FLOAT ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0.; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret = DOTU_K(n, x, incx, y, incy); + + FUNCTION_PROFILE_END(1, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; + +} + +#endif diff --git a/interface/dsdot.c b/interface/dsdot.c new file mode 100644 index 000000000..94237e0c4 --- /dev/null +++ b/interface/dsdot.c @@ -0,0 +1,102 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +double NAME(blasint *N, float *x, blasint *INCX, float *y, blasint *INCY){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + double ret = 0.0; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret=DSDOT_K(n, x, incx, y, incy); + + FUNCTION_PROFILE_END(1, n, n); + + IDEBUG_END; + + return ret; + +} + +#else + +double CNAME(blasint n, float *x, blasint incx, float *y, blasint incy){ + + double ret = 0.0; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret=DSDOT_K(n, x, incx, y, incy); + + FUNCTION_PROFILE_END(1, n, n); + + IDEBUG_END; + + return ret; + +} + +#endif diff --git a/interface/gbmv.c b/interface/gbmv.c new file mode 100644 index 000000000..d96d89f10 --- /dev/null +++ b/interface/gbmv.c @@ -0,0 +1,252 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DGBMV " +#else +#define ERROR_NAME "SGBMV " +#endif + +static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, + FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qgbmv_n, qgbmv_t, +#elif defined(DOUBLE) + dgbmv_n, dgbmv_t, +#else + sgbmv_n, sgbmv_t, +#endif +}; + +#ifdef SMPTEST +static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, + FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qgbmv_thread_n, qgbmv_thread_t, +#elif defined(DOUBLE) + dgbmv_thread_n, dgbmv_thread_t, +#else + sgbmv_thread_n, sgbmv_thread_t, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *TRANS, blasint *M, blasint *N, + blasint *KU, blasint *KL, + FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, + FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char trans = *TRANS; + blasint m = *M; + blasint n = *N; + blasint ku = *KU; + blasint kl = *KL; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + FLOAT alpha = *ALPHA; + FLOAT beta = *BETA; + + blasint info; + blasint lenx, leny; + blasint i; + + PRINT_DEBUG_NAME; + + TOUPPER(trans); + + info = 0; + + i = -1; + + if (trans == 'N') i = 0; + if (trans == 'T') i = 1; + if (trans == 'R') i = 0; + if (trans == 'C') i = 1; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (i < 0) info = 1; + + trans = i; + + if (info != 0){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_TRANSPOSE TransA, + blasint m, blasint n, + blasint ku, blasint kl, + FLOAT alpha, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT beta, + FLOAT *y, blasint incy){ + + FLOAT *buffer; + blasint lenx, leny, info, t; + int trans; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + info = -1; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + info = -1; + + t = n; + n = m; + m = t; + + t = ku; + ku = kl; + kl = t; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if ((m==0) || (n==0)) return; + + lenx = n; + leny = m; + if (trans) lenx = m; + if (trans) leny = n; + + if (beta != ONE) SCAL_K(leny, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (lenx-1)*incx; + if (incy < 0) y -= (leny-1)*incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (gbmv[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (gbmv_thread[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, m * n / 2 + n, m * n); + + IDEBUG_END; + + return; +} diff --git a/interface/gemm.c b/interface/gemm.c new file mode 100644 index 000000000..ceb5ff355 --- /dev/null +++ b/interface/gemm.c @@ -0,0 +1,461 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QGEMM " +#elif defined(DOUBLE) +#define ERROR_NAME "DGEMM " +#else +#define ERROR_NAME "SGEMM " +#endif +#else +#ifndef GEMM3M +#ifdef XDOUBLE +#define ERROR_NAME "XGEMM " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGEMM " +#else +#define ERROR_NAME "CGEMM " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XGEMM3M " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGEMM3M " +#else +#define ERROR_NAME "CGEMM3M " +#endif +#endif +#endif + +#ifndef GEMM_MULTITHREAD_THRESHOLD +# define GEMM_MULTITHREAD_THRESHOLD 4 +#endif + +static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifndef GEMM3M + GEMM_NN, GEMM_TN, GEMM_RN, GEMM_CN, + GEMM_NT, GEMM_TT, GEMM_RT, GEMM_CT, + GEMM_NR, GEMM_TR, GEMM_RR, GEMM_CR, + GEMM_NC, GEMM_TC, GEMM_RC, GEMM_CC, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + GEMM_THREAD_NN, GEMM_THREAD_TN, GEMM_THREAD_RN, GEMM_THREAD_CN, + GEMM_THREAD_NT, GEMM_THREAD_TT, GEMM_THREAD_RT, GEMM_THREAD_CT, + GEMM_THREAD_NR, GEMM_THREAD_TR, GEMM_THREAD_RR, GEMM_THREAD_CR, + GEMM_THREAD_NC, GEMM_THREAD_TC, GEMM_THREAD_RC, GEMM_THREAD_CC, +#endif +#else + GEMM3M_NN, GEMM3M_TN, GEMM3M_RN, GEMM3M_CN, + GEMM3M_NT, GEMM3M_TT, GEMM3M_RT, GEMM3M_CT, + GEMM3M_NR, GEMM3M_TR, GEMM3M_RR, GEMM3M_CR, + GEMM3M_NC, GEMM3M_TC, GEMM3M_RC, GEMM3M_CC, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + GEMM3M_THREAD_NN, GEMM3M_THREAD_TN, GEMM3M_THREAD_RN, GEMM3M_THREAD_CN, + GEMM3M_THREAD_NT, GEMM3M_THREAD_TT, GEMM3M_THREAD_RT, GEMM3M_THREAD_CT, + GEMM3M_THREAD_NR, GEMM3M_THREAD_TR, GEMM3M_THREAD_RR, GEMM3M_THREAD_CR, + GEMM3M_THREAD_NC, GEMM3M_THREAD_TC, GEMM3M_THREAD_RC, GEMM3M_THREAD_CC, +#endif +#endif +}; + +#ifndef CBLAS + +void NAME(char *TRANSA, char *TRANSB, + blasint *M, blasint *N, blasint *K, + FLOAT *alpha, + FLOAT *a, blasint *ldA, + FLOAT *b, blasint *ldB, + FLOAT *beta, + FLOAT *c, blasint *ldC){ + + blas_arg_t args; + + int transa, transb, nrowa, nrowb; + blasint info; + + char transA, transB; + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + +#if defined(SMPTEST) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) + int nodes; +#endif + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + args.k = *K; + + args.a = (void *)a; + args.b = (void *)b; + args.c = (void *)c; + + args.lda = *ldA; + args.ldb = *ldB; + args.ldc = *ldC; + + args.alpha = (void *)alpha; + args.beta = (void *)beta; + + transA = *TRANSA; + transB = *TRANSB; + + TOUPPER(transA); + TOUPPER(transB); + + transa = -1; + transb = -1; + + if (transA == 'N') transa = 0; + if (transA == 'T') transa = 1; +#ifndef COMPLEX + if (transA == 'R') transa = 0; + if (transA == 'C') transa = 1; +#else + if (transA == 'R') transa = 2; + if (transA == 'C') transa = 3; +#endif + + if (transB == 'N') transb = 0; + if (transB == 'T') transb = 1; +#ifndef COMPLEX + if (transB == 'R') transb = 0; + if (transB == 'C') transb = 1; +#else + if (transB == 'R') transb = 2; + if (transB == 'C') transb = 3; +#endif + + nrowa = args.m; + if (transa & 1) nrowa = args.k; + nrowb = args.k; + if (transb & 1) nrowb = args.n; + + info = 0; + + if (args.ldc < args.m) info = 13; + if (args.ldb < nrowb) info = 10; + if (args.lda < nrowa) info = 8; + if (args.k < 0) info = 5; + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (transb < 0) info = 2; + if (transa < 0) info = 1; + + if (info){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, + blasint m, blasint n, blasint k, +#ifndef COMPLEX + FLOAT alpha, +#else + FLOAT *alpha, +#endif + FLOAT *a, blasint lda, + FLOAT *b, blasint ldb, +#ifndef COMPLEX + FLOAT beta, +#else + FLOAT *beta, +#endif + FLOAT *c, blasint ldc) { + + blas_arg_t args; + int transa, transb; + blasint nrowa, nrowb, info; + + XFLOAT *buffer; + XFLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + +#if defined(SMPTEST) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) + int nodes; +#endif + + PRINT_DEBUG_CNAME; + +#ifndef COMPLEX + args.alpha = (void *)α + args.beta = (void *)β +#else + args.alpha = (void *)alpha; + args.beta = (void *)beta; +#endif + + transa = -1; + transb = -1; + info = 0; + + if (order == CblasColMajor) { + args.m = m; + args.n = n; + args.k = k; + + args.a = (void *)a; + args.b = (void *)b; + args.c = (void *)c; + + args.lda = lda; + args.ldb = ldb; + args.ldc = ldc; + + if (TransA == CblasNoTrans) transa = 0; + if (TransA == CblasTrans) transa = 1; +#ifndef COMPLEX + if (TransA == CblasConjNoTrans) transa = 0; + if (TransA == CblasConjTrans) transa = 1; +#else + if (TransA == CblasConjNoTrans) transa = 2; + if (TransA == CblasConjTrans) transa = 3; +#endif + if (TransB == CblasNoTrans) transb = 0; + if (TransB == CblasTrans) transb = 1; +#ifndef COMPLEX + if (TransB == CblasConjNoTrans) transb = 0; + if (TransB == CblasConjTrans) transb = 1; +#else + if (TransB == CblasConjNoTrans) transb = 2; + if (TransB == CblasConjTrans) transb = 3; +#endif + + nrowa = args.m; + if (transa & 1) nrowa = args.k; + nrowb = args.k; + if (transb & 1) nrowb = args.n; + + info = -1; + + if (args.ldc < args.m) info = 13; + if (args.ldb < nrowb) info = 10; + if (args.lda < nrowa) info = 8; + if (args.k < 0) info = 5; + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (transb < 0) info = 2; + if (transa < 0) info = 1; + } + + if (order == CblasRowMajor) { + args.m = n; + args.n = m; + args.k = k; + + args.a = (void *)b; + args.b = (void *)a; + args.c = (void *)c; + + args.lda = ldb; + args.ldb = lda; + args.ldc = ldc; + + if (TransB == CblasNoTrans) transa = 0; + if (TransB == CblasTrans) transa = 1; +#ifndef COMPLEX + if (TransB == CblasConjNoTrans) transa = 0; + if (TransB == CblasConjTrans) transa = 1; +#else + if (TransB == CblasConjNoTrans) transa = 2; + if (TransB == CblasConjTrans) transa = 3; +#endif + if (TransA == CblasNoTrans) transb = 0; + if (TransA == CblasTrans) transb = 1; +#ifndef COMPLEX + if (TransA == CblasConjNoTrans) transb = 0; + if (TransA == CblasConjTrans) transb = 1; +#else + if (TransA == CblasConjNoTrans) transb = 2; + if (TransA == CblasConjTrans) transb = 3; +#endif + + nrowa = args.m; + if (transa & 1) nrowa = args.k; + nrowb = args.k; + if (transb & 1) nrowb = args.n; + + info = -1; + + if (args.ldc < args.m) info = 13; + if (args.ldb < nrowb) info = 10; + if (args.lda < nrowa) info = 8; + if (args.k < 0) info = 5; + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (transb < 0) info = 2; + if (transa < 0) info = 1; + + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if ((args.m == 0) || (args.n == 0)) return; + +#if 0 + fprintf(stderr, "m = %4d n = %d k = %d lda = %4d ldb = %4d ldc = %4d\n", + args.m, args.n, args.k, args.lda, args.ldb, args.ldc); +#endif + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + buffer = (XFLOAT *)blas_memory_alloc(0); + + sa = (XFLOAT *)((BLASLONG)buffer +GEMM_OFFSET_A); + sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); + +#ifdef SMPTEST + mode |= (transa << BLAS_TRANSA_SHIFT); + mode |= (transb << BLAS_TRANSB_SHIFT); + + args.common = NULL; + + if(args.m <= GEMM_MULTITHREAD_THRESHOLD || args.n <= GEMM_MULTITHREAD_THRESHOLD + || args.k <=GEMM_MULTITHREAD_THRESHOLD){ + args.nthreads = 1; + }else{ + args.nthreads = num_cpu_avail(3); + } + if (args.nthreads == 1) { +#endif + + (gemm[(transb << 2) | transa])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + + } else { + +#ifndef USE_SIMPLE_THREADED_LEVEL3 + +#ifndef NO_AFFINITY + nodes = get_num_nodes(); + + if ((nodes > 1) && get_node_equal()) { + + args.nthreads /= nodes; + + gemm_thread_mn(mode, &args, NULL, NULL, gemm[16 | (transb << 2) | transa], sa, sb, nodes); + + } else { +#endif + + (gemm[16 | (transb << 2) | transa])(&args, NULL, NULL, sa, sb, 0); + +#else + + GEMM_THREAD(mode, &args, NULL, NULL, gemm[(transb << 2) | transa], sa, sb, args.nthreads); + +#endif + +#ifndef USE_SIMPLE_THREADED_LEVEL3 +#ifndef NO_AFFINITY + } +#endif +#endif + +#endif + +#ifdef SMPTEST + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.k + args.k * args.n + args.m * args.n, 2 * args.m * args.n * args.k); + + IDEBUG_END; + + return; +} diff --git a/interface/gemv.c b/interface/gemv.c new file mode 100644 index 000000000..0c55c6fe6 --- /dev/null +++ b/interface/gemv.c @@ -0,0 +1,237 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGEMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DGEMV " +#else +#define ERROR_NAME "SGEMV " +#endif + +#ifdef SMPTEST +static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qgemv_thread_n, qgemv_thread_t, +#elif defined DOUBLE + dgemv_thread_n, dgemv_thread_t, +#else + sgemv_thread_n, sgemv_thread_t, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *TRANS, blasint *M, blasint *N, + FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, + FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char trans = *TRANS; + blasint m = *M; + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + FLOAT alpha = *ALPHA; + FLOAT beta = *BETA; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + GEMV_N, GEMV_T, + }; + + blasint info; + blasint lenx, leny; + blasint i; + + PRINT_DEBUG_NAME; + + TOUPPER(trans); + + info = 0; + + i = -1; + + if (trans == 'N') i = 0; + if (trans == 'T') i = 1; + if (trans == 'R') i = 0; + if (trans == 'C') i = 1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1, m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (i < 0) info = 1; + + trans = i; + + if (info != 0){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_TRANSPOSE TransA, + blasint m, blasint n, + FLOAT alpha, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT beta, + FLOAT *y, blasint incy){ + + FLOAT *buffer; + blasint lenx, leny; + int trans; + blasint info, t; +#ifdef SMPTEST + int nthreads; +#endif + + int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + GEMV_N, GEMV_T, + }; + + PRINT_DEBUG_CNAME; + + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1, m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + + } + + if (order == CblasRowMajor) { + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + info = -1; + + t = n; + n = m; + m = t; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1, m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if ((m==0) || (n==0)) return; + + lenx = n; + leny = m; + if (trans) lenx = m; + if (trans) leny = n; + + if (beta != ONE) SCAL_K(leny, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (lenx - 1) * incx; + if (incy < 0) y -= (leny - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (gemv[(int)trans])(m, n, 0, alpha, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (gemv_thread[(int)trans])(m, n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, m * n + m + n, 2 * m * n); + + IDEBUG_END; + + return; + +} diff --git a/interface/ger.c b/interface/ger.c new file mode 100644 index 000000000..eb3d224f0 --- /dev/null +++ b/interface/ger.c @@ -0,0 +1,193 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGER " +#elif defined DOUBLE +#define ERROR_NAME "DGER " +#else +#define ERROR_NAME "SGER " +#endif + +#define GER GERU_K + +#if defined XDOUBLE +#define GER_THREAD qger_thread +#elif defined DOUBLE +#define GER_THREAD dger_thread +#else +#define GER_THREAD sger_thread +#endif + + +#ifndef CBLAS + +void NAME(blasint *M, blasint *N, FLOAT *Alpha, + FLOAT *x, blasint *INCX, + FLOAT *y, blasint *INCY, + FLOAT *a, blasint *LDA){ + + blasint m = *M; + blasint n = *N; + FLOAT alpha = *Alpha; + blasint incx = *INCX; + blasint incy = *INCY; + blasint lda = *LDA; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + blasint info; + + PRINT_DEBUG_NAME; + + info = 0; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + + if (info){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + blasint m, blasint n, + FLOAT alpha, + FLOAT *x, blasint incx, + FLOAT *y, blasint incy, + FLOAT *a, blasint lda) { + + FLOAT *buffer; + blasint info, t; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + info = 0; + + if (order == CblasColMajor) { + info = -1; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + } + + if (order == CblasRowMajor) { + info = -1; + + t = n; + n = m; + m = t; + + t = incx; + incx = incy; + incy = t; + + buffer = x; + x = y; + y = buffer; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + /* Quick return if possible. */ + if (m == 0 || n == 0) return; + if (alpha == 0.) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incy < 0) y -= (n - 1) * incy; + if (incx < 0) x -= (m - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + GER(m, n, 0, alpha, x, incx, y, incy, a, lda, buffer); + +#ifdef SMPTEST + } else { + + GER_THREAD(m, n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, m * n + m + n, 2 * m * n); + + IDEBUG_END; + + return; +} diff --git a/interface/gesv.c b/interface/gesv.c new file mode 100644 index 000000000..920f6ab80 --- /dev/null +++ b/interface/gesv.c @@ -0,0 +1,154 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QGESV " +#elif defined(DOUBLE) +#define ERROR_NAME "DGESV " +#else +#define ERROR_NAME "SGESV " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XGESV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGESV " +#else +#define ERROR_NAME "CGESV " +#endif +#endif + +int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv, + FLOAT *b, blasint *ldB, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *N; + args.n = *NRHS; + args.a = (void *)a; + args.lda = *ldA; + args.b = (void *)b; + args.ldb = *ldB; + args.c = (void *)ipiv; + + info = 0; + if (args.ldb < MAX(1,args.m)) info = 7; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + args.alpha = NULL; + args.beta = NULL; + + *Info = 0; + + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMPTEST + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + args.n = *N; + info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); + + if (info == 0){ + args.n = *NRHS; + GETRS_N_SINGLE(&args, NULL, NULL, sa, sb, 0); + } + +#ifdef SMPTEST + } else { + + args.n = *N; + info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); + + if (info == 0){ + args.n = *NRHS; + GETRS_N_PARALLEL(&args, NULL, NULL, sa, sb, 0); + } + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + *Info = info; + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, *N * *N, 2. / 3. * *N * *N * *N + *N * *N); + + IDEBUG_END; + + return 0; +} diff --git a/interface/imax.c b/interface/imax.c new file mode 100644 index 000000000..37396c7f8 --- /dev/null +++ b/interface/imax.c @@ -0,0 +1,171 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#undef MAX_K + +#ifdef USE_ABS + +#ifndef USE_MIN + +/* ABS & MAX */ +#ifndef COMPLEX +#ifdef XDOUBLE +#define MAX_K IQAMAX_K +#elif defined(DOUBLE) +#define MAX_K IDAMAX_K +#else +#define MAX_K ISAMAX_K +#endif +#else +#ifdef XDOUBLE +#define MAX_K IXAMAX_K +#elif defined(DOUBLE) +#define MAX_K IZAMAX_K +#else +#define MAX_K ICAMAX_K +#endif +#endif + +#else + +/* ABS & MIN */ +#ifndef COMPLEX +#ifdef XDOUBLE +#define MAX_K IQAMIN_K +#elif defined(DOUBLE) +#define MAX_K IDAMIN_K +#else +#define MAX_K ISAMIN_K +#endif +#else +#ifdef XDOUBLE +#define MAX_K IXAMIN_K +#elif defined(DOUBLE) +#define MAX_K IZAMIN_K +#else +#define MAX_K ICAMIN_K +#endif +#endif + +#endif + +#else + +#ifndef USE_MIN + +/* MAX */ +#ifdef XDOUBLE +#define MAX_K IQMAX_K +#elif defined(DOUBLE) +#define MAX_K IDMAX_K +#else +#define MAX_K ISMAX_K +#endif + +#else + +/* MIN */ +#ifdef XDOUBLE +#define MAX_K IQMIN_K +#elif defined(DOUBLE) +#define MAX_K IDMIN_K +#else +#define MAX_K ISMIN_K +#endif + +#endif + +#endif + +#ifndef CBLAS + +blasint NAME(blasint *N, FLOAT *x, blasint *INCX){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + blasint ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = (blasint)MAX_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, 0); + + IDEBUG_END; + + return ret; +} + +#else + +CBLAS_INDEX CNAME(blasint n, FLOAT *x, blasint incx){ + + CBLAS_INDEX ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = MAX_K(n, x, incx); + + if (ret) ret --; + + FUNCTION_PROFILE_END(COMPSIZE, n, 0); + + IDEBUG_END; + + return ret; +} + +#endif diff --git a/interface/max.c b/interface/max.c new file mode 100644 index 000000000..9bedaddd0 --- /dev/null +++ b/interface/max.c @@ -0,0 +1,169 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#undef MAX_K + +#ifdef USE_ABS + +#ifndef USE_MIN + +/* ABS & MAX */ +#ifndef COMPLEX +#ifdef XDOUBLE +#define MAX_K QAMAX_K +#elif defined(DOUBLE) +#define MAX_K DAMAX_K +#else +#define MAX_K SAMAX_K +#endif +#else +#ifdef XDOUBLE +#define MAX_K XAMAX_K +#elif defined(DOUBLE) +#define MAX_K ZAMAX_K +#else +#define MAX_K CAMAX_K +#endif +#endif + +#else + +/* ABS & MIN */ +#ifndef COMPLEX +#ifdef XDOUBLE +#define MAX_K QAMIN_K +#elif defined(DOUBLE) +#define MAX_K DAMIN_K +#else +#define MAX_K SAMIN_K +#endif +#else +#ifdef XDOUBLE +#define MAX_K XAMIN_K +#elif defined(DOUBLE) +#define MAX_K ZAMIN_K +#else +#define MAX_K CAMIN_K +#endif +#endif + +#endif + +#else + +#ifndef USE_MIN + +/* MAX */ +#ifdef XDOUBLE +#define MAX_K QMAX_K +#elif defined(DOUBLE) +#define MAX_K DMAX_K +#else +#define MAX_K SMAX_K +#endif + +#else + +/* MIN */ +#ifdef XDOUBLE +#define MAX_K QMIN_K +#elif defined(DOUBLE) +#define MAX_K DMIN_K +#else +#define MAX_K SMIN_K +#endif + +#endif + +#endif + +#ifndef CBLAS + +FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + FLOATRET ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = (FLOATRET)MAX_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, 0); + + IDEBUG_END; + + return ret; +} + +#else + +FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ + + FLOAT ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = MAX_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, 0); + + IDEBUG_END; + + return ret; +} + +#endif diff --git a/interface/nrm2.c b/interface/nrm2.c new file mode 100644 index 000000000..ff8ef6d0d --- /dev/null +++ b/interface/nrm2.c @@ -0,0 +1,93 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + FLOATRET ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return 0.; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = (FLOATRET)NRM2_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, 2 * n); + + IDEBUG_END; + + return ret; +} + +#else + +FLOAT CNAME(blasint n, FLOAT *x, blasint incx){ + + FLOAT ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return 0.; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + ret = NRM2_K(n, x, incx); + + FUNCTION_PROFILE_END(COMPSIZE, n, 2 * n); + + IDEBUG_END; + + return ret; +} + +#endif diff --git a/interface/rot.c b/interface/rot.c new file mode 100644 index 000000000..2e458b12d --- /dev/null +++ b/interface/rot.c @@ -0,0 +1,82 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *C, FLOAT *S){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + FLOAT c = *C; + FLOAT s = *S; + + PRINT_DEBUG_NAME; + +#else + +void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT c, FLOAT s){ + + PRINT_DEBUG_CNAME; + +#endif + + if (n <= 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ROT_K(n, x, incx, y, incy, c, s); + + FUNCTION_PROFILE_END(1, n, n); + + IDEBUG_END; + + return; + +} diff --git a/interface/rotg.c b/interface/rotg.c new file mode 100644 index 000000000..49088ab02 --- /dev/null +++ b/interface/rotg.c @@ -0,0 +1,109 @@ +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ + +#else + +void CNAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ + +#endif + + +#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) + + long double da = *DA; + long double db = *DB; + long double c; + long double s; + long double r, roe, z; + + long double ada = fabs(da); + long double adb = fabs(db); + long double scale = ada + adb; + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + roe = db; + if (ada > adb) roe = da; + + if (scale == ZERO) { + *C = ONE; + *S = ZERO; + *DA = ZERO; + *DB = ZERO; + } else { + r = sqrt(da * da + db * db); + if (roe < 0) r = -r; + c = da / r; + s = db / r; + z = ONE; + if (da != ZERO) { + if (ada > adb){ + z = s; + } else { + z = ONE / c; + } + } + + *C = c; + *S = s; + *DA = r; + *DB = z; + } + +#else + FLOAT da = *DA; + FLOAT db = *DB; + FLOAT c = *C; + FLOAT s = *S; + FLOAT r, roe, z; + + FLOAT ada = fabs(da); + FLOAT adb = fabs(db); + FLOAT scale = ada + adb; + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + roe = db; + if (ada > adb) roe = da; + + if (scale == ZERO) { + *C = ONE; + *S = ZERO; + *DA = ZERO; + *DB = ZERO; + } else { + FLOAT aa = da / scale; + FLOAT bb = db / scale; + + r = scale * sqrt(aa * aa + bb * bb); + if (roe < 0) r = -r; + c = da / r; + s = db / r; + z = ONE; + if (ada > adb) z = s; + if ((ada < adb) && (c != ZERO)) z = ONE / c; + + *C = c; + *S = s; + *DA = r; + *DB = z; + } +#endif + + return; +} diff --git a/interface/rotm.c b/interface/rotm.c new file mode 100644 index 000000000..4f026c75d --- /dev/null +++ b/interface/rotm.c @@ -0,0 +1,155 @@ +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *dx, blasint *INCX, FLOAT *dy, blasint *INCY, FLOAT *dparam){ + + blasint n = *N; + blasint incx = *INCX; + blasint incy = *INCY; + +#else + +void CNAME(blasint n, FLOAT *dx, blasint incx, FLOAT *dy, blasint incy, FLOAT *dparam){ + +#endif + + blasint i__1, i__2; + + blasint i__; + FLOAT w, z__; + blasint kx, ky; + FLOAT dh11, dh12, dh22, dh21, dflag; + blasint nsteps; + +#ifndef CBLAS + PRINT_DEBUG_CNAME; +#else + PRINT_DEBUG_CNAME; +#endif + + --dparam; + --dy; + --dx; + + dflag = dparam[1]; + if (n <= 0 || dflag == - 2.0) goto L140; + + if (! (incx == incy && incx > 0)) goto L70; + + nsteps = n * incx; + if (dflag < 0.) { + goto L50; + } else if (dflag == 0) { + goto L10; + } else { + goto L30; + } +L10: + dh12 = dparam[4]; + dh21 = dparam[3]; + i__1 = nsteps; + i__2 = incx; + for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { + w = dx[i__]; + z__ = dy[i__]; + dx[i__] = w + z__ * dh12; + dy[i__] = w * dh21 + z__; +/* L20: */ + } + goto L140; +L30: + dh11 = dparam[2]; + dh22 = dparam[5]; + i__2 = nsteps; + i__1 = incx; + for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) { + w = dx[i__]; + z__ = dy[i__]; + dx[i__] = w * dh11 + z__; + dy[i__] = -w + dh22 * z__; +/* L40: */ + } + goto L140; +L50: + dh11 = dparam[2]; + dh12 = dparam[4]; + dh21 = dparam[3]; + dh22 = dparam[5]; + i__1 = nsteps; + i__2 = incx; + for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { + w = dx[i__]; + z__ = dy[i__]; + dx[i__] = w * dh11 + z__ * dh12; + dy[i__] = w * dh21 + z__ * dh22; +/* L60: */ + } + goto L140; +L70: + kx = 1; + ky = 1; + if (incx < 0) { + kx = (1 - n) * incx + 1; + } + if (incy < 0) { + ky = (1 - n) * incy + 1; + } + + if (dflag < 0.) { + goto L120; + } else if (dflag == 0) { + goto L80; + } else { + goto L100; + } +L80: + dh12 = dparam[4]; + dh21 = dparam[3]; + i__2 = n; + for (i__ = 1; i__ <= i__2; ++i__) { + w = dx[kx]; + z__ = dy[ky]; + dx[kx] = w + z__ * dh12; + dy[ky] = w * dh21 + z__; + kx += incx; + ky += incy; +/* L90: */ + } + goto L140; +L100: + dh11 = dparam[2]; + dh22 = dparam[5]; + i__2 = n; + for (i__ = 1; i__ <= i__2; ++i__) { + w = dx[kx]; + z__ = dy[ky]; + dx[kx] = w * dh11 + z__; + dy[ky] = -w + dh22 * z__; + kx += incx; + ky += incy; +/* L110: */ + } + goto L140; +L120: + dh11 = dparam[2]; + dh12 = dparam[4]; + dh21 = dparam[3]; + dh22 = dparam[5]; + i__2 = n; + for (i__ = 1; i__ <= i__2; ++i__) { + w = dx[kx]; + z__ = dy[ky]; + dx[kx] = w * dh11 + z__ * dh12; + dy[ky] = w * dh21 + z__ * dh22; + kx += incx; + ky += incy; +/* L130: */ + } +L140: + return; +} + diff --git a/interface/rotmg.c b/interface/rotmg.c new file mode 100644 index 000000000..4dbb580eb --- /dev/null +++ b/interface/rotmg.c @@ -0,0 +1,235 @@ +/*************************************************************************** +Copyright (c) 2013, The OpenBLAS Project +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. +3. Neither the name of the OpenBLAS project nor the names of +its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ + +/************************************************************************************** +* 2014/05/02 Saar +* fixed two bugs as reported by Brendan Tracey +* Test with lapack-3.5.0 : OK +* +**************************************************************************************/ + + +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#define GAM 4096.e0 +#define GAMSQ 16777216.e0 +#define RGAMSQ 5.9604645e-8 + +#define TWO 2.e0 + +#ifdef DOUBLE +#define ABS(x) fabs(x) +#else +#define ABS(x) fabsf(x) +#endif + +#ifndef CBLAS + +void NAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT *DY1, FLOAT *dparam){ + + FLOAT dy1 = *DY1; + +#else + +void CNAME(FLOAT *dd1, FLOAT *dd2, FLOAT *dx1, FLOAT dy1, FLOAT *dparam){ + +#endif + + FLOAT du, dp1, dp2, dq2, dq1, dh11, dh21, dh12, dh22, dflag, dtemp; + + if(*dd1 < ZERO) + { + dflag = -ONE; + dh11 = ZERO; + dh12 = ZERO; + dh21 = ZERO; + dh22 = ZERO; + + *dd1 = ZERO; + *dd2 = ZERO; + *dx1 = ZERO; + } + else + { + dp2 = *dd2 * dy1; + if(dp2 == ZERO) + { + dflag = -TWO; + dparam[0] = dflag; + return; + } + dp1 = *dd1 * *dx1; + dq2 = dp2 * dy1; + dq1 = dp1 * *dx1; + if(ABS(dq1) > ABS(dq2)) + { + dh21 = - dy1 / *dx1; + dh12 = dp2 / dp1; + + du = ONE - dh12 * dh21; + if(du > ZERO) + { + dflag = ZERO; + *dd1 = *dd1 / du; + *dd2 = *dd2 / du; + *dx1 = *dx1 * du; + + } + } + else + { + if(dq2 < ZERO) + { + dflag = -ONE; + + dh11 = ZERO; + dh12 = ZERO; + dh21 = ZERO; + dh22 = ZERO; + + *dd1 = ZERO; + *dd2 = ZERO; + *dx1 = ZERO; + } + else + { + dflag = ONE; + + dh11 = dp1 / dp2; + dh22 = *dx1 / dy1; + du = ONE + dh11 * dh22; + dtemp = *dd2 / du; + + *dd2 = *dd1 / du; + *dd1 = dtemp; + *dx1 = dy1 * du; + } + } + + + if(*dd1 != ZERO) + { + while( (*dd1 <= RGAMSQ) || (*dd1 >= GAMSQ) ) + { + if(dflag == ZERO) + { + dh11 = ONE; + dh22 = ONE; + dflag = -ONE; + } + else + { + if(dflag == ONE) + { + dh21 = -ONE; + dh12 = ONE; + dflag = -ONE; + } + } + if( *dd1 <= RGAMSQ ) + { + *dd1 = *dd1 * (GAM * GAM); + *dx1 = *dx1 / GAM; + dh11 = dh11 / GAM; + dh12 = dh12 / GAM; + } + else + { + *dd1 = *dd1 / (GAM * GAM); + *dx1 = *dx1 * GAM; + dh11 = dh11 * GAM; + dh12 = dh12 * GAM; + } + } + } + + if(*dd2 != ZERO) + { + while( (ABS(*dd2) <= RGAMSQ) || (ABS(*dd2) >= GAMSQ) ) + { + if(dflag == ZERO) + { + dh11 = ONE; + dh22 = ONE; + dflag = -ONE; + } + else + { + if(dflag == ONE) + { + dh21 = -ONE; + dh12 = ONE; + dflag = -ONE; + } + } + if( ABS(*dd2) <= RGAMSQ ) + { + *dd2 = *dd2 * (GAM * GAM); + dh21 = dh21 / GAM; + dh22 = dh22 / GAM; + } + else + { + *dd2 = *dd2 / (GAM * GAM); + dh21 = dh21 * GAM; + dh22 = dh22 * GAM; + } + } + } + + } + + if(dflag < ZERO) + { + dparam[1] = dh11; + dparam[2] = dh21; + dparam[3] = dh12; + dparam[4] = dh22; + } + else + { + if(dflag == ZERO) + { + dparam[2] = dh21; + dparam[3] = dh12; + } + else + { + dparam[1] = dh11; + dparam[4] = dh22; + } + } + + + dparam[0] = dflag; + return; +} + + diff --git a/interface/sbmv.c b/interface/sbmv.c new file mode 100644 index 000000000..f82ca537c --- /dev/null +++ b/interface/sbmv.c @@ -0,0 +1,215 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DSBMV " +#else +#define ERROR_NAME "SSBMV " +#endif + +static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qsbmv_U, qsbmv_L, +#elif defined(DOUBLE) + dsbmv_U, dsbmv_L, +#else + ssbmv_U, ssbmv_L, +#endif +}; + +#ifdef SMPTEST +static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qsbmv_thread_U, qsbmv_thread_L, +#elif defined(DOUBLE) + dsbmv_thread_U, dsbmv_thread_L, +#else + ssbmv_thread_U, ssbmv_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + blasint k = *K; + FLOAT alpha = *ALPHA; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta = *BETA; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, blasint k, + FLOAT alpha, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT beta, + FLOAT *y, blasint incy){ + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (sbmv[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (sbmv_thread[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/scal.c b/interface/scal.c new file mode 100644 index 000000000..7b72ca01c --- /dev/null +++ b/interface/scal.c @@ -0,0 +1,112 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX){ + + blasint n = *N; + blasint incx = *INCX; + FLOAT alpha = *ALPHA; + +#else + +void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx){ + +#endif + +#ifdef SMP + int mode, nthreads; +#endif + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (incx <= 0 || n <= 0) return; + + if (alpha == ONE) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + +#ifdef SMP + nthreads = num_cpu_avail(1); + + if (nthreads == 1) { +#endif + + SCAL_K(n, 0, 0, alpha, x, incx, NULL, 0, NULL, 0); + +#ifdef SMP + } else { + +#ifdef DOUBLE + mode = BLAS_DOUBLE | BLAS_REAL; +#else + mode = BLAS_SINGLE | BLAS_REAL; +#endif + + blas_level1_thread(mode, n, 0, 0, +#ifndef CBLAS + ALPHA, +#else + &alpha, +#endif + x, incx, NULL, 0, NULL, 0, (void *)SCAL_K, nthreads); + + } +#endif + + FUNCTION_PROFILE_END(1, n, n); + + IDEBUG_END; + + return; + +} diff --git a/interface/sdsdot.c b/interface/sdsdot.c new file mode 100644 index 000000000..168468c3a --- /dev/null +++ b/interface/sdsdot.c @@ -0,0 +1,101 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +FLOATRET NAME(blasint *N, FLOAT *a, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + FLOATRET ret; + + PRINT_DEBUG_NAME; + + if (n <= 0) return(*a) ; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret = (FLOATRET)(SDSDOT_K(n, x, incx, y, incy) + *a); + + FUNCTION_PROFILE_END(1, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; + +} + +#else + +FLOAT CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + + FLOAT ret; + + PRINT_DEBUG_CNAME; + + if (n <= 0) return (alpha); + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + + ret = SDSDOT_K(n, x, incx, y, incy) + alpha; + + FUNCTION_PROFILE_END(1, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; +} + +#endif diff --git a/interface/spmv.c b/interface/spmv.c new file mode 100644 index 000000000..3f853e56e --- /dev/null +++ b/interface/spmv.c @@ -0,0 +1,207 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSPMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DSPMV " +#else +#define ERROR_NAME "SSPMV " +#endif + +static int (*spmv[])(BLASLONG, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qspmv_U, qspmv_L, +#elif defined(DOUBLE) + dspmv_U, dspmv_L, +#else + sspmv_U, sspmv_L, +#endif +}; + +#ifdef SMPTEST +static int (*spmv_thread[])(BLASLONG, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qspmv_thread_U, qspmv_thread_L, +#elif defined(DOUBLE) + dspmv_thread_U, dspmv_thread_L, +#else + sspmv_thread_U, sspmv_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint incx = *INCX; + FLOAT beta = *BETA; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT alpha, + FLOAT *a, + FLOAT *x, blasint incx, + FLOAT beta, + FLOAT *y, blasint incy){ + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spmv[uplo])(n, alpha, a, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (spmv_thread[uplo])(n, alpha, a, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/spr.c b/interface/spr.c new file mode 100644 index 000000000..874970904 --- /dev/null +++ b/interface/spr.c @@ -0,0 +1,197 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSPR " +#elif defined(DOUBLE) +#define ERROR_NAME "DSPR " +#else +#define ERROR_NAME "SSPR " +#endif + +static int (*spr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + qspr_U, qspr_L, +#elif defined(DOUBLE) + dspr_U, dspr_L, +#else + sspr_U, sspr_L, +#endif +}; + +#ifdef SMPTEST +static int (*spr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + qspr_thread_U, qspr_thread_L, +#elif defined(DOUBLE) + dspr_thread_U, dspr_thread_L, +#else + sspr_thread_U, sspr_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT alpha, + FLOAT *x, blasint incx, + FLOAT *a) { + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spr[uplo])(n, alpha, x, incx, a, buffer); + +#ifdef SMPTEST + } else { + + (spr_thread[uplo])(n, alpha, x, incx, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/spr2.c b/interface/spr2.c new file mode 100644 index 000000000..6ff2110d3 --- /dev/null +++ b/interface/spr2.c @@ -0,0 +1,203 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSPR2 " +#elif defined(DOUBLE) +#define ERROR_NAME "DSPR2 " +#else +#define ERROR_NAME "SSPR2 " +#endif + +static int (*spr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + qspr2_U, qspr2_L, +#elif defined(DOUBLE) + dspr2_U, dspr2_L, +#else + sspr2_U, sspr2_L, +#endif +}; + +#ifdef SMPTEST +static int (*spr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + qspr2_thread_U, qspr2_thread_L, +#elif defined(DOUBLE) + dspr2_thread_U, dspr2_thread_L, +#else + sspr2_thread_U, sspr2_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT alpha, + FLOAT *x, blasint incx, + FLOAT *y, blasint incy, + FLOAT *a) { + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spr2[uplo])(n, alpha, x, incx, y, incy, a, buffer); + +#ifdef SMPTEST + } else { + + (spr2_thread[uplo])(n, alpha, x, incx, y, incy, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/swap.c b/interface/swap.c new file mode 100644 index 000000000..271fa083a --- /dev/null +++ b/interface/swap.c @@ -0,0 +1,115 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + blasint n = *N; + blasint incx = *INCX; + blasint incy = *INCY; + +#else + +void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + +#endif + +#ifdef SMP + int mode, nthreads; + FLOAT dummyalpha[2] = {ZERO, ZERO}; +#endif + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (n <= 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx; + if (incy < 0) y -= (n - 1) * incy; + +#ifdef SMP + nthreads = num_cpu_avail(1); + + //disable multi-thread when incx==0 or incy==0 + //In that case, the threads would be dependent. + if (incx == 0 || incy == 0) + nthreads = 1; + + if (nthreads == 1) { +#endif + + SWAP_K(n, 0, 0, ZERO, x, incx, y, incy, NULL, 0); + +#ifdef SMP + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_REAL; +#else + mode = BLAS_SINGLE | BLAS_REAL; +#endif + + blas_level1_thread(mode, n, 0, 0, dummyalpha, + x, incx, y, incy, NULL, 0, (void *)SWAP_K, nthreads); + } + +#endif + + FUNCTION_PROFILE_END(1, 2 * n, 0); + + IDEBUG_END; + + return; + +} diff --git a/interface/symm.c b/interface/symm.c new file mode 100644 index 000000000..e9765d557 --- /dev/null +++ b/interface/symm.c @@ -0,0 +1,442 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QSYMM " +#elif defined(DOUBLE) +#define ERROR_NAME "DSYMM " +#else +#define ERROR_NAME "SSYMM " +#endif +#else +#ifndef GEMM3M +#ifndef HEMM +#ifdef XDOUBLE +#define ERROR_NAME "XSYMM " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYMM " +#else +#define ERROR_NAME "CSYMM " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XHEMM " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHEMM " +#else +#define ERROR_NAME "CHEMM " +#endif +#endif +#else +#ifndef HEMM +#ifdef XDOUBLE +#define ERROR_NAME "XSYMM3M " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYMM3M " +#else +#define ERROR_NAME "CSYMM3M " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XHEMM3M " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHEMM3M " +#else +#define ERROR_NAME "CHEMM3M " +#endif +#endif +#endif +#endif + +static int (*symm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifndef GEMM3M +#ifndef HEMM + SYMM_LU, SYMM_LL, SYMM_RU, SYMM_RL, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + SYMM_THREAD_LU, SYMM_THREAD_LL, SYMM_THREAD_RU, SYMM_THREAD_RL, +#endif +#else + HEMM_LU, HEMM_LL, HEMM_RU, HEMM_RL, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + HEMM_THREAD_LU, HEMM_THREAD_LL, HEMM_THREAD_RU, HEMM_THREAD_RL, +#endif +#endif +#else +#ifndef HEMM + SYMM3M_LU, SYMM3M_LL, SYMM3M_RU, SYMM3M_RL, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + SYMM3M_THREAD_LU, SYMM3M_THREAD_LL, SYMM3M_THREAD_RU, SYMM3M_THREAD_RL, +#endif +#else + HEMM3M_LU, HEMM3M_LL, HEMM3M_RU, HEMM3M_RL, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + HEMM3M_THREAD_LU, HEMM3M_THREAD_LL, HEMM3M_THREAD_RU, HEMM3M_THREAD_RL, +#endif +#endif +#endif +}; + +#ifndef CBLAS + +void NAME(char *SIDE, char *UPLO, + blasint *M, blasint *N, + FLOAT *alpha, FLOAT *a, blasint *ldA, + FLOAT *b, blasint *ldB, + FLOAT *beta, FLOAT *c, blasint *ldC){ + + char side_arg = *SIDE; + char uplo_arg = *UPLO; + + blas_arg_t args; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + +#if defined(SMPTEST) && !defined(NO_AFFINITY) + int nodes; +#endif + + blasint info; + int side; + int uplo; + + PRINT_DEBUG_NAME; + + args.alpha = (void *)alpha; + args.beta = (void *)beta; + + TOUPPER(side_arg); + TOUPPER(uplo_arg); + + side = -1; + uplo = -1; + + if (side_arg == 'L') side = 0; + if (side_arg == 'R') side = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + args.m = *M; + args.n = *N; + + args.c = (void *)c; + args.ldc = *ldC; + + info = 0; + + if (args.ldc < MAX(1, args.m)) info = 12; + + if (!side) { + args.a = (void *)a; + args.b = (void *)b; + + args.lda = *ldA; + args.ldb = *ldB; + + if (args.ldb < MAX(1, args.m)) info = 9; + if (args.lda < MAX(1, args.m)) info = 7; + + } else { + args.a = (void *)b; + args.b = (void *)a; + + args.lda = *ldB; + args.ldb = *ldA; + + if (args.lda < MAX(1, args.m)) info = 9; + if (args.ldb < MAX(1, args.n)) info = 7; + } + + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, + blasint m, blasint n, +#ifndef COMPLEX + FLOAT alpha, +#else + FLOAT *alpha, +#endif + FLOAT *a, blasint lda, + FLOAT *b, blasint ldb, +#ifndef COMPLEX + FLOAT beta, +#else + FLOAT *beta, +#endif + FLOAT *c, blasint ldc) { + + blas_arg_t args; + int side, uplo; + blasint info; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + +#if defined(SMPTEST) && !defined(NO_AFFINITY) + int nodes; +#endif + + PRINT_DEBUG_CNAME; + +#ifndef COMPLEX + args.alpha = (void *)α + args.beta = (void *)β +#else + args.alpha = (void *)alpha; + args.beta = (void *)beta; +#endif + + args.c = (void *)c; + args.ldc = ldc; + + side = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Side == CblasLeft) side = 0; + if (Side == CblasRight) side = 1; + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + args.m = m; + args.n = n; + + if (args.ldc < MAX(1, args.m)) info = 12; + + if (!side) { + args.a = (void *)a; + args.b = (void *)b; + + args.lda = lda; + args.ldb = ldb; + + if (args.ldb < MAX(1, args.m)) info = 9; + if (args.lda < MAX(1, args.m)) info = 7; + + } else { + args.a = (void *)b; + args.b = (void *)a; + + args.lda = ldb; + args.ldb = lda; + + if (args.lda < MAX(1, args.m)) info = 9; + if (args.ldb < MAX(1, args.n)) info = 7; + } + + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Side == CblasLeft) side = 1; + if (Side == CblasRight) side = 0; + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + args.m = n; + args.n = m; + + if (args.ldc < MAX(1, args.m)) info = 12; + + if (!side) { + args.a = (void *)a; + args.b = (void *)b; + + args.lda = lda; + args.ldb = ldb; + + if (args.ldb < MAX(1, args.m)) info = 9; + if (args.lda < MAX(1, args.m)) info = 7; + + } else { + args.a = (void *)b; + args.b = (void *)a; + + args.lda = ldb; + args.ldb = lda; + + if (args.lda < MAX(1, args.m)) info = 9; + if (args.ldb < MAX(1, args.n)) info = 7; + } + + if (args.n < 0) info = 4; + if (args.m < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (args.m == 0 || args.n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + buffer = (FLOAT *)blas_memory_alloc(0); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); + +#ifdef SMPTEST + args.common = NULL; + args.nthreads = num_cpu_avail(3); + + if (args.nthreads == 1) { +#endif + + (symm[(side << 1) | uplo ])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + + } else { + +#ifndef NO_AFFINITY + nodes = get_num_nodes(); + + if (nodes > 1) { + + args.nthreads /= nodes; + + gemm_thread_mn(mode, &args, NULL, NULL, + symm[4 | (side << 1) | uplo ], sa, sb, nodes); + + } else { +#endif + +#ifndef USE_SIMPLE_THREADED_LEVEL3 + + (symm[4 | (side << 1) | uplo ])(&args, NULL, NULL, sa, sb, 0); + +#else + + GEMM_THREAD(mode, &args, NULL, NULL, symm[(side << 1) | uplo ], sa, sb, args.nthreads); + +#endif + +#ifndef NO_AFFINITY + } +#endif + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, + (!side)? args.m * (args.m / 2 + args.n) : args.n * (args.m + args.n / 2), + (!side)? 2 * args.m * args.m * args.n : 2 * args.m * args.n * args.n); + + IDEBUG_END; + + return; +} diff --git a/interface/symv.c b/interface/symv.c new file mode 100644 index 000000000..f5cff20bc --- /dev/null +++ b/interface/symv.c @@ -0,0 +1,205 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSYMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DSYMV " +#else +#define ERROR_NAME "SSYMV " +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta = *BETA; + blasint incy = *INCY; + + int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + SYMV_U, SYMV_L, + }; + +#ifdef SMPTEST + int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { + SYMV_THREAD_U, SYMV_THREAD_L, + }; +#endif + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, + FLOAT *a, blasint lda, FLOAT *x, blasint incx, FLOAT beta, FLOAT *y, blasint incy) { + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + SYMV_U, SYMV_L, + }; + +#ifdef SMPTEST + int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { + SYMV_THREAD_U, SYMV_THREAD_L, + }; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (beta != ONE) SCAL_K(n, 0, 0, beta, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (symv[uplo])(n, n, alpha, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (symv_thread[uplo])(n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/syr.c b/interface/syr.c new file mode 100644 index 000000000..db2a9d400 --- /dev/null +++ b/interface/syr.c @@ -0,0 +1,200 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSYR " +#elif defined(DOUBLE) +#define ERROR_NAME "DSYR " +#else +#define ERROR_NAME "SSYR " +#endif + +static int (*syr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + qsyr_U, qsyr_L, +#elif defined(DOUBLE) + dsyr_U, dsyr_L, +#else + ssyr_U, ssyr_L, +#endif +}; + +#ifdef SMPTEST +static int (*syr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qsyr_thread_U, qsyr_thread_L, +#elif defined(DOUBLE) + dsyr_thread_U, dsyr_thread_L, +#else + ssyr_thread_U, ssyr_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *a, blasint lda) { + + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (syr[uplo])(n, alpha, x, incx, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (syr_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/syr2.c b/interface/syr2.c new file mode 100644 index 000000000..efe63fe6a --- /dev/null +++ b/interface/syr2.c @@ -0,0 +1,204 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSYR2 " +#elif defined(DOUBLE) +#define ERROR_NAME "DSYR2 " +#else +#define ERROR_NAME "SSYR2 " +#endif + +static int (*syr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + qsyr2_U, qsyr2_L, +#elif defined(DOUBLE) + dsyr2_U, dsyr2_L, +#else + ssyr2_U, ssyr2_L, +#endif +}; + +#ifdef SMPTEST +static int (*syr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qsyr2_thread_U, qsyr2_thread_L, +#elif defined(DOUBLE) + dsyr2_thread_U, dsyr2_thread_L, +#else + ssyr2_thread_U, ssyr2_thread_L, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT *a, blasint lda) { + + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (syr2[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (syr2_thread[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/syr2k.c b/interface/syr2k.c new file mode 100644 index 000000000..470b83958 --- /dev/null +++ b/interface/syr2k.c @@ -0,0 +1,377 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QSYR2K" +#elif defined(DOUBLE) +#define ERROR_NAME "DSYR2K" +#else +#define ERROR_NAME "SSYR2K" +#endif +#else +#ifndef HEMM +#ifdef XDOUBLE +#define ERROR_NAME "XSYR2K" +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYR2K" +#else +#define ERROR_NAME "CSYR2K" +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XHER2K" +#elif defined(DOUBLE) +#define ERROR_NAME "ZHER2K" +#else +#define ERROR_NAME "CHER2K" +#endif +#endif +#endif + +static int (*syr2k[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifndef HEMM + SYR2K_UN, SYR2K_UC, SYR2K_LN, SYR2K_LC, +#else + HER2K_UN, HER2K_UC, HER2K_LN, HER2K_LC, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, + blasint *N, blasint *K, + FLOAT *alpha, FLOAT *a, blasint *ldA, + FLOAT *b, blasint *ldB, + FLOAT *beta, FLOAT *c, blasint *ldC){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + + blas_arg_t args; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + blasint info; + int uplo; + int trans; + int nrowa; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.k = *K; + + args.a = (void *)a; + args.b = (void *)b; + args.c = (void *)c; + + args.lda = *ldA; + args.ldb = *ldB; + args.ldc = *ldC; + + args.alpha = (void *)alpha; + args.beta = (void *)beta; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + + uplo = -1; + trans = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + +#ifndef COMPLEX + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'C') trans = 1; +#else +#ifdef HEMM + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'C') trans = 1; +#else + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; +#endif + +#endif + + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + info = 0; + + if (args.ldc < MAX(1,args.n)) info = 12; + if (args.ldb < MAX(1,nrowa)) info = 9; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, + blasint n, blasint k, +#ifndef COMPLEX + FLOAT alpha, +#else + FLOAT *alpha, +#endif + FLOAT *a, blasint lda, + FLOAT *b, blasint ldb, +#if !defined(COMPLEX) || defined(HEMM) + FLOAT beta, +#else + FLOAT *beta, +#endif + FLOAT *c, blasint ldc) { + + blas_arg_t args; + int uplo, trans; + blasint info, nrowa; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef HEMM + FLOAT CAlpha[2]; +#endif + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + PRINT_DEBUG_CNAME; + + args.n = n; + args.k = k; + + args.a = (void *)a; + args.b = (void *)b; + args.c = (void *)c; + + args.lda = lda; + args.ldb = ldb; + args.ldc = ldc; + +#ifndef COMPLEX + args.alpha = (void *)α +#else + args.alpha = (void *)alpha; +#endif + +#if !defined(COMPLEX) || defined(HEMM) + args.beta = (void *)β +#else + args.beta = (void *)beta; +#endif + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (Trans == CblasNoTrans) trans = 0; +#ifndef COMPLEX + if (Trans == CblasTrans) trans = 1; + if (Trans == CblasConjNoTrans) trans = 0; + if (Trans == CblasConjTrans) trans = 1; +#elif !defined(HEMM) + if (Trans == CblasTrans) trans = 1; +#else + if (Trans == CblasConjTrans) trans = 1; +#endif + + info = -1; + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + if (args.ldc < MAX(1,args.n)) info = 12; + if (args.ldb < MAX(1,nrowa)) info = 9; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + +#ifdef HEMM + CAlpha[0] = alpha[0]; + CAlpha[1] = -alpha[1]; + + args.alpha = (void *)CAlpha; +#endif + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (Trans == CblasNoTrans) trans = 1; +#ifndef COMPLEX + if (Trans == CblasTrans) trans = 0; + if (Trans == CblasConjNoTrans) trans = 1; + if (Trans == CblasConjTrans) trans = 0; +#elif !defined(HEMM) + if (Trans == CblasTrans) trans = 0; +#else + if (Trans == CblasConjTrans) trans = 0; +#endif + + info = -1; + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + if (args.ldc < MAX(1,args.n)) info = 12; + if (args.ldb < MAX(1,nrowa)) info = 9; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (args.n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + buffer = (FLOAT *)blas_memory_alloc(0); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); + +#ifdef SMPTEST + if (!trans){ + mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); + } else { + mode |= (BLAS_TRANSA_T | BLAS_TRANSB_N); + } + + mode |= (uplo << BLAS_UPLO_SHIFT); + + args.common = NULL; + args.nthreads = num_cpu_avail(3); + + if (args.nthreads == 1) { +#endif + + (syr2k[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + + } else { + + syrk_thread(mode, &args, NULL, NULL, syr2k[(uplo << 1) | trans ], sa, sb, args.nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, 2 * args.n * args.k + args.n * args.n, 2 * args.n * args.n * args.k); + + IDEBUG_END; + + return; +} diff --git a/interface/syrk.c b/interface/syrk.c new file mode 100644 index 000000000..1c00b5aa5 --- /dev/null +++ b/interface/syrk.c @@ -0,0 +1,366 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QSYRK " +#elif defined(DOUBLE) +#define ERROR_NAME "DSYRK " +#else +#define ERROR_NAME "SSYRK " +#endif +#else +#ifndef HEMM +#ifdef XDOUBLE +#define ERROR_NAME "XSYRK " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYRK " +#else +#define ERROR_NAME "CSYRK " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XHERK " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHERK " +#else +#define ERROR_NAME "CHERK " +#endif +#endif +#endif + +static int (*syrk[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifndef HEMM + SYRK_UN, SYRK_UC, SYRK_LN, SYRK_LC, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + SYRK_THREAD_UN, SYRK_THREAD_UC, SYRK_THREAD_LN, SYRK_THREAD_LC, +#endif +#else + HERK_UN, HERK_UC, HERK_LN, HERK_LC, +#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) + HERK_THREAD_UN, HERK_THREAD_UC, HERK_THREAD_LN, HERK_THREAD_LC, +#endif +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, + blasint *N, blasint *K, + FLOAT *alpha, FLOAT *a, blasint *ldA, + FLOAT *beta, FLOAT *c, blasint *ldC){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + + blas_arg_t args; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + blasint info; + int uplo; + int trans; + int nrowa; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.k = *K; + + args.a = (void *)a; + args.c = (void *)c; + + args.lda = *ldA; + args.ldc = *ldC; + + args.alpha = (void *)alpha; + args.beta = (void *)beta; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + + uplo = -1; + trans = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + +#ifndef COMPLEX + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'C') trans = 1; +#else +#ifdef HEMM + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'C') trans = 1; +#else + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; +#endif + +#endif + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + info = 0; + + if (args.ldc < MAX(1,args.n)) info = 10; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, + blasint n, blasint k, +#if !defined(COMPLEX) || defined(HEMM) + FLOAT alpha, +#else + FLOAT *alpha, +#endif + FLOAT *a, blasint lda, +#if !defined(COMPLEX) || defined(HEMM) + FLOAT beta, +#else + FLOAT *beta, +#endif + FLOAT *c, blasint ldc) { + + blas_arg_t args; + int uplo, trans; + blasint info, nrowa; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + PRINT_DEBUG_CNAME; + + args.n = n; + args.k = k; + + args.a = (void *)a; + args.c = (void *)c; + + args.lda = lda; + args.ldc = ldc; + +#if !defined(COMPLEX) || defined(HEMM) + args.alpha = (void *)α + args.beta = (void *)β +#else + args.alpha = (void *)alpha; + args.beta = (void *)beta; +#endif + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (Trans == CblasNoTrans) trans = 0; +#ifndef COMPLEX + if (Trans == CblasTrans) trans = 1; + if (Trans == CblasConjNoTrans) trans = 0; + if (Trans == CblasConjTrans) trans = 1; +#elif !defined(HEMM) + if (Trans == CblasTrans) trans = 1; +#else + if (Trans == CblasConjTrans) trans = 1; +#endif + + info = -1; + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + if (args.ldc < MAX(1,args.n)) info = 10; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (Trans == CblasNoTrans) trans = 1; +#ifndef COMPLEX + if (Trans == CblasTrans) trans = 0; + if (Trans == CblasConjNoTrans) trans = 1; + if (Trans == CblasConjTrans) trans = 0; +#elif !defined(HEMM) + if (Trans == CblasTrans) trans = 0; +#else + if (Trans == CblasConjTrans) trans = 0; +#endif + + info = -1; + + nrowa = args.n; + if (trans & 1) nrowa = args.k; + + if (args.ldc < MAX(1,args.n)) info = 10; + if (args.lda < MAX(1,nrowa)) info = 7; + if (args.k < 0) info = 4; + if (args.n < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (args.n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + buffer = (FLOAT *)blas_memory_alloc(0); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); + +#ifdef SMPTEST + if (!trans){ + mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); + } else { + mode |= (BLAS_TRANSA_T | BLAS_TRANSB_N); + } + + mode |= (uplo << BLAS_UPLO_SHIFT); + + args.common = NULL; + args.nthreads = num_cpu_avail(3); + + if (args.nthreads == 1) { +#endif + + (syrk[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + + } else { + +#ifndef USE_SIMPLE_THREADED_LEVEL3 + + (syrk[4 | (uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); + +#else + + syrk_thread(mode, &args, NULL, NULL, syrk[(uplo << 1) | trans ], sa, sb, args.nthreads); + +#endif + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.n * args.k + args.n * args.n / 2, args.n * args.n * args.k); + + IDEBUG_END; + + return; +} diff --git a/interface/tbmv.c b/interface/tbmv.c new file mode 100644 index 000000000..8d08c0e1f --- /dev/null +++ b/interface/tbmv.c @@ -0,0 +1,248 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTBMV " +#else +#define ERROR_NAME "STBMV " +#endif + +static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qtbmv_NUU, qtbmv_NUN, qtbmv_NLU, qtbmv_NLN, + qtbmv_TUU, qtbmv_TUN, qtbmv_TLU, qtbmv_TLN, +#elif defined(DOUBLE) + dtbmv_NUU, dtbmv_NUN, dtbmv_NLU, dtbmv_NLN, + dtbmv_TUU, dtbmv_TUN, dtbmv_TLU, dtbmv_TLN, +#else + stbmv_NUU, stbmv_NUN, stbmv_NLU, stbmv_NLN, + stbmv_TUU, stbmv_TUN, stbmv_TLU, stbmv_TLN, +#endif +}; + +#ifdef SMPTEST +static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qtbmv_thread_NUU, qtbmv_thread_NUN, qtbmv_thread_NLU, qtbmv_thread_NLN, + qtbmv_thread_TUU, qtbmv_thread_TUN, qtbmv_thread_TLU, qtbmv_thread_TLN, +#elif defined(DOUBLE) + dtbmv_thread_NUU, dtbmv_thread_NUN, dtbmv_thread_NLU, dtbmv_thread_NLN, + dtbmv_thread_TUU, dtbmv_thread_TUN, dtbmv_thread_TLU, dtbmv_thread_TLN, +#else + stbmv_thread_NUU, stbmv_thread_NUN, stbmv_thread_NLU, stbmv_thread_NLN, + stbmv_thread_TUU, stbmv_thread_TUN, stbmv_thread_TLU, stbmv_thread_TLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, blasint *K, + FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint k = *K; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); + +#ifdef SMPTEST + } else { + + (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/tbsv.c b/interface/tbsv.c new file mode 100644 index 000000000..a07c4c584 --- /dev/null +++ b/interface/tbsv.c @@ -0,0 +1,213 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTBSV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTBSV " +#else +#define ERROR_NAME "STBSV " +#endif + +static int (*tbsv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qtbsv_NUU, qtbsv_NUN, qtbsv_NLU, qtbsv_NLN, + qtbsv_TUU, qtbsv_TUN, qtbsv_TLU, qtbsv_TLN, +#elif defined(DOUBLE) + dtbsv_NUU, dtbsv_NUN, dtbsv_NLU, dtbsv_NLN, + dtbsv_TUU, dtbsv_TUN, dtbsv_TLU, dtbsv_TLN, +#else + stbsv_NUU, stbsv_NUN, stbsv_NLU, stbsv_NLN, + stbsv_TUU, stbsv_TUN, stbsv_TLU, stbsv_TLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, blasint *K, + FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint k = *K; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (tbsv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/tpmv.c b/interface/tpmv.c new file mode 100644 index 000000000..fde5abb4d --- /dev/null +++ b/interface/tpmv.c @@ -0,0 +1,239 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTPMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTPMV " +#else +#define ERROR_NAME "STPMV " +#endif + +static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qtpmv_NUU, qtpmv_NUN, qtpmv_NLU, qtpmv_NLN, + qtpmv_TUU, qtpmv_TUN, qtpmv_TLU, qtpmv_TLN, +#elif defined(DOUBLE) + dtpmv_NUU, dtpmv_NUN, dtpmv_NLU, dtpmv_NLN, + dtpmv_TUU, dtpmv_TUN, dtpmv_TLU, dtpmv_TLN, +#else + stpmv_NUU, stpmv_NUN, stpmv_NLU, stpmv_NLN, + stpmv_TUU, stpmv_TUN, stpmv_TLU, stpmv_TLN, +#endif +}; + +#ifdef SMPTEST +static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qtpmv_thread_NUU, qtpmv_thread_NUN, qtpmv_thread_NLU, qtpmv_thread_NLN, + qtpmv_thread_TUU, qtpmv_thread_TUN, qtpmv_thread_TLU, qtpmv_thread_TLN, +#elif defined(DOUBLE) + dtpmv_thread_NUU, dtpmv_thread_NUN, dtpmv_thread_NLU, dtpmv_thread_NLN, + dtpmv_thread_TUU, dtpmv_thread_TUN, dtpmv_thread_TLU, dtpmv_thread_TLN, +#else + stpmv_thread_NUU, stpmv_thread_NUN, stpmv_thread_NLU, stpmv_thread_NLN, + stpmv_thread_TUU, stpmv_thread_TUN, stpmv_thread_TLU, stpmv_thread_TLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); + +#ifdef SMPTEST + } else { + + (tpmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/tpsv.c b/interface/tpsv.c new file mode 100644 index 000000000..9dafd0b68 --- /dev/null +++ b/interface/tpsv.c @@ -0,0 +1,204 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTPSV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTPSV " +#else +#define ERROR_NAME "STPSV " +#endif + +static int (*tpsv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qtpsv_NUU, qtpsv_NUN, qtpsv_NLU, qtpsv_NLN, + qtpsv_TUU, qtpsv_TUN, qtpsv_TLU, qtpsv_TLN, +#elif defined(DOUBLE) + dtpsv_NUU, dtpsv_NUN, dtpsv_NLU, dtpsv_NLN, + dtpsv_TUU, dtpsv_TUN, dtpsv_TLU, dtpsv_TLN, +#else + stpsv_NUU, stpsv_NUN, stpsv_NLU, stpsv_NLN, + stpsv_TUU, stpsv_TUN, stpsv_TLU, stpsv_TLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (tpsv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/trmv.c b/interface/trmv.c new file mode 100644 index 000000000..765a114d1 --- /dev/null +++ b/interface/trmv.c @@ -0,0 +1,243 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTRMV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTRMV " +#else +#define ERROR_NAME "STRMV " +#endif + +static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + qtrmv_NUU, qtrmv_NUN, qtrmv_NLU, qtrmv_NLN, + qtrmv_TUU, qtrmv_TUN, qtrmv_TLU, qtrmv_TLN, +#elif defined(DOUBLE) + dtrmv_NUU, dtrmv_NUN, dtrmv_NLU, dtrmv_NLN, + dtrmv_TUU, dtrmv_TUN, dtrmv_TLU, dtrmv_TLN, +#else + strmv_NUU, strmv_NUN, strmv_NLU, strmv_NLN, + strmv_TUU, strmv_TUN, strmv_TLU, strmv_TLN, +#endif +}; + +#ifdef SMPTEST +static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + qtrmv_thread_NUU, qtrmv_thread_NUN, qtrmv_thread_NLU, qtrmv_thread_NLN, + qtrmv_thread_TUU, qtrmv_thread_TUN, qtrmv_thread_TLU, qtrmv_thread_TLN, +#elif defined(DOUBLE) + dtrmv_thread_NUU, dtrmv_thread_NUN, dtrmv_thread_NLU, dtrmv_thread_NLN, + dtrmv_thread_TUU, dtrmv_thread_TUN, dtrmv_thread_TLU, dtrmv_thread_TLN, +#else + strmv_thread_NUU, strmv_thread_NUN, strmv_thread_NLU, strmv_thread_NLN, + strmv_thread_TUU, strmv_thread_TUN, strmv_thread_TLU, strmv_thread_TLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); + +#ifdef SMPTEST + } else { + + (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/trsm.c b/interface/trsm.c new file mode 100644 index 000000000..2b00c4722 --- /dev/null +++ b/interface/trsm.c @@ -0,0 +1,391 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef TRMM +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QTRSM " +#elif defined(DOUBLE) +#define ERROR_NAME "DTRSM " +#else +#define ERROR_NAME "STRSM " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XTRSM " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRSM " +#else +#define ERROR_NAME "CTRSM " +#endif +#endif +#else +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QTRMM " +#elif defined(DOUBLE) +#define ERROR_NAME "DTRMM " +#else +#define ERROR_NAME "STRMM " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XTRMM " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRMM " +#else +#define ERROR_NAME "CTRMM " +#endif +#endif +#endif + +static int (*trsm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifndef TRMM + TRSM_LNUU, TRSM_LNUN, TRSM_LNLU, TRSM_LNLN, + TRSM_LTUU, TRSM_LTUN, TRSM_LTLU, TRSM_LTLN, + TRSM_LRUU, TRSM_LRUN, TRSM_LRLU, TRSM_LRLN, + TRSM_LCUU, TRSM_LCUN, TRSM_LCLU, TRSM_LCLN, + TRSM_RNUU, TRSM_RNUN, TRSM_RNLU, TRSM_RNLN, + TRSM_RTUU, TRSM_RTUN, TRSM_RTLU, TRSM_RTLN, + TRSM_RRUU, TRSM_RRUN, TRSM_RRLU, TRSM_RRLN, + TRSM_RCUU, TRSM_RCUN, TRSM_RCLU, TRSM_RCLN, +#else + TRMM_LNUU, TRMM_LNUN, TRMM_LNLU, TRMM_LNLN, + TRMM_LTUU, TRMM_LTUN, TRMM_LTLU, TRMM_LTLN, + TRMM_LRUU, TRMM_LRUN, TRMM_LRLU, TRMM_LRLN, + TRMM_LCUU, TRMM_LCUN, TRMM_LCLU, TRMM_LCLN, + TRMM_RNUU, TRMM_RNUN, TRMM_RNLU, TRMM_RNLN, + TRMM_RTUU, TRMM_RTUN, TRMM_RTLU, TRMM_RTLN, + TRMM_RRUU, TRMM_RRUN, TRMM_RRLU, TRMM_RRLN, + TRMM_RCUU, TRMM_RCUN, TRMM_RCLU, TRMM_RCLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *SIDE, char *UPLO, char *TRANS, char *DIAG, + blasint *M, blasint *N, FLOAT *alpha, + FLOAT *a, blasint *ldA, FLOAT *b, blasint *ldB){ + + char side_arg = *SIDE; + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blas_arg_t args; + + FLOAT *buffer; + FLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + blasint info; + int side; + int uplo; + int unit; + int trans; + int nrowa; + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + + args.a = (void *)a; + args.b = (void *)b; + + args.lda = *ldA; + args.ldb = *ldB; + + args.beta = (void *)alpha; + + TOUPPER(side_arg); + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + side = -1; + trans = -1; + unit = -1; + uplo = -1; + + if (side_arg == 'L') side = 0; + if (side_arg == 'R') side = 1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + nrowa = args.m; + if (side & 1) nrowa = args.n; + + info = 0; + + if (args.ldb < MAX(1,args.m)) info = 11; + if (args.lda < MAX(1,nrowa)) info = 9; + if (args.n < 0) info = 6; + if (args.m < 0) info = 5; + if (unit < 0) info = 4; + if (trans < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE Trans, enum CBLAS_DIAG Diag, + blasint m, blasint n, +#ifndef COMPLEX + FLOAT alpha, +#else + FLOAT *alpha, +#endif + FLOAT *a, blasint lda, + FLOAT *b, blasint ldb) { + + blas_arg_t args; + int side, uplo, trans, unit; + blasint info, nrowa; + + XFLOAT *buffer; + XFLOAT *sa, *sb; + +#ifdef SMPTEST +#ifndef COMPLEX +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_REAL; +#else + int mode = BLAS_SINGLE | BLAS_REAL; +#endif +#else +#ifdef XDOUBLE + int mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + int mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + int mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif +#endif +#endif + + PRINT_DEBUG_CNAME; + + args.a = (void *)a; + args.b = (void *)b; + + args.lda = lda; + args.ldb = ldb; + +#ifndef COMPLEX + args.beta = (void *)α +#else + args.beta = (void *)alpha; +#endif + + side = -1; + uplo = -1; + trans = -1; + unit = -1; + info = 0; + + if (order == CblasColMajor) { + args.m = m; + args.n = n; + + if (Side == CblasLeft) side = 0; + if (Side == CblasRight) side = 1; + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (Trans == CblasNoTrans) trans = 0; + if (Trans == CblasTrans) trans = 1; +#ifndef COMPLEX + if (Trans == CblasConjNoTrans) trans = 0; + if (Trans == CblasConjTrans) trans = 1; +#else + if (Trans == CblasConjNoTrans) trans = 2; + if (Trans == CblasConjTrans) trans = 3; +#endif + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + nrowa = args.m; + if (side & 1) nrowa = args.n; + + if (args.ldb < MAX(1,args.m)) info = 11; + if (args.lda < MAX(1,nrowa)) info = 9; + if (args.n < 0) info = 6; + if (args.m < 0) info = 5; + if (unit < 0) info = 4; + if (trans < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + } + + if (order == CblasRowMajor) { + args.m = n; + args.n = m; + + if (Side == CblasLeft) side = 1; + if (Side == CblasRight) side = 0; + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (Trans == CblasNoTrans) trans = 0; + if (Trans == CblasTrans) trans = 1; +#ifndef COMPLEX + if (Trans == CblasConjNoTrans) trans = 0; + if (Trans == CblasConjTrans) trans = 1; +#else + if (Trans == CblasConjNoTrans) trans = 2; + if (Trans == CblasConjTrans) trans = 3; +#endif + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + nrowa = args.m; + if (side & 1) nrowa = args.n; + + if (args.ldb < MAX(1,args.m)) info = 11; + if (args.lda < MAX(1,nrowa)) info = 9; + if (args.n < 0) info = 6; + if (args.m < 0) info = 5; + if (unit < 0) info = 4; + if (trans < 0) info = 3; + if (uplo < 0) info = 2; + if (side < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if ((args.m == 0) || (args.n == 0)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + buffer = (FLOAT *)blas_memory_alloc(0); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); + +#ifdef SMPTEST + mode |= (trans << BLAS_TRANSA_SHIFT); + mode |= (side << BLAS_RSIDE_SHIFT); + + args.nthreads = num_cpu_avail(3); + + if (args.nthreads == 1) { +#endif + + (trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + } else { + if (!side) { + gemm_thread_n(mode, &args, NULL, NULL, trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit], sa, sb, args.nthreads); + } else { + gemm_thread_m(mode, &args, NULL, NULL, trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit], sa, sb, args.nthreads); + } + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, + (!side) ? args.m * (args.m + args.n) : args.n * (args.m + args.n), + (!side) ? args.m * args.m * args.n : args.m * args.n * args.n); + + IDEBUG_END; + + return; +} + diff --git a/interface/trsv.c b/interface/trsv.c new file mode 100644 index 000000000..8ef6998db --- /dev/null +++ b/interface/trsv.c @@ -0,0 +1,208 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTRSV " +#elif defined(DOUBLE) +#define ERROR_NAME "DTRSV " +#else +#define ERROR_NAME "STRSV " +#endif + +static int (*trsv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + qtrsv_NUU, qtrsv_NUN, qtrsv_NLU, qtrsv_NLN, + qtrsv_TUU, qtrsv_TUN, qtrsv_TLU, qtrsv_TLN, +#elif defined(DOUBLE) + dtrsv_NUU, dtrsv_NUN, dtrsv_NLU, dtrsv_NLN, + dtrsv_TUU, dtrsv_TUN, dtrsv_TLU, dtrsv_TLN, +#else + strsv_NUU, strsv_NUN, strsv_NLU, strsv_NLN, + strsv_TUU, strsv_TUN, strsv_TLU, strsv_TLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 0; + if (TransA == CblasConjTrans) trans = 1; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 1; + if (TransA == CblasConjTrans) trans = 0; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (trsv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(1, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/trti2.c b/interface/trti2.c new file mode 100644 index 000000000..e119b45af --- /dev/null +++ b/interface/trti2.c @@ -0,0 +1,134 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTRTI2" +#elif defined(DOUBLE) +#define ERROR_NAME "DTRTI2" +#else +#define ERROR_NAME "STRTI2" +#endif + +static blasint (*trti2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifdef XDOUBLE + qtrti2_UU, qtrti2_UN, qtrti2_LU, qtrti2_LN, +#elif defined(DOUBLE) + dtrti2_UU, dtrti2_UN, dtrti2_LU, dtrti2_LN, +#else + strti2_UU, strti2_UN, strti2_LU, strti2_LN, +#endif + }; + +int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint diag_arg = *DIAG; + blasint uplo, diag; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + TOUPPER(diag_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + diag = -1; + if (diag_arg == 'U') diag = 0; + if (diag_arg == 'N') diag = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 5; + if (args.n < 0) info = 3; + if (diag < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (trti2[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + + IDEBUG_END; + + return 0; +} diff --git a/interface/trtri.c b/interface/trtri.c new file mode 100644 index 000000000..07d4790f3 --- /dev/null +++ b/interface/trtri.c @@ -0,0 +1,156 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QTRTRI" +#elif defined(DOUBLE) +#define ERROR_NAME "DTRTRI" +#else +#define ERROR_NAME "STRTRI" +#endif + +static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, +}; + +#ifdef SMPTEST +static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, +}; +#endif + + +int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint diag_arg = *DIAG; + blasint uplo, diag; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + TOUPPER(diag_arg); + + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + diag = -1; + if (diag_arg == 'U') diag = 0; + if (diag_arg == 'N') diag = 1; + + + info = 0; + if (args.lda < MAX(1,args.n)) info = 5; + if (args.n < 0) info = 3; + if (diag < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + if (diag) { + if (AMIN_K(args.n, args.a, args.lda + 1) == ZERO) { + *Info = IAMIN_K(args.n, args.a, args.lda + 1); + return 0; + } + } + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMPTEST + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + } else { + + *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + + IDEBUG_END; + + return 0; +} diff --git a/interface/zaxpy.c b/interface/zaxpy.c new file mode 100644 index 000000000..5ae39552b --- /dev/null +++ b/interface/zaxpy.c @@ -0,0 +1,127 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + blasint n = *N; + blasint incx = *INCX; + blasint incy = *INCY; + +#else + +void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + +#endif + + FLOAT alpha_r = *(ALPHA + 0); + FLOAT alpha_i = *(ALPHA + 1); + +#ifdef SMPTEST + int mode, nthreads; +#endif + +#ifndef CBLAS + PRINT_DEBUG_CNAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (n <= 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx * 2; + if (incy < 0) y -= (n - 1) * incy * 2; + +#ifdef SMPTEST + nthreads = num_cpu_avail(1); + + //disable multi-thread when incx==0 or incy==0 + //In that case, the threads would be dependent. + if (incx == 0 || incy == 0) + nthreads = 1; + + if (nthreads == 1) { +#endif + +#ifndef CONJ + AXPYU_K (n, 0, 0, alpha_r, alpha_i, x, incx, y, incy, NULL, 0); +#else + AXPYC_K(n, 0, 0, alpha_r, alpha_i, x, incx, y, incy, NULL, 0); +#endif + +#ifdef SMPTEST + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif + + blas_level1_thread(mode, n, 0, 0, ALPHA, x, incx, y, incy, NULL, 0, +#ifndef CONJ + (void *)AXPYU_K, +#else + (void *)AXPYC_K, +#endif + nthreads); + } +#endif + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + + return; + +} diff --git a/interface/zdot.c b/interface/zdot.c new file mode 100644 index 000000000..1380ce292 --- /dev/null +++ b/interface/zdot.c @@ -0,0 +1,202 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef RETURN_BY_STRUCT +#ifdef XDOUBLE +#define MYTYPE myxcomplex_t +#elif defined DOUBLE +#define MYTYPE myzcomplex_t +#else +#define MYTYPE myccomplex_t +#endif +#endif + +#ifndef CBLAS + +#ifdef RETURN_BY_STRUCT +MYTYPE NAME( blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { +#elif defined RETURN_BY_STACK +void NAME(FLOAT _Complex *result, blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { +#else +FLOAT _Complex NAME( blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY) { +#endif + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; +#ifndef RETURN_BY_STACK + FLOAT _Complex ret; +#endif +#ifdef RETURN_BY_STRUCT + MYTYPE myret; +#endif + + PRINT_DEBUG_NAME; + + if (n <= 0) { +#ifdef RETURN_BY_STRUCT + myret.r = 0.; + myret.i = 0.; + return myret; +#elif defined RETURN_BY_STACK + *result = ZERO; + return; +#else + return ZERO; +#endif + } + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx * 2; + if (incy < 0) y -= (n - 1) * incy * 2; + +#ifdef RETURN_BY_STRUCT + +#ifndef CONJ + ret = DOTU_K(n, x, incx, y, incy); +#else + ret = DOTC_K(n, x, incx, y, incy); +#endif + + myret.r = CREAL ret; + myret.i = CIMAG ret; + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + + return myret; + +#elif defined RETURN_BY_STACK + +#ifndef CONJ + *result = DOTU_K(n, x, incx, y, incy); +#else + *result = DOTC_K(n, x, incx, y, incy); +#endif + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + +#else + +#ifndef CONJ + ret = DOTU_K(n, x, incx, y, incy); +#else + ret = DOTC_K(n, x, incx, y, incy); +#endif + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; + +#endif + +} + +#else + +#ifdef FORCE_USE_STACK +void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT _Complex *result){ +#else +FLOAT _Complex CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + + FLOAT _Complex ret; +#endif + + PRINT_DEBUG_CNAME; + + if (n <= 0) { +#ifdef FORCE_USE_STACK + *result = ZERO; + return; +#else + return ZERO; +#endif + } + + if (incx < 0) x -= (n - 1) * incx * 2; + if (incy < 0) y -= (n - 1) * incy * 2; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifdef FORCE_USE_STACK + +#ifndef CONJ + *result = DOTU_K(n, x, incx, y, incy); +#else + *result = DOTC_K(n, x, incx, y, incy); +#endif + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + +#else + +#ifndef CONJ + ret = DOTU_K(n, x, incx, y, incy); +#else + ret = DOTC_K(n, x, incx, y, incy); +#endif + + FUNCTION_PROFILE_END(4, 2 * n, 2 * n); + + IDEBUG_END; + + return ret; + +#endif + +} + +#endif diff --git a/interface/zgbmv.c b/interface/zgbmv.c new file mode 100644 index 000000000..b0ebb5f37 --- /dev/null +++ b/interface/zgbmv.c @@ -0,0 +1,271 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XGBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGBMV " +#else +#define ERROR_NAME "CGBMV " +#endif + +static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, + FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xgbmv_n, xgbmv_t, xgbmv_r, xgbmv_c, + xgbmv_o, xgbmv_u, xgbmv_s, xgbmv_d, +#elif defined(DOUBLE) + zgbmv_n, zgbmv_t, zgbmv_r, zgbmv_c, + zgbmv_o, zgbmv_u, zgbmv_s, zgbmv_d, +#else + cgbmv_n, cgbmv_t, cgbmv_r, cgbmv_c, + cgbmv_o, cgbmv_u, cgbmv_s, cgbmv_d, +#endif +}; + +#ifdef SMPTEST +static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT *, + FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xgbmv_thread_n, xgbmv_thread_t, xgbmv_thread_r, xgbmv_thread_c, + xgbmv_thread_o, xgbmv_thread_u, xgbmv_thread_s, xgbmv_thread_d, +#elif defined(DOUBLE) + zgbmv_thread_n, zgbmv_thread_t, zgbmv_thread_r, zgbmv_thread_c, + zgbmv_thread_o, zgbmv_thread_u, zgbmv_thread_s, zgbmv_thread_d, +#else + cgbmv_thread_n, cgbmv_thread_t, cgbmv_thread_r, cgbmv_thread_c, + cgbmv_thread_o, cgbmv_thread_u, cgbmv_thread_s, cgbmv_thread_d, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *TRANS, blasint *M, blasint *N, + blasint *KU, blasint *KL, + FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, + FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char trans = *TRANS; + blasint m = *M; + blasint n = *N; + blasint ku = *KU; + blasint kl = *KL; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + + blasint info; + blasint lenx, leny; + blasint i; + + PRINT_DEBUG_NAME; + + TOUPPER(trans); + + info = 0; + + i = -1; + + if (trans == 'N') i = 0; + if (trans == 'T') i = 1; + if (trans == 'R') i = 2; + if (trans == 'C') i = 3; + if (trans == 'O') i = 4; + if (trans == 'U') i = 5; + if (trans == 'S') i = 6; + if (trans == 'D') i = 7; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (i < 0) info = 1; + + trans = i; + + if (info != 0){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_TRANSPOSE TransA, + blasint m, blasint n, + blasint ku, blasint kl, + FLOAT *ALPHA, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT *BETA, + FLOAT *y, blasint incy){ + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + + FLOAT *buffer; + blasint lenx, leny; + int trans; + blasint info, t; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + info = -1; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + info = -1; + + t = n; + n = m; + m = t; + + t = ku; + ku = kl; + kl = t; + + if (incy == 0) info = 13; + if (incx == 0) info = 10; + if (lda < kl + ku + 1) info = 8; + if (kl < 0) info = 5; + if (ku < 0) info = 4; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if ((m==0) || (n==0)) return; + + lenx = n; + leny = m; + if (trans & 1) lenx = m; + if (trans & 1) leny = n; + + if (beta_r != ONE || beta_i != ZERO) SCAL_K(leny, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha_r == ZERO && alpha_i == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (lenx - 1) * incx * 2; + if (incy < 0) y -= (leny - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (gbmv[(int)trans])(m, n, kl, ku, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + + } else { + + (gbmv_thread[(int)trans])(m, n, kl, ku, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, m * n / 2 + n, m * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zgemv.c b/interface/zgemv.c new file mode 100644 index 000000000..c943b2057 --- /dev/null +++ b/interface/zgemv.c @@ -0,0 +1,259 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XGEMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGEMV " +#else +#define ERROR_NAME "CGEMV " +#endif + +#ifdef SMPTEST +static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xgemv_thread_n, xgemv_thread_t, xgemv_thread_r, xgemv_thread_c, xgemv_thread_o, xgemv_thread_u, xgemv_thread_s, xgemv_thread_d, +#elif defined DOUBLE + zgemv_thread_n, zgemv_thread_t, zgemv_thread_r, zgemv_thread_c, zgemv_thread_o, zgemv_thread_u, zgemv_thread_s, zgemv_thread_d, +#else + cgemv_thread_n, cgemv_thread_t, cgemv_thread_r, cgemv_thread_c, cgemv_thread_o, cgemv_thread_u, cgemv_thread_s, cgemv_thread_d, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *TRANS, blasint *M, blasint *N, + FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, + FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char trans = *TRANS; + blasint m = *M; + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, + FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + GEMV_N, GEMV_T, GEMV_R, GEMV_C, + GEMV_O, GEMV_U, GEMV_S, GEMV_D, + }; + + blasint info; + blasint lenx, leny; + blasint i; + + PRINT_DEBUG_NAME; + + FLOAT alpha_r = *(ALPHA + 0); + FLOAT alpha_i = *(ALPHA + 1); + + FLOAT beta_r = *(BETA + 0); + FLOAT beta_i = *(BETA + 1); + + TOUPPER(trans); + + info = 0; + + i = -1; + + if (trans == 'N') i = 0; + if (trans == 'T') i = 1; + if (trans == 'R') i = 2; + if (trans == 'C') i = 3; + if (trans == 'O') i = 4; + if (trans == 'U') i = 5; + if (trans == 'S') i = 6; + if (trans == 'D') i = 7; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1,m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (i < 0) info = 1; + + trans = i; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_TRANSPOSE TransA, + blasint m, blasint n, + FLOAT *ALPHA, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT *BETA, + FLOAT *y, blasint incy){ + + FLOAT *buffer; + blasint lenx, leny; + int trans; + blasint info, t; +#ifdef SMPTEST + int nthreads; +#endif + + int (*gemv[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, + FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + GEMV_N, GEMV_T, GEMV_R, GEMV_C, + GEMV_O, GEMV_U, GEMV_S, GEMV_D, + }; + + PRINT_DEBUG_CNAME; + + FLOAT alpha_r = *(ALPHA + 0); + FLOAT alpha_i = *(ALPHA + 1); + + FLOAT beta_r = *(BETA + 0); + FLOAT beta_i = *(BETA + 1); + + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1, m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + + } + + if (order == CblasRowMajor) { + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + info = -1; + + t = n; + n = m; + m = t; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < MAX(1, m)) info = 6; + if (n < 0) info = 3; + if (m < 0) info = 2; + if (trans < 0) info = 1; + + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + /* Quick return if possible. */ + + if (m == 0 || n == 0) return; + + lenx = n; + leny = m; + + if (trans & 1) lenx = m; + if (trans & 1) leny = n; + + if (beta_r != ONE || beta_i != ZERO) SCAL_K(leny, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); + + if (alpha_r == ZERO && alpha_i == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (lenx - 1) * incx * 2; + if (incy < 0) y -= (leny - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (gemv[(int)trans])(m, n, 0, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + + } else { + + (gemv_thread[(int)trans])(m, n, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, m * n + m + n, 2 * m * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zger.c b/interface/zger.c new file mode 100644 index 000000000..1b615a513 --- /dev/null +++ b/interface/zger.c @@ -0,0 +1,249 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#ifndef CONJ +#define ERROR_NAME "XGERU " +#else +#define ERROR_NAME "XGERC " +#endif +#elif defined DOUBLE +#ifndef CONJ +#define ERROR_NAME "ZGERU " +#else +#define ERROR_NAME "ZGERC " +#endif +#else +#ifndef CONJ +#define ERROR_NAME "CGERU " +#else +#define ERROR_NAME "CGERC " +#endif +#endif + +#if defined XDOUBLE +#ifndef CONJ +#define GER GERU_K +#define GER_THREAD xger_thread_U +#else +#define GER GERC_K +#define GER_THREAD xger_thread_C +#define GERV GERV_K +#define GERV_THREAD xger_thread_V +#endif +#elif defined DOUBLE +#ifndef CONJ +#define GER GERU_K +#define GER_THREAD zger_thread_U +#else +#define GER GERC_K +#define GER_THREAD zger_thread_C +#define GERV GERV_K +#define GERV_THREAD zger_thread_V +#endif +#else +#ifndef CONJ +#define GER GERU_K +#define GER_THREAD cger_thread_U +#else +#define GER GERC_K +#define GER_THREAD cger_thread_C +#define GERV GERV_K +#define GERV_THREAD cger_thread_V +#endif +#endif + +#ifndef CBLAS + +void NAME(blasint *M, blasint *N, FLOAT *Alpha, + FLOAT *x, blasint *INCX, + FLOAT *y, blasint *INCY, + FLOAT *a, blasint *LDA){ + + blasint m = *M; + blasint n = *N; + FLOAT alpha_r = Alpha[0]; + FLOAT alpha_i = Alpha[1]; + blasint incx = *INCX; + blasint incy = *INCY; + blasint lda = *LDA; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + blasint info; + + PRINT_DEBUG_NAME; + + info = 0; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + + if (info){ + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + blasint m, blasint n, + FLOAT *Alpha, + FLOAT *x, blasint incx, + FLOAT *y, blasint incy, + FLOAT *a, blasint lda) { + + FLOAT alpha_r = Alpha[0]; + FLOAT alpha_i = Alpha[1]; + + FLOAT *buffer; + blasint info, t; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + info = 0; + + if (order == CblasColMajor) { + info = -1; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + } + + if (order == CblasRowMajor) { + info = -1; + + t = n; + n = m; + m = t; + + t = incx; + incx = incy; + incy = t; + + buffer = x; + x = y; + y = buffer; + + if (lda < MAX(1,m)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (m < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + /* Quick return if possible. */ + if (m == 0 || n == 0) return; + + if ((alpha_r == 0.) && (alpha_i == 0.)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incy < 0) y -= (n - 1) * incy * 2; + if (incx < 0) x -= (m - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + +#if !defined(CBLAS) || !defined(CONJ) + GER(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); +#else + if (order == CblasColMajor) { + GER(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); + } else { + GERV(m, n, 0, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); + } +#endif + +#ifdef SMPTEST + + } else { + +#if !defined(CBLAS) || !defined(CONJ) + GER_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); +#else + if (order == CblasColMajor) { + GER_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); + } else { + GERV_THREAD(m, n, Alpha, x, incx, y, incy, a, lda, buffer, nthreads); + } +#endif + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, m * n + m + n, 2 * m * n); + + IDEBUG_END; + + return; + +} diff --git a/interface/zhbmv.c b/interface/zhbmv.c new file mode 100644 index 000000000..717e8f5b0 --- /dev/null +++ b/interface/zhbmv.c @@ -0,0 +1,223 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHBMV " +#else +#define ERROR_NAME "CHBMV " +#endif + +static int (*hbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xhbmv_U, xhbmv_L, xhbmv_V, xhbmv_M, +#elif defined(DOUBLE) + zhbmv_U, zhbmv_L, zhbmv_V, zhbmv_M, +#else + chbmv_U, chbmv_L, chbmv_V, chbmv_M, +#endif +}; + +#ifdef SMPTEST +static int (*hbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xhbmv_thread_U, xhbmv_thread_L, xhbmv_thread_V, xhbmv_thread_M, +#elif defined(DOUBLE) + zhbmv_thread_U, zhbmv_thread_L, zhbmv_thread_V, zhbmv_thread_M, +#else + chbmv_thread_U, chbmv_thread_L, chbmv_thread_V, chbmv_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + blasint k = *K; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + if (uplo_arg == 'V') uplo = 2; + if (uplo_arg == 'M') uplo = 3; + + info = 0; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, blasint k, + FLOAT *ALPHA, + FLOAT *a, blasint lda, + FLOAT *x, blasint incx, + FLOAT *BETA, + FLOAT *y, blasint incy){ + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * COMPSIZE; + if (incy < 0 ) y -= (n - 1) * incy * COMPSIZE; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (hbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (hbmv_thread[uplo])(n, k, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/zhemv.c b/interface/zhemv.c new file mode 100644 index 000000000..1dcccb4d1 --- /dev/null +++ b/interface/zhemv.c @@ -0,0 +1,215 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHEMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHEMV " +#else +#define ERROR_NAME "CHEMV " +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; +#ifdef SMPTEST + int nthreads; +#endif + + int (*hemv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + HEMV_U, HEMV_L, HEMV_V, HEMV_M, + }; + +#ifdef SMPTEST + int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { + HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, + }; +#endif + + blasint info; + int uplo; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + if (uplo_arg == 'V') uplo = 2; + if (uplo_arg == 'M') uplo = 3; + + info = 0; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA, + FLOAT *a, blasint lda, FLOAT *x, blasint incx, FLOAT *BETA, FLOAT *y, blasint incy) { + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + int (*hemv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + HEMV_U, HEMV_L, HEMV_V, HEMV_M, + }; + +#ifdef SMPTEST + int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { + HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, + }; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + if (incy < 0 ) y -= (n - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (hemv[uplo])(n, n, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (hemv_thread[uplo])(n, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zher.c b/interface/zher.c new file mode 100644 index 000000000..237f8d75e --- /dev/null +++ b/interface/zher.c @@ -0,0 +1,200 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHER " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHER " +#else +#define ERROR_NAME "CHER " +#endif + +static int (*her[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + xher_U, xher_L, xher_V, xher_M, +#elif defined(DOUBLE) + zher_U, zher_L, zher_V, zher_M, +#else + cher_U, cher_L, cher_V, cher_M, +#endif +}; + +#ifdef SMPTEST +static int (*her_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xher_thread_U, xher_thread_L, xher_thread_V, xher_thread_M, +#elif defined(DOUBLE) + zher_thread_U, zher_thread_L, zher_thread_V, zher_thread_M, +#else + cher_thread_U, cher_thread_L, cher_thread_V, cher_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *a, blasint lda) { + + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (her[uplo])(n, alpha, x, incx, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (her_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zher2.c b/interface/zher2.c new file mode 100644 index 000000000..c35307556 --- /dev/null +++ b/interface/zher2.c @@ -0,0 +1,207 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHER2 " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHER2 " +#else +#define ERROR_NAME "CHER2 " +#endif + +static int (*her2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + xher2_U, xher2_L, xher2_V, xher2_M, +#elif defined(DOUBLE) + zher2_U, zher2_L, zher2_V, zher2_M, +#else + cher2_U, cher2_L, cher2_V, cher2_M, +#endif +}; + +#ifdef SMPTEST +static int (*her2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xher2_thread_U, xher2_thread_L, xher2_thread_V, xher2_thread_M, +#elif defined(DOUBLE) + zher2_thread_U, zher2_thread_L, zher2_thread_V, zher2_thread_M, +#else + cher2_thread_U, cher2_thread_L, cher2_thread_V, cher2_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint incy, FLOAT *a, blasint lda) { + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (lda < MAX(1, n)) info = 9; + if (incx == 0) info = 7; + if (incy == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + if (incy < 0 ) y -= (n - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (her2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (her2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zhpmv.c b/interface/zhpmv.c new file mode 100644 index 000000000..36cc8d954 --- /dev/null +++ b/interface/zhpmv.c @@ -0,0 +1,213 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHPMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHPMV " +#else +#define ERROR_NAME "CHPMV " +#endif + +static int (*hpmv[])(BLASLONG, FLOAT, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xhpmv_U, xhpmv_L, xhpmv_V, xhpmv_M, +#elif defined(DOUBLE) + zhpmv_U, zhpmv_L, zhpmv_V, zhpmv_M, +#else + chpmv_U, chpmv_L, chpmv_V, chpmv_M, +#endif +}; + +#ifdef SMPTEST +static int (*hpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xhpmv_thread_U, xhpmv_thread_L, xhpmv_thread_V, xhpmv_thread_M, +#elif defined(DOUBLE) + zhpmv_thread_U, zhpmv_thread_L, zhpmv_thread_V, zhpmv_thread_M, +#else + chpmv_thread_U, chpmv_thread_L, chpmv_thread_V, chpmv_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, + FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT *ALPHA, + FLOAT *a, + FLOAT *x, blasint incx, + FLOAT *BETA, + FLOAT *y, blasint incy){ + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, y, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + if (incy < 0 ) y -= (n - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (hpmv[uplo])(n, alpha_r, alpha_i, a, x, incx, y, incy, buffer); + +#ifdef SMPTEST + } else { + + (hpmv_thread[uplo])(n, ALPHA, a, x, incx, y, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zhpr.c b/interface/zhpr.c new file mode 100644 index 000000000..736effd48 --- /dev/null +++ b/interface/zhpr.c @@ -0,0 +1,198 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHPR " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHPR " +#else +#define ERROR_NAME "CHPR " +#endif + +static int (*hpr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + xhpr_U, xhpr_L, xhpr_V, xhpr_M, +#elif defined(DOUBLE) + zhpr_U, zhpr_L, zhpr_V, zhpr_M, +#else + chpr_U, chpr_L, chpr_V, chpr_M, +#endif +}; + +#ifdef SMPTEST +static int (*hpr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + xhpr_thread_U, xhpr_thread_L, xhpr_thread_V, xhpr_thread_M, +#elif defined(DOUBLE) + zhpr_thread_U, zhpr_thread_L, zhpr_thread_V, zhpr_thread_M, +#else + chpr_thread_U, chpr_thread_L, chpr_thread_V, chpr_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha = *ALPHA; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT alpha, + FLOAT *x, blasint incx, + FLOAT *a) { + + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if (alpha == ZERO) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (hpr[uplo])(n, alpha, x, incx, a, buffer); + +#ifdef SMPTEST + + } else { + + (hpr_thread[uplo])(n, alpha, x, incx, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zhpr2.c b/interface/zhpr2.c new file mode 100644 index 000000000..870124f7e --- /dev/null +++ b/interface/zhpr2.c @@ -0,0 +1,207 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XHPR2 " +#elif defined(DOUBLE) +#define ERROR_NAME "ZHPR2 " +#else +#define ERROR_NAME "CHPR2 " +#endif + +static int (*hpr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + xhpr2_U, xhpr2_L, xhpr2_V, xhpr2_M, +#elif defined(DOUBLE) + zhpr2_U, zhpr2_L, zhpr2_V, zhpr2_M, +#else + chpr2_U, chpr2_L, chpr2_V, chpr2_M, +#endif +}; + +#ifdef SMPTEST +static int (*hpr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + xhpr2_thread_U, xhpr2_thread_L, xhpr2_thread_V, xhpr2_thread_M, +#elif defined(DOUBLE) + zhpr2_thread_U, zhpr2_thread_L, zhpr2_thread_V, zhpr2_thread_M, +#else + chpr2_thread_U, chpr2_thread_L, chpr2_thread_V, chpr2_thread_M, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, + enum CBLAS_UPLO Uplo, + blasint n, + FLOAT *ALPHA, + FLOAT *x, blasint incx, + FLOAT *y, blasint incy, + FLOAT *a) { + + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + FLOAT *buffer; + int uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 3; + if (Uplo == CblasLower) uplo = 2; + + info = -1; + + if (incx == 0) info = 7; + if (incy == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + if (incy < 0 ) y -= (n - 1) * incy * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (hpr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); + +#ifdef SMPTEST + } else { + + (hpr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zrot.c b/interface/zrot.c new file mode 100644 index 000000000..f18bbc6d1 --- /dev/null +++ b/interface/zrot.c @@ -0,0 +1,72 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *C, FLOAT *S){ + + BLASLONG n = *N; + BLASLONG incx = *INCX; + BLASLONG incy = *INCY; + FLOAT c = *C; + FLOAT s = *S; + + PRINT_DEBUG_NAME; + + if (n <= 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * 2 * incx; + if (incy < 0) y -= (n - 1) * 2 * incy; + + ROT_K(n, x, incx, y, incy, c, s); + + FUNCTION_PROFILE_END(4, n, n); + + IDEBUG_END; + + return; + +} diff --git a/interface/zrotg.c b/interface/zrotg.c new file mode 100644 index 000000000..e9e8a11df --- /dev/null +++ b/interface/zrotg.c @@ -0,0 +1,115 @@ +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ + + PRINT_DEBUG_NAME; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) + + long double da_r = *(DA + 0); + long double da_i = *(DA + 1); + long double db_r = *(DB + 0); + long double db_i = *(DB + 1); + long double r; + + long double ada = fabs(da_r) + fabs(da_i); + + if (ada == ZERO) { + *C = ZERO; + *(S + 0) = ONE; + *(S + 1) = ZERO; + *(DA + 0) = db_r; + *(DA + 1) = db_i; + } else { + long double alpha_r, alpha_i; + + ada = sqrt(da_r * da_r + da_i * da_i); + + r = sqrt(da_r * da_r + da_i * da_i + db_r * db_r + db_i * db_i); + + alpha_r = da_r / ada; + alpha_i = da_i / ada; + + *(C + 0) = ada / r; + *(S + 0) = (alpha_r * db_r + alpha_i *db_i) / r; + *(S + 1) = (alpha_i * db_r - alpha_r *db_i) / r; + *(DA + 0) = alpha_r * r; + *(DA + 1) = alpha_i * r; + } +#else + FLOAT da_r = *(DA + 0); + FLOAT da_i = *(DA + 1); + FLOAT db_r = *(DB + 0); + FLOAT db_i = *(DB + 1); + FLOAT r; + + FLOAT ada = fabs(da_r) + fabs(da_i); + FLOAT adb; + + if (ada == ZERO) { + *C = ZERO; + *(S + 0) = ONE; + *(S + 1) = ZERO; + *(DA + 0) = db_r; + *(DA + 1) = db_i; + } else { + FLOAT scale; + FLOAT aa_r, aa_i, bb_r, bb_i; + FLOAT alpha_r, alpha_i; + + aa_r = fabs(da_r); + aa_i = fabs(da_i); + + if (aa_i > aa_r) { + aa_r = fabs(da_i); + aa_i = fabs(da_r); + } + + scale = (aa_i / aa_r); + ada = aa_r * sqrt(ONE + scale * scale); + + bb_r = fabs(db_r); + bb_i = fabs(db_i); + + if (bb_i > bb_r) { + bb_r = fabs(bb_i); + bb_i = fabs(bb_r); + } + + scale = (bb_i / bb_r); + adb = bb_r * sqrt(ONE + scale * scale); + + scale = ada + adb; + + aa_r = da_r / scale; + aa_i = da_i / scale; + bb_r = db_r / scale; + bb_i = db_i / scale; + + r = scale * sqrt(aa_r * aa_r + aa_i * aa_i + bb_r * bb_r + bb_i * bb_i); + + alpha_r = da_r / ada; + alpha_i = da_i / ada; + + *(C + 0) = ada / r; + *(S + 0) = (alpha_r * db_r + alpha_i *db_i) / r; + *(S + 1) = (alpha_i * db_r - alpha_r *db_i) / r; + *(DA + 0) = alpha_r * r; + *(DA + 1) = alpha_i * r; + } +#endif + + FUNCTION_PROFILE_END(4, 4, 4); + + IDEBUG_END; + + return; +} diff --git a/interface/zsbmv.c b/interface/zsbmv.c new file mode 100644 index 000000000..110b8e4f1 --- /dev/null +++ b/interface/zsbmv.c @@ -0,0 +1,157 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XSBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSBMV " +#else +#define ERROR_NAME "CSBMV " +#endif + +static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xsbmv_U, xsbmv_L, +#elif defined(DOUBLE) + zsbmv_U, zsbmv_L, +#else + csbmv_U, csbmv_L, +#endif +}; + +#ifdef SMPTEST +static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xsbmv_thread_U, xsbmv_thread_L, +#elif defined(DOUBLE) + zsbmv_thread_U, zsbmv_thread_L, +#else + csbmv_thread_U, csbmv_thread_L, +#endif +}; +#endif + +void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + blasint k = *K; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 11; + if (incx == 0) info = 8; + if (lda < k + 1) info = 6; + if (k < 0) info = 3; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; + if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (sbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); + +#ifdef SMPTEST + } else { + + (sbmv_thread[uplo])(n, k, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/zscal.c b/interface/zscal.c new file mode 100644 index 000000000..5c894d778 --- /dev/null +++ b/interface/zscal.c @@ -0,0 +1,117 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX){ + + blasint n = *N; + blasint incx = *INCX; + +#ifndef SSCAL + FLOAT *alpha=ALPHA; +#else + FLOAT alpha[2] = {ALPHA[0], ZERO}; +#endif + +#else + +#ifndef SSCAL +void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx){ + + FLOAT *alpha=ALPHA; +#else +void CNAME(blasint n, FLOAT alpha_r, FLOAT *x, blasint incx){ + + FLOAT alpha[2] = {alpha_r, ZERO}; +#endif +#endif + +#ifdef SMPTEST + int mode; + int nthreads; +#endif + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (incx <= 0 || n <= 0) return; + + if ((alpha[0] == ONE) && (alpha[1] == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifdef SMPTEST + nthreads = num_cpu_avail(1); + + if (nthreads == 1) { +#endif + + SCAL_K(n, 0, 0, alpha[0], alpha[1], x, incx, NULL, 0, NULL, 0); + +#ifdef SMPTEST + } else { +#ifdef DOUBLE + mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif + + blas_level1_thread(mode, n, 0, 0, alpha, x, incx, NULL, 0, NULL, 0, (void *)SCAL_K, nthreads); + + } +#endif + + FUNCTION_PROFILE_END(4, n, n); + + IDEBUG_END; + + return; + +} diff --git a/interface/zspmv.c b/interface/zspmv.c new file mode 100644 index 000000000..65550872d --- /dev/null +++ b/interface/zspmv.c @@ -0,0 +1,154 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "ZSPMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSPMV " +#else +#define ERROR_NAME "CSPMV " +#endif + +static int (*spmv[])(BLASLONG, FLOAT, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xspmv_U, xspmv_L, +#elif defined(DOUBLE) + zspmv_U, zspmv_L, +#else + cspmv_U, cspmv_L, +#endif +}; + +#ifdef SMPTEST +static int (*spmv_thread[])(BLASLONG, FLOAT *, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xspmv_thread_U, xspmv_thread_L, +#elif defined(DOUBLE) + zspmv_thread_U, zspmv_thread_L, +#else + cspmv_thread_U, cspmv_thread_L, +#endif +}; +#endif + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, + FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 9; + if (incx == 0) info = 6; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; + if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spmv[uplo])(n, alpha_r, alpha_i, a, b, incx, c, incy, buffer); + +#ifdef SMPTEST + + } else { + + (spmv_thread[uplo])(n, ALPHA, a, b, incx, c, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zspr.c b/interface/zspr.c new file mode 100644 index 000000000..b38ccb5d6 --- /dev/null +++ b/interface/zspr.c @@ -0,0 +1,146 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XSPR " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSPR " +#else +#define ERROR_NAME "CSPR " +#endif + +static int (*spr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + xspr_U, xspr_L, +#elif defined(DOUBLE) + zspr_U, zspr_L, +#else + cspr_U, cspr_L, +#endif +}; + +#ifdef SMPTEST +static int (*spr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + xspr_thread_U, xspr_thread_L, +#elif defined(DOUBLE) + zspr_thread_U, zspr_thread_L, +#else + cspr_thread_U, cspr_thread_L, +#endif +}; +#endif + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spr[uplo])(n, alpha_r, alpha_i, x, incx, a, buffer); + +#ifdef SMPTEST + } else { + + (spr_thread[uplo])(n, ALPHA, x, incx, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zspr2.c b/interface/zspr2.c new file mode 100644 index 000000000..085e8bb7f --- /dev/null +++ b/interface/zspr2.c @@ -0,0 +1,149 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XSPR2 " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSPR2 " +#else +#define ERROR_NAME "CSPR2 " +#endif + +static int (*spr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { +#ifdef XDOUBLE + xspr2_U, xspr2_L, +#elif defined(DOUBLE) + zspr2_U, zspr2_L, +#else + cspr2_U, cspr2_L, +#endif +}; + +#ifdef SMPTEST +static int (*spr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { +#ifdef XDOUBLE + xspr2_thread_U, xspr2_thread_L, +#elif defined(DOUBLE) + zspr2_thread_U, zspr2_thread_L, +#else + cspr2_thread_U, cspr2_thread_L, +#endif +}; +#endif + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (spr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); + +#ifdef SMPTEST + } else { + + (spr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zswap.c b/interface/zswap.c new file mode 100644 index 000000000..ef35f107f --- /dev/null +++ b/interface/zswap.c @@ -0,0 +1,116 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef CBLAS + +void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){ + + blasint n = *N; + blasint incx = *INCX; + blasint incy = *INCY; + +#else + +void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ + +#endif + +#ifdef SMPTEST + int mode; + FLOAT dummyalpha[2] = {ZERO, ZERO}; + int nthreads; +#endif + +#ifndef CBLAS + PRINT_DEBUG_NAME; +#else + PRINT_DEBUG_CNAME; +#endif + + if (n <= 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0) x -= (n - 1) * incx * 2; + if (incy < 0) y -= (n - 1) * incy * 2; + +#ifdef SMPTEST + nthreads = num_cpu_avail(1); + + //disable multi-thread when incx==0 or incy==0 + //In that case, the threads would be dependent. + if (incx == 0 || incy == 0) + nthreads = 1; + + if (nthreads == 1) { +#endif + + SWAP_K(n, 0, 0, ZERO, ZERO, x, incx, y, incy, NULL, 0); + +#ifdef SMPTEST + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif + + blas_level1_thread(mode, n, 0, 0, dummyalpha, + x, incx, y, incy, NULL, 0, (void *)SWAP_K, nthreads); + + } +#endif + + FUNCTION_PROFILE_END(2, 2 * n, 0); + + IDEBUG_END; + + return; + +} diff --git a/interface/zsymv.c b/interface/zsymv.c new file mode 100644 index 000000000..15bceeebe --- /dev/null +++ b/interface/zsymv.c @@ -0,0 +1,143 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XSYMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYMV " +#else +#define ERROR_NAME "CSYMV " +#endif + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, + FLOAT *b, blasint *INCX, FLOAT *BETA, FLOAT *c, blasint *INCY){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + FLOAT beta_r = BETA[0]; + FLOAT beta_i = BETA[1]; + blasint incy = *INCY; + + int (*symv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { + SYMV_U, SYMV_L, + }; + +#ifdef SMPTEST + int (*symv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { + SYMV_THREAD_U, SYMV_THREAD_L, + }; +#endif + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incy == 0) info = 10; + if (incx == 0) info = 7; + if (lda < MAX(1, n)) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((beta_r != ONE) || (beta_i != ZERO)) SCAL_K(n, 0, 0, beta_r, beta_i, c, abs(incy), NULL, 0, NULL, 0); + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) b -= (n - 1) * incx * COMPSIZE; + if (incy < 0 ) c -= (n - 1) * incy * COMPSIZE; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (symv[uplo])(n, n, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); + +#ifdef SMPTEST + } else { + + (symv_thread[uplo])(n, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zsyr.c b/interface/zsyr.c new file mode 100644 index 000000000..d15801cdc --- /dev/null +++ b/interface/zsyr.c @@ -0,0 +1,203 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XSYR " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYR " +#else +#define ERROR_NAME "CSYR " +#endif + +static int (*syr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + xsyr_U, xsyr_L, +#elif defined(DOUBLE) + zsyr_U, zsyr_L, +#else + csyr_U, csyr_L, +#endif +}; + +#ifdef SMPTEST +static int (*syr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xsyr_thread_U, xsyr_thread_L, +#elif defined(DOUBLE) + zsyr_thread_U, zsyr_thread_L, +#else + csyr_thread_U, csyr_thread_L, +#endif +}; +#endif + + +#ifndef CBLAS + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLOAT *x, int incx, FLOAT *a, int lda) { + + FLOAT *buffer; + int trans, uplo; + blasint info; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + trans = -1; + uplo = -1; + info = 0; + + if (order == CblasColMajor) { + + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + } + + if (order == CblasRowMajor) { + + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + info = -1; + + if (lda < MAX(1, n)) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (syr[uplo])(n, alpha_r, alpha_i, x, incx, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (syr_thread[uplo])(n, ALPHA, x, incx, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/zsyr2.c b/interface/zsyr2.c new file mode 100644 index 000000000..bb7e2e191 --- /dev/null +++ b/interface/zsyr2.c @@ -0,0 +1,151 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QSYR2 " +#elif defined(DOUBLE) +#define ERROR_NAME "ZSYR2 " +#else +#define ERROR_NAME "CSYR2 " +#endif + +static int (*syr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + xsyr2_U, xsyr2_L, +#elif defined(DOUBLE) + zsyr2_U, zsyr2_L, +#else + csyr2_U, csyr2_L, +#endif +}; + +#ifdef SMPTEST +static int (*syr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xsyr2_thread_U, xsyr2_thread_L, +#elif defined(DOUBLE) + zsyr2_thread_U, zsyr2_thread_L, +#else + csyr2_thread_U, csyr2_thread_L, +#endif +}; +#endif + +void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, + FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY, FLOAT *a, blasint *LDA){ + + char uplo_arg = *UPLO; + blasint n = *N; + FLOAT alpha_r = ALPHA[0]; + FLOAT alpha_i = ALPHA[1]; + blasint lda = *LDA; + blasint incx = *INCX; + blasint incy = *INCY; + + blasint info; + int uplo; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + uplo = -1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (lda < MAX(1, n)) info = 9; + if (incy == 0) info = 7; + if (incx == 0) info = 5; + if (n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + if (n == 0) return; + + if ((alpha_r == ZERO) && (alpha_i == ZERO)) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx; + if (incy < 0 ) y -= (n - 1) * incy; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (syr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); + +#ifdef SMPTEST + } else { + + (syr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + 2 * n, 2 * n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/ztbmv.c b/interface/ztbmv.c new file mode 100644 index 000000000..fb8873bc0 --- /dev/null +++ b/interface/ztbmv.c @@ -0,0 +1,260 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTBMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTBMV " +#else +#define ERROR_NAME "CTBMV " +#endif + +static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xtbmv_NUU, xtbmv_NUN, xtbmv_NLU, xtbmv_NLN, + xtbmv_TUU, xtbmv_TUN, xtbmv_TLU, xtbmv_TLN, + xtbmv_RUU, xtbmv_RUN, xtbmv_RLU, xtbmv_RLN, + xtbmv_CUU, xtbmv_CUN, xtbmv_CLU, xtbmv_CLN, +#elif defined(DOUBLE) + ztbmv_NUU, ztbmv_NUN, ztbmv_NLU, ztbmv_NLN, + ztbmv_TUU, ztbmv_TUN, ztbmv_TLU, ztbmv_TLN, + ztbmv_RUU, ztbmv_RUN, ztbmv_RLU, ztbmv_RLN, + ztbmv_CUU, ztbmv_CUN, ztbmv_CLU, ztbmv_CLN, +#else + ctbmv_NUU, ctbmv_NUN, ctbmv_NLU, ctbmv_NLN, + ctbmv_TUU, ctbmv_TUN, ctbmv_TLU, ctbmv_TLN, + ctbmv_RUU, ctbmv_RUN, ctbmv_RLU, ctbmv_RLN, + ctbmv_CUU, ctbmv_CUN, ctbmv_CLU, ctbmv_CLN, +#endif +}; + +#ifdef SMPTEST +static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xtbmv_thread_NUU, xtbmv_thread_NUN, xtbmv_thread_NLU, xtbmv_thread_NLN, + xtbmv_thread_TUU, xtbmv_thread_TUN, xtbmv_thread_TLU, xtbmv_thread_TLN, + xtbmv_thread_RUU, xtbmv_thread_RUN, xtbmv_thread_RLU, xtbmv_thread_RLN, + xtbmv_thread_CUU, xtbmv_thread_CUN, xtbmv_thread_CLU, xtbmv_thread_CLN, +#elif defined(DOUBLE) + ztbmv_thread_NUU, ztbmv_thread_NUN, ztbmv_thread_NLU, ztbmv_thread_NLN, + ztbmv_thread_TUU, ztbmv_thread_TUN, ztbmv_thread_TLU, ztbmv_thread_TLN, + ztbmv_thread_RUU, ztbmv_thread_RUN, ztbmv_thread_RLU, ztbmv_thread_RLN, + ztbmv_thread_CUU, ztbmv_thread_CUN, ztbmv_thread_CLU, ztbmv_thread_CLN, +#else + ctbmv_thread_NUU, ctbmv_thread_NUN, ctbmv_thread_NLU, ctbmv_thread_NLN, + ctbmv_thread_TUU, ctbmv_thread_TUN, ctbmv_thread_TLU, ctbmv_thread_TLN, + ctbmv_thread_RUU, ctbmv_thread_RUN, ctbmv_thread_RLU, ctbmv_thread_RLN, + ctbmv_thread_CUU, ctbmv_thread_CUN, ctbmv_thread_CLU, ctbmv_thread_CLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, blasint *K, + FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint k = *K; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); + +#ifdef SMPTEST + } else { + + (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/ztbsv.c b/interface/ztbsv.c new file mode 100644 index 000000000..3846a4b3d --- /dev/null +++ b/interface/ztbsv.c @@ -0,0 +1,219 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTBSV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTBSV " +#else +#define ERROR_NAME "CTBSV " +#endif + +static int (*tbsv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xtbsv_NUU, xtbsv_NUN, xtbsv_NLU, xtbsv_NLN, + xtbsv_TUU, xtbsv_TUN, xtbsv_TLU, xtbsv_TLN, + xtbsv_RUU, xtbsv_RUN, xtbsv_RLU, xtbsv_RLN, + xtbsv_CUU, xtbsv_CUN, xtbsv_CLU, xtbsv_CLN, +#elif defined(DOUBLE) + ztbsv_NUU, ztbsv_NUN, ztbsv_NLU, ztbsv_NLN, + ztbsv_TUU, ztbsv_TUN, ztbsv_TLU, ztbsv_TLN, + ztbsv_RUU, ztbsv_RUN, ztbsv_RLU, ztbsv_RLN, + ztbsv_CUU, ztbsv_CUN, ztbsv_CLU, ztbsv_CLN, +#else + ctbsv_NUU, ctbsv_NUN, ctbsv_NLU, ctbsv_NLN, + ctbsv_TUU, ctbsv_TUN, ctbsv_TLU, ctbsv_TLN, + ctbsv_RUU, ctbsv_RUN, ctbsv_RLU, ctbsv_RLN, + ctbsv_CUU, ctbsv_CUN, ctbsv_CLU, ctbsv_CLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, blasint *K, + FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint k = *K; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, blasint k, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 9; + if (lda < k + 1) info = 7; + if (k < 0) info = 5; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (tbsv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * k / 2 + n, n * k); + + IDEBUG_END; + + return; +} diff --git a/interface/ztpmv.c b/interface/ztpmv.c new file mode 100644 index 000000000..2f7fe3b63 --- /dev/null +++ b/interface/ztpmv.c @@ -0,0 +1,252 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTPMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTPMV " +#else +#define ERROR_NAME "CTPMV " +#endif + +static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xtpmv_NUU, xtpmv_NUN, xtpmv_NLU, xtpmv_NLN, + xtpmv_TUU, xtpmv_TUN, xtpmv_TLU, xtpmv_TLN, + xtpmv_RUU, xtpmv_RUN, xtpmv_RLU, xtpmv_RLN, + xtpmv_CUU, xtpmv_CUN, xtpmv_CLU, xtpmv_CLN, +#elif defined(DOUBLE) + ztpmv_NUU, ztpmv_NUN, ztpmv_NLU, ztpmv_NLN, + ztpmv_TUU, ztpmv_TUN, ztpmv_TLU, ztpmv_TLN, + ztpmv_RUU, ztpmv_RUN, ztpmv_RLU, ztpmv_RLN, + ztpmv_CUU, ztpmv_CUN, ztpmv_CLU, ztpmv_CLN, +#else + ctpmv_NUU, ctpmv_NUN, ctpmv_NLU, ctpmv_NLN, + ctpmv_TUU, ctpmv_TUN, ctpmv_TLU, ctpmv_TLN, + ctpmv_RUU, ctpmv_RUN, ctpmv_RLU, ctpmv_RLN, + ctpmv_CUU, ctpmv_CUN, ctpmv_CLU, ctpmv_CLN, +#endif +}; + +#ifdef SMPTEST +static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xtpmv_thread_NUU, xtpmv_thread_NUN, xtpmv_thread_NLU, xtpmv_thread_NLN, + xtpmv_thread_TUU, xtpmv_thread_TUN, xtpmv_thread_TLU, xtpmv_thread_TLN, + xtpmv_thread_RUU, xtpmv_thread_RUN, xtpmv_thread_RLU, xtpmv_thread_RLN, + xtpmv_thread_CUU, xtpmv_thread_CUN, xtpmv_thread_CLU, xtpmv_thread_CLN, +#elif defined(DOUBLE) + ztpmv_thread_NUU, ztpmv_thread_NUN, ztpmv_thread_NLU, ztpmv_thread_NLN, + ztpmv_thread_TUU, ztpmv_thread_TUN, ztpmv_thread_TLU, ztpmv_thread_TLN, + ztpmv_thread_RUU, ztpmv_thread_RUN, ztpmv_thread_RLU, ztpmv_thread_RLN, + ztpmv_thread_CUU, ztpmv_thread_CUN, ztpmv_thread_CLU, ztpmv_thread_CLN, +#else + ctpmv_thread_NUU, ctpmv_thread_NUN, ctpmv_thread_NLU, ctpmv_thread_NLN, + ctpmv_thread_TUU, ctpmv_thread_TUN, ctpmv_thread_TLU, ctpmv_thread_TLN, + ctpmv_thread_RUU, ctpmv_thread_RUN, ctpmv_thread_RLU, ctpmv_thread_RLN, + ctpmv_thread_CUU, ctpmv_thread_CUN, ctpmv_thread_CLU, ctpmv_thread_CLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; +#ifdef SMPTEST + int nthreads; +#endif + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); + +#ifdef SMPTEST + + } else { + + (tpmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/ztpsv.c b/interface/ztpsv.c new file mode 100644 index 000000000..fde500e37 --- /dev/null +++ b/interface/ztpsv.c @@ -0,0 +1,210 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTPSV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTPSV " +#else +#define ERROR_NAME "CTPSV " +#endif + +static int (*tpsv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xtpsv_NUU, xtpsv_NUN, xtpsv_NLU, xtpsv_NLN, + xtpsv_TUU, xtpsv_TUN, xtpsv_TLU, xtpsv_TLN, + xtpsv_RUU, xtpsv_RUN, xtpsv_RLU, xtpsv_RLN, + xtpsv_CUU, xtpsv_CUN, xtpsv_CLU, xtpsv_CLN, +#elif defined(DOUBLE) + ztpsv_NUU, ztpsv_NUN, ztpsv_NLU, ztpsv_NLN, + ztpsv_TUU, ztpsv_TUN, ztpsv_TLU, ztpsv_TLN, + ztpsv_RUU, ztpsv_RUN, ztpsv_RLU, ztpsv_RLN, + ztpsv_CUU, ztpsv_CUN, ztpsv_CLU, ztpsv_CLN, +#else + ctpsv_NUU, ctpsv_NUN, ctpsv_NLU, ctpsv_NLN, + ctpsv_TUU, ctpsv_TUN, ctpsv_TLU, ctpsv_TLN, + ctpsv_RUU, ctpsv_RUN, ctpsv_RLU, ctpsv_RLN, + ctpsv_CUU, ctpsv_CUN, ctpsv_CLU, ctpsv_CLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 7; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (tpsv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/ztrmv.c b/interface/ztrmv.c new file mode 100644 index 000000000..1ebee3ab8 --- /dev/null +++ b/interface/ztrmv.c @@ -0,0 +1,255 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTRMV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRMV " +#else +#define ERROR_NAME "CTRMV " +#endif + +static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = { +#ifdef XDOUBLE + xtrmv_NUU, xtrmv_NUN, xtrmv_NLU, xtrmv_NLN, + xtrmv_TUU, xtrmv_TUN, xtrmv_TLU, xtrmv_TLN, + xtrmv_RUU, xtrmv_RUN, xtrmv_RLU, xtrmv_RLN, + xtrmv_CUU, xtrmv_CUN, xtrmv_CLU, xtrmv_CLN, +#elif defined(DOUBLE) + ztrmv_NUU, ztrmv_NUN, ztrmv_NLU, ztrmv_NLN, + ztrmv_TUU, ztrmv_TUN, ztrmv_TLU, ztrmv_TLN, + ztrmv_RUU, ztrmv_RUN, ztrmv_RLU, ztrmv_RLN, + ztrmv_CUU, ztrmv_CUN, ztrmv_CLU, ztrmv_CLN, +#else + ctrmv_NUU, ctrmv_NUN, ctrmv_NLU, ctrmv_NLN, + ctrmv_TUU, ctrmv_TUN, ctrmv_TLU, ctrmv_TLN, + ctrmv_RUU, ctrmv_RUN, ctrmv_RLU, ctrmv_RLN, + ctrmv_CUU, ctrmv_CUN, ctrmv_CLU, ctrmv_CLN, +#endif +}; + +#ifdef SMPTEST +static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { +#ifdef XDOUBLE + xtrmv_thread_NUU, xtrmv_thread_NUN, xtrmv_thread_NLU, xtrmv_thread_NLN, + xtrmv_thread_TUU, xtrmv_thread_TUN, xtrmv_thread_TLU, xtrmv_thread_TLN, + xtrmv_thread_RUU, xtrmv_thread_RUN, xtrmv_thread_RLU, xtrmv_thread_RLN, + xtrmv_thread_CUU, xtrmv_thread_CUN, xtrmv_thread_CLU, xtrmv_thread_CLN, +#elif defined(DOUBLE) + ztrmv_thread_NUU, ztrmv_thread_NUN, ztrmv_thread_NLU, ztrmv_thread_NLN, + ztrmv_thread_TUU, ztrmv_thread_TUN, ztrmv_thread_TLU, ztrmv_thread_TLN, + ztrmv_thread_RUU, ztrmv_thread_RUN, ztrmv_thread_RLU, ztrmv_thread_RLN, + ztrmv_thread_CUU, ztrmv_thread_CUN, ztrmv_thread_CLU, ztrmv_thread_CLN, +#else + ctrmv_thread_NUU, ctrmv_thread_NUN, ctrmv_thread_NLU, ctrmv_thread_NLN, + ctrmv_thread_TUU, ctrmv_thread_TUN, ctrmv_thread_TLU, ctrmv_thread_TLN, + ctrmv_thread_RUU, ctrmv_thread_RUN, ctrmv_thread_RLU, ctrmv_thread_RLN, + ctrmv_thread_CUU, ctrmv_thread_CUN, ctrmv_thread_CLU, ctrmv_thread_CLN, +#endif +}; +#endif + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; +#ifdef SMPTEST + int nthreads; +#endif + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + +#ifdef SMPTEST + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); + +#ifdef SMPTEST + } else { + + (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); + + } +#endif + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/ztrsv.c b/interface/ztrsv.c new file mode 100644 index 000000000..08f7dc68c --- /dev/null +++ b/interface/ztrsv.c @@ -0,0 +1,216 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTRSV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRSV " +#else +#define ERROR_NAME "CTRSV " +#endif + +static int (*trsv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, void *) = { +#ifdef XDOUBLE + xtrsv_NUU, xtrsv_NUN, xtrsv_NLU, xtrsv_NLN, + xtrsv_TUU, xtrsv_TUN, xtrsv_TLU, xtrsv_TLN, + xtrsv_RUU, xtrsv_RUN, xtrsv_RLU, xtrsv_RLN, + xtrsv_CUU, xtrsv_CUN, xtrsv_CLU, xtrsv_CLN, +#elif defined(DOUBLE) + ztrsv_NUU, ztrsv_NUN, ztrsv_NLU, ztrsv_NLN, + ztrsv_TUU, ztrsv_TUN, ztrsv_TLU, ztrsv_TLN, + ztrsv_RUU, ztrsv_RUN, ztrsv_RLU, ztrsv_RLN, + ztrsv_CUU, ztrsv_CUN, ztrsv_CLU, ztrsv_CLN, +#else + ctrsv_NUU, ctrsv_NUN, ctrsv_NLU, ctrsv_NLN, + ctrsv_TUU, ctrsv_TUN, ctrsv_TLU, ctrsv_TLN, + ctrsv_RUU, ctrsv_RUN, ctrsv_RLU, ctrsv_RLN, + ctrsv_CUU, ctrsv_CUN, ctrsv_CLU, ctrsv_CLN, +#endif +}; + +#ifndef CBLAS + +void NAME(char *UPLO, char *TRANS, char *DIAG, + blasint *N, FLOAT *a, blasint *LDA, FLOAT *x, blasint *INCX){ + + char uplo_arg = *UPLO; + char trans_arg = *TRANS; + char diag_arg = *DIAG; + + blasint n = *N; + blasint lda = *LDA; + blasint incx = *INCX; + + blasint info; + int uplo; + int unit; + int trans; + FLOAT *buffer; + + PRINT_DEBUG_NAME; + + TOUPPER(uplo_arg); + TOUPPER(trans_arg); + TOUPPER(diag_arg); + + trans = -1; + unit = -1; + uplo = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (diag_arg == 'U') unit = 0; + if (diag_arg == 'N') unit = 1; + + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + + info = 0; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + + +#else + +void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, + enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, + blasint n, FLOAT *a, blasint lda, FLOAT *x, blasint incx) { + + int trans, uplo, unit; + blasint info; + FLOAT *buffer; + + PRINT_DEBUG_CNAME; + + unit = -1; + uplo = -1; + trans = -1; + info = 0; + + if (order == CblasColMajor) { + if (Uplo == CblasUpper) uplo = 0; + if (Uplo == CblasLower) uplo = 1; + + if (TransA == CblasNoTrans) trans = 0; + if (TransA == CblasTrans) trans = 1; + if (TransA == CblasConjNoTrans) trans = 2; + if (TransA == CblasConjTrans) trans = 3; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (order == CblasRowMajor) { + if (Uplo == CblasUpper) uplo = 1; + if (Uplo == CblasLower) uplo = 0; + + if (TransA == CblasNoTrans) trans = 1; + if (TransA == CblasTrans) trans = 0; + if (TransA == CblasConjNoTrans) trans = 3; + if (TransA == CblasConjTrans) trans = 2; + + if (Diag == CblasUnit) unit = 0; + if (Diag == CblasNonUnit) unit = 1; + + info = -1; + + if (incx == 0) info = 8; + if (lda < MAX(1, n)) info = 6; + if (n < 0) info = 4; + if (unit < 0) info = 3; + if (trans < 0) info = 2; + if (uplo < 0) info = 1; + } + + if (info >= 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return; + } + +#endif + + if (n == 0) return; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + if (incx < 0 ) x -= (n - 1) * incx * 2; + + buffer = (FLOAT *)blas_memory_alloc(1); + + (trsv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); + + blas_memory_free(buffer); + + FUNCTION_PROFILE_END(4, n * n / 2 + n, n * n); + + IDEBUG_END; + + return; +} diff --git a/interface/ztrti2.c b/interface/ztrti2.c new file mode 100644 index 000000000..017374c37 --- /dev/null +++ b/interface/ztrti2.c @@ -0,0 +1,134 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTRTI2" +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRTI2" +#else +#define ERROR_NAME "CTRTI2" +#endif + +static blasint (*trti2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifdef XDOUBLE + xtrti2_UU, xtrti2_UN, xtrti2_LU, xtrti2_LN, +#elif defined(DOUBLE) + ztrti2_UU, ztrti2_UN, ztrti2_LU, ztrti2_LN, +#else + ctrti2_UU, ctrti2_UN, ctrti2_LU, ctrti2_LN, +#endif + }; + +int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint diag_arg = *DIAG; + blasint uplo, diag; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + TOUPPER(diag_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + diag = -1; + if (diag_arg == 'U') diag = 0; + if (diag_arg == 'N') diag = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 5; + if (args.n < 0) info = 3; + if (diag < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (trti2[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + + IDEBUG_END; + + return 0; +} diff --git a/interface/ztrtri.c b/interface/ztrtri.c new file mode 100644 index 000000000..79e6c11aa --- /dev/null +++ b/interface/ztrtri.c @@ -0,0 +1,154 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XTRTRI" +#elif defined(DOUBLE) +#define ERROR_NAME "ZTRTRI" +#else +#define ERROR_NAME "CTRTRI" +#endif + +static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, +}; + +#ifdef SMPTEST +static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, +}; +#endif + +int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint diag_arg = *DIAG; + blasint uplo, diag; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + TOUPPER(diag_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + diag = -1; + if (diag_arg == 'U') diag = 0; + if (diag_arg == 'N') diag = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 5; + if (args.n < 0) info = 3; + if (diag < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + if (diag) { + if (AMIN_K(args.n, args.a, args.lda + 1) == ZERO) { + *Info = IAMIN_K(args.n, args.a, args.lda + 1); + return 0; + } + } + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMPTEST + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMPTEST + } else { + + *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + + IDEBUG_END; + + return 0; +} From d63bd7fa5e78ecbef970ac20e13354ecd9915041 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 21:51:44 +0200 Subject: [PATCH 16/98] checked that gemm.c is OK --- interface/gemm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/gemm.c b/interface/gemm.c index ceb5ff355..587175ec7 100644 --- a/interface/gemm.c +++ b/interface/gemm.c @@ -81,7 +81,7 @@ static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLA GEMM_NT, GEMM_TT, GEMM_RT, GEMM_CT, GEMM_NR, GEMM_TR, GEMM_RR, GEMM_CR, GEMM_NC, GEMM_TC, GEMM_RC, GEMM_CC, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) GEMM_THREAD_NN, GEMM_THREAD_TN, GEMM_THREAD_RN, GEMM_THREAD_CN, GEMM_THREAD_NT, GEMM_THREAD_TT, GEMM_THREAD_RT, GEMM_THREAD_CT, GEMM_THREAD_NR, GEMM_THREAD_TR, GEMM_THREAD_RR, GEMM_THREAD_CR, @@ -92,7 +92,7 @@ static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLA GEMM3M_NT, GEMM3M_TT, GEMM3M_RT, GEMM3M_CT, GEMM3M_NR, GEMM3M_TR, GEMM3M_RR, GEMM3M_CR, GEMM3M_NC, GEMM3M_TC, GEMM3M_RC, GEMM3M_CC, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) GEMM3M_THREAD_NN, GEMM3M_THREAD_TN, GEMM3M_THREAD_RN, GEMM3M_THREAD_CN, GEMM3M_THREAD_NT, GEMM3M_THREAD_TT, GEMM3M_THREAD_RT, GEMM3M_THREAD_CT, GEMM3M_THREAD_NR, GEMM3M_THREAD_TR, GEMM3M_THREAD_RR, GEMM3M_THREAD_CR, @@ -120,7 +120,7 @@ void NAME(char *TRANSA, char *TRANSB, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -140,7 +140,7 @@ void NAME(char *TRANSA, char *TRANSB, #endif #endif -#if defined(SMPTEST) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) int nodes; #endif @@ -236,7 +236,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS XFLOAT *buffer; XFLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -256,7 +256,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS #endif #endif -#if defined(SMPTEST) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(NO_AFFINITY) && !defined(USE_SIMPLE_THREADED_LEVEL3) int nodes; #endif @@ -396,7 +396,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS sa = (XFLOAT *)((BLASLONG)buffer +GEMM_OFFSET_A); sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#ifdef SMPTEST +#ifdef SMP mode |= (transa << BLAS_TRANSA_SHIFT); mode |= (transb << BLAS_TRANSB_SHIFT); @@ -413,7 +413,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS (gemm[(transb << 2) | transa])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { @@ -447,7 +447,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS #endif -#ifdef SMPTEST +#ifdef SMP } #endif From 79a82ba7f1a6803946ae11fe892c4f4688018182 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 22:09:49 +0200 Subject: [PATCH 17/98] checked that axpy is OK --- interface/axpy.c | 6 +++--- interface/zaxpy.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/axpy.c b/interface/axpy.c index b8a96c94e..82b0ee234 100644 --- a/interface/axpy.c +++ b/interface/axpy.c @@ -57,7 +57,7 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc #endif -#ifdef SMPTEST +#ifdef SMP int mode, nthreads; #endif @@ -78,7 +78,7 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc if (incx < 0) x -= (n - 1) * incx; if (incy < 0) y -= (n - 1) * incy; -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(1); //disable multi-thread when incx==0 or incy==0 @@ -95,7 +95,7 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc AXPYU_K(n, 0, 0, alpha, x, incx, y, incy, NULL, 0); -#ifdef SMPTEST +#ifdef SMP } else { #ifdef XDOUBLE diff --git a/interface/zaxpy.c b/interface/zaxpy.c index 5ae39552b..9ed72efb9 100644 --- a/interface/zaxpy.c +++ b/interface/zaxpy.c @@ -59,7 +59,7 @@ void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint in FLOAT alpha_r = *(ALPHA + 0); FLOAT alpha_i = *(ALPHA + 1); -#ifdef SMPTEST +#ifdef SMP int mode, nthreads; #endif @@ -80,7 +80,7 @@ void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint in if (incx < 0) x -= (n - 1) * incx * 2; if (incy < 0) y -= (n - 1) * incy * 2; -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(1); //disable multi-thread when incx==0 or incy==0 @@ -97,7 +97,7 @@ void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint in AXPYC_K(n, 0, 0, alpha_r, alpha_i, x, incx, y, incy, NULL, 0); #endif -#ifdef SMPTEST +#ifdef SMP } else { #ifdef XDOUBLE From 781bfb6e6627a9c4678ee0d480e71f40f2115466 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 22:24:05 +0200 Subject: [PATCH 18/98] checked, that gemv is OK --- interface/gemv.c | 10 +++++----- interface/zgemv.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/gemv.c b/interface/gemv.c index 0c55c6fe6..9ea8aa895 100644 --- a/interface/gemv.c +++ b/interface/gemv.c @@ -50,7 +50,7 @@ #define ERROR_NAME "SGEMV " #endif -#ifdef SMPTEST +#ifdef SMP static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qgemv_thread_n, qgemv_thread_t, @@ -78,7 +78,7 @@ void NAME(char *TRANS, blasint *M, blasint *N, FLOAT alpha = *ALPHA; FLOAT beta = *BETA; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -132,7 +132,7 @@ void CNAME(enum CBLAS_ORDER order, blasint lenx, leny; int trans; blasint info, t; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -210,7 +210,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -218,7 +218,7 @@ void CNAME(enum CBLAS_ORDER order, (gemv[(int)trans])(m, n, 0, alpha, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (gemv_thread[(int)trans])(m, n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); diff --git a/interface/zgemv.c b/interface/zgemv.c index c943b2057..fb4784202 100644 --- a/interface/zgemv.c +++ b/interface/zgemv.c @@ -50,7 +50,7 @@ #define ERROR_NAME "CGEMV " #endif -#ifdef SMPTEST +#ifdef SMP static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT * , BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xgemv_thread_n, xgemv_thread_t, xgemv_thread_r, xgemv_thread_c, xgemv_thread_o, xgemv_thread_u, xgemv_thread_s, xgemv_thread_d, @@ -77,7 +77,7 @@ void NAME(char *TRANS, blasint *M, blasint *N, blasint incy = *INCY; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -143,7 +143,7 @@ void CNAME(enum CBLAS_ORDER order, blasint lenx, leny; int trans; blasint info, t; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -232,7 +232,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -240,7 +240,7 @@ void CNAME(enum CBLAS_ORDER order, (gemv[(int)trans])(m, n, 0, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { From 4d61607c9e777c9a1d0d68d9b4799edc7f8809b0 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 22:38:09 +0200 Subject: [PATCH 19/98] cheched, that gbmv is OK --- interface/gbmv.c | 10 +++++----- interface/zgbmv.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/gbmv.c b/interface/gbmv.c index d96d89f10..a76c48d04 100644 --- a/interface/gbmv.c +++ b/interface/gbmv.c @@ -61,7 +61,7 @@ static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE @@ -91,7 +91,7 @@ void NAME(char *TRANS, blasint *M, blasint *N, blasint incx = *INCX; blasint incy = *INCY; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -146,7 +146,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; blasint lenx, leny, info, t; int trans; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -226,7 +226,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -234,7 +234,7 @@ void CNAME(enum CBLAS_ORDER order, (gbmv[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (gbmv_thread[(int)trans])(m, n, kl, ku, alpha, a, lda, x, incx, y, incy, buffer, nthreads); diff --git a/interface/zgbmv.c b/interface/zgbmv.c index b0ebb5f37..ae1fd24bf 100644 --- a/interface/zgbmv.c +++ b/interface/zgbmv.c @@ -64,7 +64,7 @@ static void (*gbmv[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE @@ -97,7 +97,7 @@ void NAME(char *TRANS, blasint *M, blasint *N, blasint incx = *INCX; blasint incy = *INCY; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -164,7 +164,7 @@ void CNAME(enum CBLAS_ORDER order, blasint lenx, leny; int trans; blasint info, t; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -244,7 +244,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -252,7 +252,7 @@ void CNAME(enum CBLAS_ORDER order, (gbmv[(int)trans])(m, n, kl, ku, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { From 0947fc1c899933273c669e0fe19ddccc609e7395 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 22:49:53 +0200 Subject: [PATCH 20/98] checked, that ger is OK --- interface/ger.c | 8 ++++---- interface/zger.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/ger.c b/interface/ger.c index eb3d224f0..0218d94dd 100644 --- a/interface/ger.c +++ b/interface/ger.c @@ -75,7 +75,7 @@ void NAME(blasint *M, blasint *N, FLOAT *Alpha, blasint incy = *INCY; blasint lda = *LDA; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -107,7 +107,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; blasint info, t; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -167,7 +167,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -175,7 +175,7 @@ void CNAME(enum CBLAS_ORDER order, GER(m, n, 0, alpha, x, incx, y, incy, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { GER_THREAD(m, n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); diff --git a/interface/zger.c b/interface/zger.c index 1b615a513..ad52f40bb 100644 --- a/interface/zger.c +++ b/interface/zger.c @@ -109,7 +109,7 @@ void NAME(blasint *M, blasint *N, FLOAT *Alpha, blasint incy = *INCY; blasint lda = *LDA; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -144,7 +144,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; blasint info, t; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -205,7 +205,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -221,7 +221,7 @@ void CNAME(enum CBLAS_ORDER order, } #endif -#ifdef SMPTEST +#ifdef SMP } else { From e187b5e9d0e70fc2b976e83070fa00aa1c18869e Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 22:55:44 +0200 Subject: [PATCH 21/98] removed gesv.c from interface --- interface/gesv.c | 154 ----------------------------------------------- 1 file changed, 154 deletions(-) delete mode 100644 interface/gesv.c diff --git a/interface/gesv.c b/interface/gesv.c deleted file mode 100644 index 920f6ab80..000000000 --- a/interface/gesv.c +++ /dev/null @@ -1,154 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifndef COMPLEX -#ifdef XDOUBLE -#define ERROR_NAME "QGESV " -#elif defined(DOUBLE) -#define ERROR_NAME "DGESV " -#else -#define ERROR_NAME "SGESV " -#endif -#else -#ifdef XDOUBLE -#define ERROR_NAME "XGESV " -#elif defined(DOUBLE) -#define ERROR_NAME "ZGESV " -#else -#define ERROR_NAME "CGESV " -#endif -#endif - -int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv, - FLOAT *b, blasint *ldB, blasint *Info){ - - blas_arg_t args; - - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.m = *N; - args.n = *NRHS; - args.a = (void *)a; - args.lda = *ldA; - args.b = (void *)b; - args.ldb = *ldB; - args.c = (void *)ipiv; - - info = 0; - if (args.ldb < MAX(1,args.m)) info = 7; - if (args.lda < MAX(1,args.m)) info = 4; - if (args.n < 0) info = 2; - if (args.m < 0) info = 1; - - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - args.alpha = NULL; - args.beta = NULL; - - *Info = 0; - - if (args.m == 0 || args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMPTEST - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - args.n = *N; - info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); - - if (info == 0){ - args.n = *NRHS; - GETRS_N_SINGLE(&args, NULL, NULL, sa, sb, 0); - } - -#ifdef SMPTEST - } else { - - args.n = *N; - info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); - - if (info == 0){ - args.n = *NRHS; - GETRS_N_PARALLEL(&args, NULL, NULL, sa, sb, 0); - } - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - *Info = info; - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, *N * *N, 2. / 3. * *N * *N * *N + *N * *N); - - IDEBUG_END; - - return 0; -} From de00e2937a3eb13d7cfc52b8a7a0b77deda1e550 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 23:18:35 +0200 Subject: [PATCH 22/98] marked as smp bug --- interface/sbmv.c | 10 +++++----- interface/zsbmv.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/sbmv.c b/interface/sbmv.c index f82ca537c..c481d5609 100644 --- a/interface/sbmv.c +++ b/interface/sbmv.c @@ -61,7 +61,7 @@ static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLA #endif }; -#ifdef SMPTEST +#ifdef SMPBUG static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qsbmv_thread_U, qsbmv_thread_L, @@ -90,7 +90,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMPBUG int nthreads; #endif @@ -130,7 +130,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMPBUG int nthreads; #endif @@ -189,7 +189,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMPBUG nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -197,7 +197,7 @@ void CNAME(enum CBLAS_ORDER order, (sbmv[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMPBUG } else { (sbmv_thread[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer, nthreads); diff --git a/interface/zsbmv.c b/interface/zsbmv.c index 110b8e4f1..6d445d7ee 100644 --- a/interface/zsbmv.c +++ b/interface/zsbmv.c @@ -61,7 +61,7 @@ static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPTEST +#ifdef SMPBUG static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xsbmv_thread_U, xsbmv_thread_L, @@ -90,7 +90,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMPBUG int nthreads; #endif @@ -131,7 +131,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMPBUG nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -139,7 +139,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * (sbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); -#ifdef SMPTEST +#ifdef SMPBUG } else { (sbmv_thread[uplo])(n, k, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); From 2ed03ea0a2a02f1f55ef3a543026d5e537151b60 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 10 May 2014 23:55:43 +0200 Subject: [PATCH 23/98] checked, that spr2 is OK --- interface/spr2.c | 10 +++++----- interface/zspr2.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/spr2.c b/interface/spr2.c index 6ff2110d3..e556d3fa8 100644 --- a/interface/spr2.c +++ b/interface/spr2.c @@ -61,7 +61,7 @@ static int (*spr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOA #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*spr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE qspr2_thread_U, qspr2_thread_L, @@ -87,7 +87,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -124,7 +124,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -177,7 +177,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -185,7 +185,7 @@ void CNAME(enum CBLAS_ORDER order, (spr2[uplo])(n, alpha, x, incx, y, incy, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (spr2_thread[uplo])(n, alpha, x, incx, y, incy, a, buffer, nthreads); diff --git a/interface/zspr2.c b/interface/zspr2.c index 085e8bb7f..b54e1651a 100644 --- a/interface/zspr2.c +++ b/interface/zspr2.c @@ -61,7 +61,7 @@ static int (*spr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLON #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*spr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE xspr2_thread_U, xspr2_thread_L, @@ -86,7 +86,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -123,7 +123,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -131,7 +131,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, (spr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (spr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); From c7eb9014960f06265adde12cccc5cf5b26462238 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 00:07:07 +0200 Subject: [PATCH 24/98] checked, that spr is OK --- interface/spr.c | 10 +++++----- interface/zspr.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/spr.c b/interface/spr.c index 874970904..aa2ff8f3f 100644 --- a/interface/spr.c +++ b/interface/spr.c @@ -61,7 +61,7 @@ static int (*spr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*spr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE qspr_thread_U, qspr_thread_L, @@ -86,7 +86,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -121,7 +121,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -171,7 +171,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -179,7 +179,7 @@ void CNAME(enum CBLAS_ORDER order, (spr[uplo])(n, alpha, x, incx, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (spr_thread[uplo])(n, alpha, x, incx, a, buffer, nthreads); diff --git a/interface/zspr.c b/interface/zspr.c index b38ccb5d6..0021bcda4 100644 --- a/interface/zspr.c +++ b/interface/zspr.c @@ -61,7 +61,7 @@ static int (*spr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*spr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE xspr_thread_U, xspr_thread_L, @@ -85,7 +85,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -120,7 +120,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -128,7 +128,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, (spr[uplo])(n, alpha_r, alpha_i, x, incx, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (spr_thread[uplo])(n, ALPHA, x, incx, a, buffer, nthreads); From 1e8e6faa7e625d25692ae2e2702a2c029b0e2b13 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 00:22:40 +0200 Subject: [PATCH 25/98] checked, that symm is OK --- interface/symm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/symm.c b/interface/symm.c index e9765d557..b447f13e8 100644 --- a/interface/symm.c +++ b/interface/symm.c @@ -95,24 +95,24 @@ static int (*symm[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLA #ifndef GEMM3M #ifndef HEMM SYMM_LU, SYMM_LL, SYMM_RU, SYMM_RL, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) SYMM_THREAD_LU, SYMM_THREAD_LL, SYMM_THREAD_RU, SYMM_THREAD_RL, #endif #else HEMM_LU, HEMM_LL, HEMM_RU, HEMM_RL, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) HEMM_THREAD_LU, HEMM_THREAD_LL, HEMM_THREAD_RU, HEMM_THREAD_RL, #endif #endif #else #ifndef HEMM SYMM3M_LU, SYMM3M_LL, SYMM3M_RU, SYMM3M_RL, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) SYMM3M_THREAD_LU, SYMM3M_THREAD_LL, SYMM3M_THREAD_RU, SYMM3M_THREAD_RL, #endif #else HEMM3M_LU, HEMM3M_LL, HEMM3M_RU, HEMM3M_RL, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) HEMM3M_THREAD_LU, HEMM3M_THREAD_LL, HEMM3M_THREAD_RU, HEMM3M_THREAD_RL, #endif #endif @@ -135,7 +135,7 @@ void NAME(char *SIDE, char *UPLO, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -155,7 +155,7 @@ void NAME(char *SIDE, char *UPLO, #endif #endif -#if defined(SMPTEST) && !defined(NO_AFFINITY) +#if defined(SMP) && !defined(NO_AFFINITY) int nodes; #endif @@ -246,7 +246,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -266,7 +266,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, #endif #endif -#if defined(SMPTEST) && !defined(NO_AFFINITY) +#if defined(SMP) && !defined(NO_AFFINITY) int nodes; #endif @@ -387,7 +387,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#ifdef SMPTEST +#ifdef SMP args.common = NULL; args.nthreads = num_cpu_avail(3); @@ -396,7 +396,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, (symm[(side << 1) | uplo ])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { From e2c39a4a8e5902593912d9f674a3f366b01ea2ca Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 00:36:56 +0200 Subject: [PATCH 26/98] checked, that symv is OK --- interface/symv.c | 12 ++++++------ interface/zsymv.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/symv.c b/interface/symv.c index f5cff20bc..e8c24df66 100644 --- a/interface/symv.c +++ b/interface/symv.c @@ -68,7 +68,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, SYMV_U, SYMV_L, }; -#ifdef SMPTEST +#ifdef SMP int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { SYMV_THREAD_U, SYMV_THREAD_L, }; @@ -77,7 +77,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -110,7 +110,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -118,7 +118,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, SYMV_U, SYMV_L, }; -#ifdef SMPTEST +#ifdef SMP int (*symv_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { SYMV_THREAD_U, SYMV_THREAD_L, }; @@ -179,7 +179,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -187,7 +187,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, (symv[uplo])(n, n, alpha, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (symv_thread[uplo])(n, alpha, a, lda, x, incx, y, incy, buffer, nthreads); diff --git a/interface/zsymv.c b/interface/zsymv.c index 15bceeebe..afb2c1734 100644 --- a/interface/zsymv.c +++ b/interface/zsymv.c @@ -68,7 +68,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, SYMV_U, SYMV_L, }; -#ifdef SMPTEST +#ifdef SMP int (*symv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { SYMV_THREAD_U, SYMV_THREAD_L, }; @@ -77,7 +77,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -117,7 +117,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -125,7 +125,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, (symv[uplo])(n, n, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (symv_thread[uplo])(n, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); From eebce01cf24bba87b79f9f608b7b9078c832b250 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 00:48:49 +0200 Subject: [PATCH 27/98] checked, that syr2 is OK --- interface/syr2.c | 10 +++++----- interface/zsyr2.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/syr2.c b/interface/syr2.c index efe63fe6a..15dbae4bd 100644 --- a/interface/syr2.c +++ b/interface/syr2.c @@ -61,7 +61,7 @@ static int (*syr2[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOA #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*syr2_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qsyr2_thread_U, qsyr2_thread_L, @@ -88,7 +88,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -120,7 +120,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -178,7 +178,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -186,7 +186,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, (syr2[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (syr2_thread[uplo])(n, alpha, x, incx, y, incy, a, lda, buffer, nthreads); diff --git a/interface/zsyr2.c b/interface/zsyr2.c index bb7e2e191..0c705cb12 100644 --- a/interface/zsyr2.c +++ b/interface/zsyr2.c @@ -61,7 +61,7 @@ static int (*syr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLON #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*syr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xsyr2_thread_U, xsyr2_thread_L, @@ -87,7 +87,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -125,7 +125,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -133,7 +133,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, (syr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (syr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); From d972f4a60a1c84e1ea1150a32b0b2ac099bc31dc Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 01:04:46 +0200 Subject: [PATCH 28/98] check, that syr2k is OK --- interface/syr2k.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/syr2k.c b/interface/syr2k.c index 470b83958..381e088a6 100644 --- a/interface/syr2k.c +++ b/interface/syr2k.c @@ -95,7 +95,7 @@ void NAME(char *UPLO, char *TRANS, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -208,7 +208,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr FLOAT CAlpha[2]; #endif -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -341,7 +341,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#ifdef SMPTEST +#ifdef SMP if (!trans){ mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); } else { @@ -358,7 +358,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr (syr2k[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { From bfef3c5dd1e07fc0e8632c479975a1b0ab2c8579 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 07:46:22 +0200 Subject: [PATCH 29/98] checked, that syr is OK --- interface/syr.c | 10 +++++----- interface/zsyr.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/syr.c b/interface/syr.c index db2a9d400..2b2d3d1e2 100644 --- a/interface/syr.c +++ b/interface/syr.c @@ -61,7 +61,7 @@ static int (*syr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*syr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qsyr_thread_U, qsyr_thread_L, @@ -87,7 +87,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -118,7 +118,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -174,7 +174,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -182,7 +182,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, (syr[uplo])(n, alpha, x, incx, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (syr_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); diff --git a/interface/zsyr.c b/interface/zsyr.c index d15801cdc..b6b5202ec 100644 --- a/interface/zsyr.c +++ b/interface/zsyr.c @@ -61,7 +61,7 @@ static int (*syr[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*syr_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xsyr_thread_U, xsyr_thread_L, @@ -89,7 +89,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -121,7 +121,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLO FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -177,7 +177,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLO buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -185,7 +185,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLO (syr[uplo])(n, alpha_r, alpha_i, x, incx, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (syr_thread[uplo])(n, ALPHA, x, incx, a, lda, buffer, nthreads); From 57bbc586ef8d49d3cda869a090aaa4eee845f996 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 08:10:25 +0200 Subject: [PATCH 30/98] checked, that syrk is OK --- interface/syrk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/syrk.c b/interface/syrk.c index 1c00b5aa5..072cc86f5 100644 --- a/interface/syrk.c +++ b/interface/syrk.c @@ -74,12 +74,12 @@ static int (*syrk[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { #ifndef HEMM SYRK_UN, SYRK_UC, SYRK_LN, SYRK_LC, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) SYRK_THREAD_UN, SYRK_THREAD_UC, SYRK_THREAD_LN, SYRK_THREAD_LC, #endif #else HERK_UN, HERK_UC, HERK_LN, HERK_LC, -#if defined(SMPTEST) && !defined(USE_SIMPLE_THREADED_LEVEL3) +#if defined(SMP) && !defined(USE_SIMPLE_THREADED_LEVEL3) HERK_THREAD_UN, HERK_THREAD_UC, HERK_THREAD_LN, HERK_THREAD_LC, #endif #endif @@ -100,7 +100,7 @@ void NAME(char *UPLO, char *TRANS, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -205,7 +205,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -322,7 +322,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#ifdef SMPTEST +#ifdef SMP if (!trans){ mode |= (BLAS_TRANSA_N | BLAS_TRANSB_T); } else { @@ -339,7 +339,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr (syrk[(uplo << 1) | trans ])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { From 48d132578456aacc715ab2c40e62c0963b12309d Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 08:22:00 +0200 Subject: [PATCH 31/98] checked, that tbmv is OK --- interface/tbmv.c | 10 +++++----- interface/ztbmv.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/tbmv.c b/interface/tbmv.c index 8d08c0e1f..cec2be465 100644 --- a/interface/tbmv.c +++ b/interface/tbmv.c @@ -64,7 +64,7 @@ static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, v #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qtbmv_thread_NUU, qtbmv_thread_NUN, qtbmv_thread_NLU, qtbmv_thread_NLN, @@ -99,7 +99,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -148,7 +148,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int trans, uplo, unit; blasint info; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -222,7 +222,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -230,7 +230,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); diff --git a/interface/ztbmv.c b/interface/ztbmv.c index fb8873bc0..85f53c4be 100644 --- a/interface/ztbmv.c +++ b/interface/ztbmv.c @@ -70,7 +70,7 @@ static int (*tbmv[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, v #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*tbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xtbmv_thread_NUU, xtbmv_thread_NUN, xtbmv_thread_NLU, xtbmv_thread_NLN, @@ -111,7 +111,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -160,7 +160,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int trans, uplo, unit; blasint info; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -234,7 +234,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -242,7 +242,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (tbmv[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (tbmv_thread[(trans<<2) | (uplo<<1) | unit])(n, k, a, lda, x, incx, buffer, nthreads); From 8204ab4aa80046c52552e420b409d49a5668ba02 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 08:35:34 +0200 Subject: [PATCH 32/98] checked, that tpmv is OK --- interface/tpmv.c | 10 +++++----- interface/ztpmv.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/tpmv.c b/interface/tpmv.c index fde5abb4d..f0fc4f71c 100644 --- a/interface/tpmv.c +++ b/interface/tpmv.c @@ -64,7 +64,7 @@ static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qtpmv_thread_NUU, qtpmv_thread_NUN, qtpmv_thread_NLU, qtpmv_thread_NLN, @@ -96,7 +96,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -143,7 +143,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int trans, uplo, unit; blasint info; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -213,7 +213,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -221,7 +221,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (tpmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer, nthreads); diff --git a/interface/ztpmv.c b/interface/ztpmv.c index 2f7fe3b63..2f9c48f5a 100644 --- a/interface/ztpmv.c +++ b/interface/ztpmv.c @@ -70,7 +70,7 @@ static int (*tpmv[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, void *) = { #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*tpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xtpmv_thread_NUU, xtpmv_thread_NUN, xtpmv_thread_NLU, xtpmv_thread_NLN, @@ -108,7 +108,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -162,7 +162,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, uplo = -1; trans = -1; info = 0; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -225,7 +225,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -233,7 +233,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (tpmv[(trans<<2) | (uplo<<1) | unit])(n, a, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { From 7fb78a5f01a110a581726789c0575e7cb2dfe41c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 08:47:44 +0200 Subject: [PATCH 33/98] checked, that trmv is OK --- interface/trmv.c | 10 +++++----- interface/ztrmv.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/trmv.c b/interface/trmv.c index 765a114d1..ed23cedc6 100644 --- a/interface/trmv.c +++ b/interface/trmv.c @@ -64,7 +64,7 @@ static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qtrmv_thread_NUU, qtrmv_thread_NUN, qtrmv_thread_NLU, qtrmv_thread_NLN, @@ -97,7 +97,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -145,7 +145,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int trans, uplo, unit; blasint info; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -217,7 +217,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -225,7 +225,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); diff --git a/interface/ztrmv.c b/interface/ztrmv.c index 1ebee3ab8..5a18a85b1 100644 --- a/interface/ztrmv.c +++ b/interface/ztrmv.c @@ -70,7 +70,7 @@ static int (*trmv[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *) = #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*trmv_thread[])(BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xtrmv_thread_NUU, xtrmv_thread_NUN, xtrmv_thread_NLU, xtrmv_thread_NLN, @@ -109,7 +109,7 @@ void NAME(char *UPLO, char *TRANS, char *DIAG, int unit; int trans; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -157,7 +157,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int trans, uplo, unit; blasint info; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -229,7 +229,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -237,7 +237,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, (trmv[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (trmv_thread[(trans<<2) | (uplo<<1) | unit])(n, a, lda, x, incx, buffer, nthreads); From 564ff395f6b1073e8e04e4a3049766b1f8367534 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 08:59:33 +0200 Subject: [PATCH 34/98] checked, that trsm is OK --- interface/trsm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/trsm.c b/interface/trsm.c index 2b00c4722..5836ce2f0 100644 --- a/interface/trsm.c +++ b/interface/trsm.c @@ -119,7 +119,7 @@ void NAME(char *SIDE, char *UPLO, char *TRANS, char *DIAG, FLOAT *buffer; FLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -223,7 +223,7 @@ void CNAME(enum CBLAS_ORDER order, XFLOAT *buffer; XFLOAT *sa, *sb; -#ifdef SMPTEST +#ifdef SMP #ifndef COMPLEX #ifdef XDOUBLE int mode = BLAS_XDOUBLE | BLAS_REAL; @@ -357,7 +357,7 @@ void CNAME(enum CBLAS_ORDER order, sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#ifdef SMPTEST +#ifdef SMP mode |= (trans << BLAS_TRANSA_SHIFT); mode |= (side << BLAS_RSIDE_SHIFT); @@ -368,7 +368,7 @@ void CNAME(enum CBLAS_ORDER order, (trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { if (!side) { gemm_thread_n(mode, &args, NULL, NULL, trsm[(side<<4) | (trans<<2) | (uplo<<1) | unit], sa, sb, args.nthreads); From 0758c1a3742654374cb4d2fc78745a3ec7be64ff Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 09:11:20 +0200 Subject: [PATCH 35/98] checked, that trtri is OK --- interface/trtri.c | 6 +++--- interface/ztrtri.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/trtri.c b/interface/trtri.c index 07d4790f3..5aa5e9b9b 100644 --- a/interface/trtri.c +++ b/interface/trtri.c @@ -54,7 +54,7 @@ static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, }; -#ifdef SMPTEST +#ifdef SMP static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, }; @@ -126,7 +126,7 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); #endif -#ifdef SMPTEST +#ifdef SMP args.nthreads = num_cpu_avail(4); if (args.nthreads == 1) { @@ -134,7 +134,7 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); diff --git a/interface/ztrtri.c b/interface/ztrtri.c index 79e6c11aa..89caf80d3 100644 --- a/interface/ztrtri.c +++ b/interface/ztrtri.c @@ -54,7 +54,7 @@ static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, TRTRI_UU_SINGLE, TRTRI_UN_SINGLE, TRTRI_LU_SINGLE, TRTRI_LN_SINGLE, }; -#ifdef SMPTEST +#ifdef SMP static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ TRTRI_UU_PARALLEL, TRTRI_UN_PARALLEL, TRTRI_LU_PARALLEL, TRTRI_LN_PARALLEL, }; @@ -123,7 +123,7 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); #endif -#ifdef SMPTEST +#ifdef SMP args.common = NULL; args.nthreads = num_cpu_avail(4); @@ -132,7 +132,7 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In *Info = (trtri_single[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); -#ifdef SMPTEST +#ifdef SMP } else { *Info = (trtri_parallel[(uplo << 1) | diag])(&args, NULL, NULL, sa, sb, 0); From 9bae50f700dbea9ddf4cd932cdc905785dbeb890 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 09:30:18 +0200 Subject: [PATCH 36/98] checked, that zscal and zswap are OK --- interface/zscal.c | 6 +++--- interface/zswap.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/zscal.c b/interface/zscal.c index 5c894d778..ad99874dc 100644 --- a/interface/zscal.c +++ b/interface/zscal.c @@ -68,7 +68,7 @@ void CNAME(blasint n, FLOAT alpha_r, FLOAT *x, blasint incx){ #endif #endif -#ifdef SMPTEST +#ifdef SMP int mode; int nthreads; #endif @@ -87,7 +87,7 @@ void CNAME(blasint n, FLOAT alpha_r, FLOAT *x, blasint incx){ FUNCTION_PROFILE_START(); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(1); if (nthreads == 1) { @@ -95,7 +95,7 @@ void CNAME(blasint n, FLOAT alpha_r, FLOAT *x, blasint incx){ SCAL_K(n, 0, 0, alpha[0], alpha[1], x, incx, NULL, 0, NULL, 0); -#ifdef SMPTEST +#ifdef SMP } else { #ifdef DOUBLE mode = BLAS_DOUBLE | BLAS_COMPLEX; diff --git a/interface/zswap.c b/interface/zswap.c index ef35f107f..06a889204 100644 --- a/interface/zswap.c +++ b/interface/zswap.c @@ -56,7 +56,7 @@ void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ #endif -#ifdef SMPTEST +#ifdef SMP int mode; FLOAT dummyalpha[2] = {ZERO, ZERO}; int nthreads; @@ -77,7 +77,7 @@ void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ if (incx < 0) x -= (n - 1) * incx * 2; if (incy < 0) y -= (n - 1) * incy * 2; -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(1); //disable multi-thread when incx==0 or incy==0 @@ -90,7 +90,7 @@ void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){ SWAP_K(n, 0, 0, ZERO, ZERO, x, incx, y, incy, NULL, 0); -#ifdef SMPTEST +#ifdef SMP } else { #ifdef XDOUBLE From 10780ae650663f15703ab7e97c3c87341e7c081b Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 09:58:16 +0200 Subject: [PATCH 37/98] marked zhbmv as smp bug --- interface/zhbmv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zhbmv.c b/interface/zhbmv.c index 717e8f5b0..00ba915db 100644 --- a/interface/zhbmv.c +++ b/interface/zhbmv.c @@ -61,7 +61,7 @@ static int (*hbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPTEST +#ifdef SMPBUG static int (*hbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xhbmv_thread_U, xhbmv_thread_L, xhbmv_thread_V, xhbmv_thread_M, @@ -92,7 +92,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMPBUG int nthreads; #endif @@ -138,7 +138,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMPBUG int nthreads; #endif @@ -197,7 +197,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMPBUG nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -205,7 +205,7 @@ void CNAME(enum CBLAS_ORDER order, (hbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMPBUG } else { (hbmv_thread[uplo])(n, k, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); From f45f2c8465dcdadaf73c5a31766cf0803bed49c8 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 10:15:06 +0200 Subject: [PATCH 38/98] checked, that zhemv is OK --- interface/zhemv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/zhemv.c b/interface/zhemv.c index 1dcccb4d1..3cba445c2 100644 --- a/interface/zhemv.c +++ b/interface/zhemv.c @@ -65,7 +65,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, FLOAT beta_r = BETA[0]; FLOAT beta_i = BETA[1]; blasint incy = *INCY; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -73,7 +73,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA, HEMV_U, HEMV_L, HEMV_V, HEMV_M, }; -#ifdef SMPTEST +#ifdef SMP int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, }; @@ -119,7 +119,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -127,7 +127,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA HEMV_U, HEMV_L, HEMV_V, HEMV_M, }; -#ifdef SMPTEST +#ifdef SMP int (*hemv_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { HEMV_THREAD_U, HEMV_THREAD_L, HEMV_THREAD_V, HEMV_THREAD_M, }; @@ -189,7 +189,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -197,7 +197,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA (hemv[uplo])(n, n, alpha_r, alpha_i, a, lda, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (hemv_thread[uplo])(n, ALPHA, a, lda, x, incx, y, incy, buffer, nthreads); From 47e8950e771348d49971d213700471a5c0622bb9 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 10:26:05 +0200 Subject: [PATCH 39/98] checked, that zher2 is OK --- interface/zher2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zher2.c b/interface/zher2.c index c35307556..88fececf7 100644 --- a/interface/zher2.c +++ b/interface/zher2.c @@ -61,7 +61,7 @@ static int (*her2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLON #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*her2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xher2_thread_U, xher2_thread_L, xher2_thread_V, xher2_thread_M, @@ -89,7 +89,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -123,7 +123,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -181,7 +181,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -189,7 +189,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT *ALPHA (her2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (her2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, lda, buffer, nthreads); From 5e4b4f6712ed443a01b65f9858f65afaeb77722d Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 10:36:34 +0200 Subject: [PATCH 40/98] checked, that zher is OK --- interface/zher.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zher.c b/interface/zher.c index 237f8d75e..ad982dd68 100644 --- a/interface/zher.c +++ b/interface/zher.c @@ -61,7 +61,7 @@ static int (*her[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*her_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xher_thread_U, xher_thread_L, xher_thread_V, xher_thread_M, @@ -87,7 +87,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -118,7 +118,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, FLOAT *buffer; int trans, uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -174,7 +174,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -182,7 +182,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha, (her[uplo])(n, alpha, x, incx, a, lda, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (her_thread[uplo])(n, alpha, x, incx, a, lda, buffer, nthreads); From 2a94aaaf2e491e597507e53d6cd26237ef735143 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 10:46:48 +0200 Subject: [PATCH 41/98] checked, that zhpmv is OK --- interface/zhpmv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zhpmv.c b/interface/zhpmv.c index 36cc8d954..d7013e668 100644 --- a/interface/zhpmv.c +++ b/interface/zhpmv.c @@ -61,7 +61,7 @@ static int (*hpmv[])(BLASLONG, FLOAT, FLOAT, FLOAT *, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*hpmv_thread[])(BLASLONG, FLOAT *, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xhpmv_thread_U, xhpmv_thread_L, xhpmv_thread_V, xhpmv_thread_M, @@ -90,7 +90,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -132,7 +132,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -187,7 +187,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -195,7 +195,7 @@ void CNAME(enum CBLAS_ORDER order, (hpmv[uplo])(n, alpha_r, alpha_i, a, x, incx, y, incy, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (hpmv_thread[uplo])(n, ALPHA, a, x, incx, y, incy, buffer, nthreads); From 7bb19cf90edbbf3d21415d15414dc79e9bc33c33 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 11:11:05 +0200 Subject: [PATCH 42/98] checked, that zhpr2 is OK --- interface/zhpr2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zhpr2.c b/interface/zhpr2.c index 870124f7e..cf1d5f9fc 100644 --- a/interface/zhpr2.c +++ b/interface/zhpr2.c @@ -61,7 +61,7 @@ static int (*hpr2[])(BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLON #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*hpr2_thread[])(BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE xhpr2_thread_U, xhpr2_thread_L, xhpr2_thread_V, xhpr2_thread_M, @@ -88,7 +88,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -127,7 +127,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -181,7 +181,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -189,7 +189,7 @@ void CNAME(enum CBLAS_ORDER order, (hpr2[uplo])(n, alpha_r, alpha_i, x, incx, y, incy, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { (hpr2_thread[uplo])(n, ALPHA, x, incx, y, incy, a, buffer, nthreads); From 4c1caa7454e587ef8c60c3e4d6fb332a6eee046c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 11:21:23 +0200 Subject: [PATCH 43/98] checked, that zhpr is OK --- interface/zhpr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/zhpr.c b/interface/zhpr.c index 736effd48..c48e35238 100644 --- a/interface/zhpr.c +++ b/interface/zhpr.c @@ -61,7 +61,7 @@ static int (*hpr[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *) = { #endif }; -#ifdef SMPTEST +#ifdef SMP static int (*hpr_thread[])(BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, FLOAT *, int) = { #ifdef XDOUBLE xhpr_thread_U, xhpr_thread_L, xhpr_thread_V, xhpr_thread_M, @@ -86,7 +86,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, blasint info; int uplo; FLOAT *buffer; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -121,7 +121,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPTEST +#ifdef SMP int nthreads; #endif @@ -171,7 +171,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPTEST +#ifdef SMP nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -179,7 +179,7 @@ void CNAME(enum CBLAS_ORDER order, (hpr[uplo])(n, alpha, x, incx, a, buffer); -#ifdef SMPTEST +#ifdef SMP } else { From 189ca1bceec45bdf3ed17bcdac3145fde91b0f56 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 11 May 2014 12:09:34 +0200 Subject: [PATCH 44/98] removed lapack objects from interface/Makefile --- interface/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index a700e6542..708761559 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -2,11 +2,11 @@ TOPDIR = .. include $(TOPDIR)/Makefile.system ifeq ($(ARCH), x86) -SUPPORT_GEMM3M = 1 +SUPPORT_GEMM3M = 0 endif ifeq ($(ARCH), x86_64) -SUPPORT_GEMM3M = 1 +SUPPORT_GEMM3M = 0 endif ifeq ($(ARCH), ia64) @@ -372,15 +372,15 @@ XLAPACKOBJS = \ xpotf2.$(SUFFIX) xpotrf.$(SUFFIX) xtrti2.$(SUFFIX) xtrtri.$(SUFFIX) \ xlaswp.$(SUFFIX) xgetrs.$(SUFFIX) xgesv.$(SUFFIX) xpotri.$(SUFFIX) \ -ifneq ($(NO_LAPACK), 1) -SBLASOBJS += $(SLAPACKOBJS) -DBLASOBJS += $(DLAPACKOBJS) -QBLASOBJS += $(QLAPACKOBJS) -CBLASOBJS += $(CLAPACKOBJS) -ZBLASOBJS += $(ZLAPACKOBJS) -XBLASOBJS += $(XLAPACKOBJS) +#ifneq ($(NO_LAPACK), 1) +#SBLASOBJS += $(SLAPACKOBJS) +#DBLASOBJS += $(DLAPACKOBJS) +#QBLASOBJS += $(QLAPACKOBJS) +#CBLASOBJS += $(CLAPACKOBJS) +#ZBLASOBJS += $(ZLAPACKOBJS) +#XBLASOBJS += $(XLAPACKOBJS) -endif +#endif FUNCOBJS = $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) From 650ed34336adf59358a89d1c59965df8091a073a Mon Sep 17 00:00:00 2001 From: wernsaar Date: Tue, 13 May 2014 15:31:36 +0200 Subject: [PATCH 45/98] added ZERO check because bug in lapack-test --- kernel/arm/scal.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kernel/arm/scal.c b/kernel/arm/scal.c index d385c46bc..ff78e6764 100644 --- a/kernel/arm/scal.c +++ b/kernel/arm/scal.c @@ -38,20 +38,21 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2) { - BLASLONG i=0; + BLASLONG i=0,j=0; - if ( n < 0 || inc_x < 1 ) return(0); - if ( da == 1.0 ) return(0); - - n *= inc_x; - while(i < n) + while(j < n) { - x[i] = da * x[i] ; + if ( da == 0.0 ) + x[i]=0.0; + else + x[i] = da * x[i] ; + i += inc_x ; + j++; } - return(0); + return; } From 5e5ef28ca04edae717e5da7b529a59d6c21caf0f Mon Sep 17 00:00:00 2001 From: wernsaar Date: Tue, 13 May 2014 15:36:03 +0200 Subject: [PATCH 46/98] added ZERO check because bug in lapack-test --- kernel/arm/scal.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kernel/arm/scal.c b/kernel/arm/scal.c index d385c46bc..ff78e6764 100644 --- a/kernel/arm/scal.c +++ b/kernel/arm/scal.c @@ -38,20 +38,21 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2) { - BLASLONG i=0; + BLASLONG i=0,j=0; - if ( n < 0 || inc_x < 1 ) return(0); - if ( da == 1.0 ) return(0); - - n *= inc_x; - while(i < n) + while(j < n) { - x[i] = da * x[i] ; + if ( da == 0.0 ) + x[i]=0.0; + else + x[i] = da * x[i] ; + i += inc_x ; + j++; } - return(0); + return; } From aa5c73e20f7d397e578f4b47ead214d015eb75f1 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Tue, 13 May 2014 16:25:21 +0200 Subject: [PATCH 47/98] added ZERO check to zscal.c because bug in lapack-test --- kernel/arm/zscal.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/kernel/arm/zscal.c b/kernel/arm/zscal.c index 833dc8c03..569e2503e 100644 --- a/kernel/arm/zscal.c +++ b/kernel/arm/zscal.c @@ -43,19 +43,39 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F BLASLONG ip = 0; FLOAT temp; - if ( n < 0 || inc_x < 1 ) return(0); - inc_x2 = 2 * inc_x; for ( i=0; i Date: Tue, 13 May 2014 16:31:00 +0200 Subject: [PATCH 48/98] added ZERO check to zscal.c because bug in lapack-testing --- kernel/arm/zscal.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/kernel/arm/zscal.c b/kernel/arm/zscal.c index 833dc8c03..569e2503e 100644 --- a/kernel/arm/zscal.c +++ b/kernel/arm/zscal.c @@ -43,19 +43,39 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F BLASLONG ip = 0; FLOAT temp; - if ( n < 0 || inc_x < 1 ) return(0); - inc_x2 = 2 * inc_x; for ( i=0; i Date: Tue, 13 May 2014 17:25:19 +0200 Subject: [PATCH 49/98] added ARMV5 as reference platform --- Makefile.arm | 6 ++ common.h | 2 +- getarch.c | 16 +++++ kernel/arm/KERNEL.ARMV5 | 134 ++++++++++++++++++++++++++++++++++++++++ param.h | 40 ++++++++++++ 5 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 kernel/arm/KERNEL.ARMV5 diff --git a/Makefile.arm b/Makefile.arm index 8502d5286..5bdd4d151 100644 --- a/Makefile.arm +++ b/Makefile.arm @@ -10,3 +10,9 @@ FCOMMON_OPT += -marm -mfpu=vfp -mfloat-abi=hard -march=armv6 endif +ifeq ($(CORE), ARMV5) +CCOMMON_OPT += -marm -mfpu=vfp -mfloat-abi=hard -march=armv6 +FCOMMON_OPT += -marm -mfpu=vfp -mfloat-abi=hard -march=armv6 +endif + + diff --git a/common.h b/common.h index 57294eb02..41c014a90 100644 --- a/common.h +++ b/common.h @@ -310,7 +310,7 @@ typedef int blasint; #define YIELDING SwitchToThread() #endif -#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) +#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5) #define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n"); #endif diff --git a/getarch.c b/getarch.c index 6e1938434..b100eb52f 100644 --- a/getarch.c +++ b/getarch.c @@ -724,6 +724,22 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #else #endif +#ifdef FORCE_ARMV5 +#define FORCE +#define ARCHITECTURE "ARM" +#define SUBARCHITECTURE "ARMV5" +#define SUBDIRNAME "arm" +#define ARCHCONFIG "-DARMV5 " \ + "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \ + "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \ + "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \ + "-DHAVE_VFP" +#define LIBNAME "armv5" +#define CORENAME "ARMV5" +#else +#endif + + #ifdef FORCE_ARMV8 #define FORCE #define ARCHITECTURE "ARM64" diff --git a/kernel/arm/KERNEL.ARMV5 b/kernel/arm/KERNEL.ARMV5 new file mode 100644 index 000000000..ecf278cf9 --- /dev/null +++ b/kernel/arm/KERNEL.ARMV5 @@ -0,0 +1,134 @@ +SAMAXKERNEL = ../arm/amax.c +DAMAXKERNEL = ../arm/amax.c +CAMAXKERNEL = ../arm/zamax.c +ZAMAXKERNEL = ../arm/zamax.c + +SAMINKERNEL = ../arm/amin.c +DAMINKERNEL = ../arm/amin.c +CAMINKERNEL = ../arm/zamin.c +ZAMINKERNEL = ../arm/zamin.c + +SMAXKERNEL = ../arm/max.c +DMAXKERNEL = ../arm/max.c + +SMINKERNEL = ../arm/min.c +DMINKERNEL = ../arm/min.c + +ISAMAXKERNEL = ../arm/iamax.c +IDAMAXKERNEL = ../arm/iamax.c +ICAMAXKERNEL = ../arm/izamax.c +IZAMAXKERNEL = ../arm/izamax.c + +ISAMINKERNEL = ../arm/iamin.c +IDAMINKERNEL = ../arm/iamin.c +ICAMINKERNEL = ../arm/izamin.c +IZAMINKERNEL = ../arm/izamin.c + +ISMAXKERNEL = ../arm/imax.c +IDMAXKERNEL = ../arm/imax.c + +ISMINKERNEL = ../arm/imin.c +IDMINKERNEL = ../arm/imin.c + +SASUMKERNEL = ../arm/asum.c +DASUMKERNEL = ../arm/asum.c +CASUMKERNEL = ../arm/zasum.c +ZASUMKERNEL = ../arm/zasum.c + +SAXPYKERNEL = ../arm/axpy.c +DAXPYKERNEL = ../arm/axpy.c +CAXPYKERNEL = ../arm/zaxpy.c +ZAXPYKERNEL = ../arm/zaxpy.c + +SCOPYKERNEL = ../arm/copy.c +DCOPYKERNEL = ../arm/copy.c +CCOPYKERNEL = ../arm/zcopy.c +ZCOPYKERNEL = ../arm/zcopy.c + +SDOTKERNEL = ../arm/dot.c +DDOTKERNEL = ../arm/dot.c +CDOTKERNEL = ../arm/zdot.c +ZDOTKERNEL = ../arm/zdot.c + +SNRM2KERNEL = ../arm/nrm2.c +DNRM2KERNEL = ../arm/nrm2.c +CNRM2KERNEL = ../arm/znrm2.c +ZNRM2KERNEL = ../arm/znrm2.c + +SROTKERNEL = ../arm/rot.c +DROTKERNEL = ../arm/rot.c +CROTKERNEL = ../arm/zrot.c +ZROTKERNEL = ../arm/zrot.c + +SSCALKERNEL = ../arm/scal.c +DSCALKERNEL = ../arm/scal.c +CSCALKERNEL = ../arm/zscal.c +ZSCALKERNEL = ../arm/zscal.c + +SSWAPKERNEL = ../arm/swap.c +DSWAPKERNEL = ../arm/swap.c +CSWAPKERNEL = ../arm/zswap.c +ZSWAPKERNEL = ../arm/zswap.c + +SGEMVNKERNEL = ../arm/gemv_n.c +DGEMVNKERNEL = ../arm/gemv_n.c +CGEMVNKERNEL = ../arm/zgemv_n.c +ZGEMVNKERNEL = ../arm/zgemv_n.c + +SGEMVTKERNEL = ../arm/gemv_t.c +DGEMVTKERNEL = ../arm/gemv_t.c +CGEMVTKERNEL = ../arm/zgemv_t.c +ZGEMVTKERNEL = ../arm/zgemv_t.c + +STRMMKERNEL = ../generic/trmmkernel_2x2.c +DTRMMKERNEL = ../generic/trmmkernel_2x2.c +CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c +ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c + +SGEMMKERNEL = ../generic/gemmkernel_2x2.c +SGEMMONCOPY = ../generic/gemm_ncopy_2.c +SGEMMOTCOPY = ../generic/gemm_tcopy_2.c +SGEMMONCOPYOBJ = sgemm_oncopy.o +SGEMMOTCOPYOBJ = sgemm_otcopy.o + +DGEMMKERNEL = ../generic/gemmkernel_2x2.c +DGEMMONCOPY = ../generic/gemm_ncopy_2.c +DGEMMOTCOPY = ../generic/gemm_tcopy_2.c +DGEMMONCOPYOBJ = dgemm_oncopy.o +DGEMMOTCOPYOBJ = dgemm_otcopy.o + +CGEMMKERNEL = ../generic/zgemmkernel_2x2.c +CGEMMONCOPY = ../generic/zgemm_ncopy_2.c +CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c +CGEMMONCOPYOBJ = cgemm_oncopy.o +CGEMMOTCOPYOBJ = cgemm_otcopy.o + +ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c +ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c +ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c +ZGEMMONCOPYOBJ = zgemm_oncopy.o +ZGEMMOTCOPYOBJ = zgemm_otcopy.o + +STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c +STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c +STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c +STRSMKERNEL_RT = ../generic/trsm_kernel_RT.c + +DTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c +DTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c +DTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c +DTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c + +CTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c +CTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c +CTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c +CTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c + +ZTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c +ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c +ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c +ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c + + + + diff --git a/param.h b/param.h index efec08b85..ae40ac1d7 100644 --- a/param.h +++ b/param.h @@ -2021,6 +2021,46 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif +#if defined(ARMV5) +#define SNUMOPT 2 +#define DNUMOPT 2 + +#define GEMM_DEFAULT_OFFSET_A 0 +#define GEMM_DEFAULT_OFFSET_B 0 +#define GEMM_DEFAULT_ALIGN 0x03fffUL + +#define SGEMM_DEFAULT_UNROLL_M 2 +#define SGEMM_DEFAULT_UNROLL_N 2 + +#define DGEMM_DEFAULT_UNROLL_M 2 +#define DGEMM_DEFAULT_UNROLL_N 2 + +#define CGEMM_DEFAULT_UNROLL_M 2 +#define CGEMM_DEFAULT_UNROLL_N 2 + +#define ZGEMM_DEFAULT_UNROLL_M 2 +#define ZGEMM_DEFAULT_UNROLL_N 2 + +#define SGEMM_DEFAULT_P 128 +#define DGEMM_DEFAULT_P 128 +#define CGEMM_DEFAULT_P 96 +#define ZGEMM_DEFAULT_P 64 + +#define SGEMM_DEFAULT_Q 240 +#define DGEMM_DEFAULT_Q 120 +#define CGEMM_DEFAULT_Q 120 +#define ZGEMM_DEFAULT_Q 120 + +#define SGEMM_DEFAULT_R 12288 +#define DGEMM_DEFAULT_R 8192 +#define CGEMM_DEFAULT_R 4096 +#define ZGEMM_DEFAULT_R 4096 + + +#define SYMV_P 16 +#endif + + #ifdef GENERIC From a0b07c144035dba0d9e01e3c9791d858ec68cedd Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 14 May 2014 12:59:20 +0200 Subject: [PATCH 50/98] bugfixs for ARM regarding lapack tests --- kernel/arm/KERNEL.ARMV6 | 35 +++++++++++++++++++++++++---------- kernel/arm/KERNEL.ARMV7 | 17 +++++++++++------ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/kernel/arm/KERNEL.ARMV6 b/kernel/arm/KERNEL.ARMV6 index 02627cbd0..2810c6500 100644 --- a/kernel/arm/KERNEL.ARMV6 +++ b/kernel/arm/KERNEL.ARMV6 @@ -1,3 +1,18 @@ +SGEMVNKERNEL = ../arm/gemv_n.c +SGEMVTKERNEL = ../arm/gemv_t.c + +CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c +CGEMMKERNEL = ../generic/zgemmkernel_2x2.c +CGEMMONCOPY = ../generic/zgemm_ncopy_2.c +CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c + +#STRMMKERNEL = ../generic/trmmkernel_2x2.c +#SGEMMKERNEL = ../generic/gemmkernel_2x2.c +#SGEMMONCOPY = ../generic/gemm_ncopy_2.c +#SGEMMOTCOPY = ../generic/gemm_tcopy_2.c + + +############################################################################### SAMAXKERNEL = iamax_vfp.S DAMAXKERNEL = iamax_vfp.S CAMAXKERNEL = iamax_vfp.S @@ -60,29 +75,29 @@ DROTKERNEL = rot_vfp.S CROTKERNEL = rot_vfp.S ZROTKERNEL = rot_vfp.S -SSCALKERNEL = scal_vfp.S -DSCALKERNEL = scal_vfp.S -CSCALKERNEL = scal_vfp.S -ZSCALKERNEL = scal_vfp.S +SSCALKERNEL = scal.c +DSCALKERNEL = scal.c +CSCALKERNEL = zscal.c +ZSCALKERNEL = zscal.c SSWAPKERNEL = swap_vfp.S DSWAPKERNEL = swap_vfp.S CSWAPKERNEL = swap_vfp.S ZSWAPKERNEL = swap_vfp.S -SGEMVNKERNEL = gemv_n_vfp.S +# BAD SGEMVNKERNEL = gemv_n_vfp.S DGEMVNKERNEL = gemv_n_vfp.S CGEMVNKERNEL = cgemv_n_vfp.S ZGEMVNKERNEL = zgemv_n_vfp.S -SGEMVTKERNEL = gemv_t_vfp.S +# BAD SGEMVTKERNEL = gemv_t_vfp.S DGEMVTKERNEL = gemv_t_vfp.S CGEMVTKERNEL = cgemv_t_vfp.S ZGEMVTKERNEL = zgemv_t_vfp.S STRMMKERNEL = strmm_kernel_4x2_vfp.S DTRMMKERNEL = dtrmm_kernel_4x2_vfp.S -CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S +# CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S SGEMMKERNEL = sgemm_kernel_4x2_vfp.S @@ -105,9 +120,9 @@ DGEMMOTCOPY = ../generic/gemm_tcopy_2.c DGEMMONCOPYOBJ = dgemm_oncopy.o DGEMMOTCOPYOBJ = dgemm_otcopy.o -CGEMMKERNEL = cgemm_kernel_2x2_vfp.S -CGEMMONCOPY = cgemm_ncopy_2_vfp.S -CGEMMOTCOPY = cgemm_tcopy_2_vfp.S +#CGEMMKERNEL = cgemm_kernel_2x2_vfp.S +#CGEMMONCOPY = cgemm_ncopy_2_vfp.S +#CGEMMOTCOPY = cgemm_tcopy_2_vfp.S CGEMMONCOPYOBJ = cgemm_oncopy.o CGEMMOTCOPYOBJ = cgemm_otcopy.o diff --git a/kernel/arm/KERNEL.ARMV7 b/kernel/arm/KERNEL.ARMV7 index df66388db..790883e5e 100644 --- a/kernel/arm/KERNEL.ARMV7 +++ b/kernel/arm/KERNEL.ARMV7 @@ -1,3 +1,8 @@ +SGEMVNKERNEL = ../arm/gemv_n.c +SGEMVTKERNEL = ../arm/gemv_t.c + + +################################################################################# SAMAXKERNEL = iamax_vfp.S DAMAXKERNEL = iamax_vfp.S CAMAXKERNEL = iamax_vfp.S @@ -65,17 +70,17 @@ DROTKERNEL = rot_vfp.S CROTKERNEL = rot_vfp.S ZROTKERNEL = rot_vfp.S -SSCALKERNEL = scal_vfp.S +SSCALKERNEL = scal.c DSCALKERNEL = scal.c -CSCALKERNEL = scal_vfp.S -ZSCALKERNEL = scal_vfp.S +CSCALKERNEL = zscal.c +ZSCALKERNEL = zscal.c -SGEMVNKERNEL = gemv_n_vfp.S -DGEMVNKERNEL = gemv_n.c +# BAD SGEMVNKERNEL = gemv_n_vfp.S +DGEMVNKERNEL = gemv_n_vfp.S CGEMVNKERNEL = cgemv_n_vfp.S ZGEMVNKERNEL = zgemv_n_vfp.S -SGEMVTKERNEL = gemv_t_vfp.S +# BAD SGEMVTKERNEL = gemv_t_vfp.S DGEMVTKERNEL = gemv_t_vfp.S CGEMVTKERNEL = cgemv_t_vfp.S ZGEMVTKERNEL = zgemv_t_vfp.S From c38379c9dd44c0b2ab11ad85aa54b17f073225d0 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 14 May 2014 13:03:45 +0200 Subject: [PATCH 51/98] bugfixes for ARM regarding lapack tests --- kernel/arm/KERNEL.ARMV6 | 35 +++++++++++++++++++++++++---------- kernel/arm/KERNEL.ARMV7 | 17 +++++++++++------ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/kernel/arm/KERNEL.ARMV6 b/kernel/arm/KERNEL.ARMV6 index 02627cbd0..2810c6500 100644 --- a/kernel/arm/KERNEL.ARMV6 +++ b/kernel/arm/KERNEL.ARMV6 @@ -1,3 +1,18 @@ +SGEMVNKERNEL = ../arm/gemv_n.c +SGEMVTKERNEL = ../arm/gemv_t.c + +CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c +CGEMMKERNEL = ../generic/zgemmkernel_2x2.c +CGEMMONCOPY = ../generic/zgemm_ncopy_2.c +CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c + +#STRMMKERNEL = ../generic/trmmkernel_2x2.c +#SGEMMKERNEL = ../generic/gemmkernel_2x2.c +#SGEMMONCOPY = ../generic/gemm_ncopy_2.c +#SGEMMOTCOPY = ../generic/gemm_tcopy_2.c + + +############################################################################### SAMAXKERNEL = iamax_vfp.S DAMAXKERNEL = iamax_vfp.S CAMAXKERNEL = iamax_vfp.S @@ -60,29 +75,29 @@ DROTKERNEL = rot_vfp.S CROTKERNEL = rot_vfp.S ZROTKERNEL = rot_vfp.S -SSCALKERNEL = scal_vfp.S -DSCALKERNEL = scal_vfp.S -CSCALKERNEL = scal_vfp.S -ZSCALKERNEL = scal_vfp.S +SSCALKERNEL = scal.c +DSCALKERNEL = scal.c +CSCALKERNEL = zscal.c +ZSCALKERNEL = zscal.c SSWAPKERNEL = swap_vfp.S DSWAPKERNEL = swap_vfp.S CSWAPKERNEL = swap_vfp.S ZSWAPKERNEL = swap_vfp.S -SGEMVNKERNEL = gemv_n_vfp.S +# BAD SGEMVNKERNEL = gemv_n_vfp.S DGEMVNKERNEL = gemv_n_vfp.S CGEMVNKERNEL = cgemv_n_vfp.S ZGEMVNKERNEL = zgemv_n_vfp.S -SGEMVTKERNEL = gemv_t_vfp.S +# BAD SGEMVTKERNEL = gemv_t_vfp.S DGEMVTKERNEL = gemv_t_vfp.S CGEMVTKERNEL = cgemv_t_vfp.S ZGEMVTKERNEL = zgemv_t_vfp.S STRMMKERNEL = strmm_kernel_4x2_vfp.S DTRMMKERNEL = dtrmm_kernel_4x2_vfp.S -CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S +# CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S SGEMMKERNEL = sgemm_kernel_4x2_vfp.S @@ -105,9 +120,9 @@ DGEMMOTCOPY = ../generic/gemm_tcopy_2.c DGEMMONCOPYOBJ = dgemm_oncopy.o DGEMMOTCOPYOBJ = dgemm_otcopy.o -CGEMMKERNEL = cgemm_kernel_2x2_vfp.S -CGEMMONCOPY = cgemm_ncopy_2_vfp.S -CGEMMOTCOPY = cgemm_tcopy_2_vfp.S +#CGEMMKERNEL = cgemm_kernel_2x2_vfp.S +#CGEMMONCOPY = cgemm_ncopy_2_vfp.S +#CGEMMOTCOPY = cgemm_tcopy_2_vfp.S CGEMMONCOPYOBJ = cgemm_oncopy.o CGEMMOTCOPYOBJ = cgemm_otcopy.o diff --git a/kernel/arm/KERNEL.ARMV7 b/kernel/arm/KERNEL.ARMV7 index df66388db..790883e5e 100644 --- a/kernel/arm/KERNEL.ARMV7 +++ b/kernel/arm/KERNEL.ARMV7 @@ -1,3 +1,8 @@ +SGEMVNKERNEL = ../arm/gemv_n.c +SGEMVTKERNEL = ../arm/gemv_t.c + + +################################################################################# SAMAXKERNEL = iamax_vfp.S DAMAXKERNEL = iamax_vfp.S CAMAXKERNEL = iamax_vfp.S @@ -65,17 +70,17 @@ DROTKERNEL = rot_vfp.S CROTKERNEL = rot_vfp.S ZROTKERNEL = rot_vfp.S -SSCALKERNEL = scal_vfp.S +SSCALKERNEL = scal.c DSCALKERNEL = scal.c -CSCALKERNEL = scal_vfp.S -ZSCALKERNEL = scal_vfp.S +CSCALKERNEL = zscal.c +ZSCALKERNEL = zscal.c -SGEMVNKERNEL = gemv_n_vfp.S -DGEMVNKERNEL = gemv_n.c +# BAD SGEMVNKERNEL = gemv_n_vfp.S +DGEMVNKERNEL = gemv_n_vfp.S CGEMVNKERNEL = cgemv_n_vfp.S ZGEMVNKERNEL = zgemv_n_vfp.S -SGEMVTKERNEL = gemv_t_vfp.S +# BAD SGEMVTKERNEL = gemv_t_vfp.S DGEMVTKERNEL = gemv_t_vfp.S CGEMVTKERNEL = cgemv_t_vfp.S ZGEMVTKERNEL = zgemv_t_vfp.S From 8877c6db51891dab188fc3d644f82d0e2ecb2af3 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 14 May 2014 13:08:05 +0200 Subject: [PATCH 52/98] changed label lapack-test --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c2a019305..558850180 100644 --- a/Makefile +++ b/Makefile @@ -293,11 +293,8 @@ endif lapack-test : - $(MAKE) -C $(NETLIB_LAPACK_DIR) tmglib - $(MAKE) -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintsts xlintstz xlintstzc - @rm -f $(NETLIB_LAPACK_DIR)/TESTING/*.out - $(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING - $(GREP) failed $(NETLIB_LAPACK_DIR)/TESTING/*.out + make -j 1 -C $(NETLIB_LAPACK_DIR) tmglib + make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc dummy : From d18bc5468f3cc508605d58e0579f3d0d849762d6 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 14 May 2014 15:01:03 +0200 Subject: [PATCH 53/98] added FCOMMON_OPT for lapack --- Makefile.rule | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.rule b/Makefile.rule index e4b0465f5..5714dc3c1 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -129,6 +129,9 @@ VERSION = 0.2.9.rc2 # The default -O2 is enough. # COMMON_OPT = -O2 +# gfortran option for LAPACK +FCOMMON_OPT=-frecursive + # Profiling flags COMMON_PROF = -pg From 4a5938b5cc658935ab55668795cf02983564bb1c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 14 May 2014 15:16:21 +0200 Subject: [PATCH 54/98] Modified lapack-test, using lapack_testing.py to run tests --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 558850180..a48260624 100644 --- a/Makefile +++ b/Makefile @@ -295,6 +295,8 @@ endif lapack-test : make -j 1 -C $(NETLIB_LAPACK_DIR) tmglib make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc + (cd $(NETLIB_LAPACK_DIR); ./lapack_testing.py -r ) + dummy : From d751224ea43860fe4d3f4b6bb9f6ead406579391 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Thu, 15 May 2014 11:37:38 +0200 Subject: [PATCH 55/98] changed YIELDING for BULLDOZER --- common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common.h b/common.h index 41c014a90..49e2946e7 100644 --- a/common.h +++ b/common.h @@ -314,6 +314,13 @@ typedef int blasint; #define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n"); #endif +#ifdef BULLDOZER +#ifndef YIELDING +#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop;\n"); +#endif +#endif + + #ifdef PILEDRIVER #ifndef YIELDING #define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop;\n"); From 5953972a5a44554277da5dce092adfb09eea342f Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 16 May 2014 14:32:10 +0200 Subject: [PATCH 56/98] changed threshold for 50.0 to 54.0 in svd.in --- lapack-netlib/TESTING/svd.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack-netlib/TESTING/svd.in b/lapack-netlib/TESTING/svd.in index bc0ae2d2e..1de42807d 100644 --- a/lapack-netlib/TESTING/svd.in +++ b/lapack-netlib/TESTING/svd.in @@ -7,7 +7,7 @@ SVD: Data file for testing Singular Value Decomposition routines 2 2 2 2 2 Values of NBMIN (minimum blocksize) 1 0 5 9 1 Values of NX (crossover point) 2 0 2 2 2 Values of NRHS -50.0 Threshold value +54.0 Threshold value T Put T to test the LAPACK routines T Put T to test the driver routines T Put T to test the error exits From 409b52255cee4131d9d072f56b7b87f4a4dda181 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 16 May 2014 14:36:24 +0200 Subject: [PATCH 57/98] changed default optimization flag from O3 to O2 for ARM --- Makefile.system | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Makefile.system b/Makefile.system index bbd7e5621..ade4f9320 100644 --- a/Makefile.system +++ b/Makefile.system @@ -847,19 +847,6 @@ ifeq ($(DEBUG), 1) COMMON_OPT += -g endif -ifndef COMMON_OPT -ifeq ($(ARCH), arm) -COMMON_OPT = -O3 -endif -endif - -ifndef COMMON_OPT -ifeq ($(ARCH), arm64) -COMMON_OPT = -O3 -endif -endif - - ifndef COMMON_OPT COMMON_OPT = -O2 endif From 165d5436b513ffed3157baa46d8e056e35177828 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 16 May 2014 20:34:48 +0200 Subject: [PATCH 58/98] changed threshold to 50.0 --- lapack-netlib/TESTING/ctest_rfp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack-netlib/TESTING/ctest_rfp.in b/lapack-netlib/TESTING/ctest_rfp.in index 8ffb27a32..612bd8efb 100644 --- a/lapack-netlib/TESTING/ctest_rfp.in +++ b/lapack-netlib/TESTING/ctest_rfp.in @@ -5,5 +5,5 @@ Data file for testing COMPLEX LAPACK linear equation routines RFP format 1 2 15 Values of NRHS (number of right hand sides) 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 1 2 3 4 5 6 7 8 9 Matrix Types -40.0 Threshold value of test ratio +50.0 Threshold value of test ratio T Put T to test the error exits From e826a5a6afefa98b8221c7344d6b06b5e91f863b Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 16 May 2014 20:37:41 +0200 Subject: [PATCH 59/98] some modifications regarding lapack test --- kernel/arm/KERNEL.ARMV6 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/kernel/arm/KERNEL.ARMV6 b/kernel/arm/KERNEL.ARMV6 index 2810c6500..c64d09088 100644 --- a/kernel/arm/KERNEL.ARMV6 +++ b/kernel/arm/KERNEL.ARMV6 @@ -1,11 +1,20 @@ SGEMVNKERNEL = ../arm/gemv_n.c SGEMVTKERNEL = ../arm/gemv_t.c +DGEMVNKERNEL = ../arm/gemv_n.c +DGEMVTKERNEL = ../arm/gemv_t.c + CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c CGEMMKERNEL = ../generic/zgemmkernel_2x2.c CGEMMONCOPY = ../generic/zgemm_ncopy_2.c CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c +ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c +ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c +ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c +ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c + + #STRMMKERNEL = ../generic/trmmkernel_2x2.c #SGEMMKERNEL = ../generic/gemmkernel_2x2.c #SGEMMONCOPY = ../generic/gemm_ncopy_2.c @@ -86,19 +95,19 @@ CSWAPKERNEL = swap_vfp.S ZSWAPKERNEL = swap_vfp.S # BAD SGEMVNKERNEL = gemv_n_vfp.S -DGEMVNKERNEL = gemv_n_vfp.S +# BAD DGEMVNKERNEL = gemv_n_vfp.S CGEMVNKERNEL = cgemv_n_vfp.S ZGEMVNKERNEL = zgemv_n_vfp.S # BAD SGEMVTKERNEL = gemv_t_vfp.S -DGEMVTKERNEL = gemv_t_vfp.S +# BAD DGEMVTKERNEL = gemv_t_vfp.S CGEMVTKERNEL = cgemv_t_vfp.S ZGEMVTKERNEL = zgemv_t_vfp.S STRMMKERNEL = strmm_kernel_4x2_vfp.S DTRMMKERNEL = dtrmm_kernel_4x2_vfp.S # CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S -ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S +# ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S SGEMMKERNEL = sgemm_kernel_4x2_vfp.S SGEMMINCOPY = sgemm_ncopy_4_vfp.S @@ -126,9 +135,9 @@ DGEMMOTCOPYOBJ = dgemm_otcopy.o CGEMMONCOPYOBJ = cgemm_oncopy.o CGEMMOTCOPYOBJ = cgemm_otcopy.o -ZGEMMKERNEL = zgemm_kernel_2x2_vfp.S -ZGEMMONCOPY = zgemm_ncopy_2_vfp.S -ZGEMMOTCOPY = zgemm_tcopy_2_vfp.S +#ZGEMMKERNEL = zgemm_kernel_2x2_vfp.S +#ZGEMMONCOPY = zgemm_ncopy_2_vfp.S +#ZGEMMOTCOPY = zgemm_tcopy_2_vfp.S ZGEMMONCOPYOBJ = zgemm_oncopy.o ZGEMMOTCOPYOBJ = zgemm_otcopy.o From e52532a9fea2c0133cee98b75931b217b28ae750 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 17 May 2014 11:18:26 +0200 Subject: [PATCH 60/98] enable debug for lapack testing --- Makefile.rule | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.rule b/Makefile.rule index 5714dc3c1..9c2847a5c 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -76,10 +76,10 @@ VERSION = 0.2.9.rc2 # Unfortunately most of kernel won't give us high quality buffer. # BLAS tries to find the best region before entering main function, # but it will consume time. If you don't like it, you can disable one. -# NO_WARMUP = 1 +NO_WARMUP = 1 # If you want to disable CPU/Memory affinity on Linux. -# NO_AFFINITY = 1 +NO_AFFINITY = 1 # Don't use AVX kernel on Sandy Bridge. It is compatible with old compilers # and OS. However, the performance is low. @@ -127,16 +127,16 @@ VERSION = 0.2.9.rc2 # Common Optimization Flag; # The default -O2 is enough. -# COMMON_OPT = -O2 +COMMON_OPT = -O0 # gfortran option for LAPACK -FCOMMON_OPT=-frecursive +FCOMMON_OPT = -frecursive # Profiling flags COMMON_PROF = -pg # Build Debug version -# DEBUG = 1 +DEBUG = 1 # # End of user configuration From aaddb054117ca914c2bc75b8fb9e4af5c837bf22 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 17 May 2014 13:00:36 +0200 Subject: [PATCH 61/98] bugfix for ARMV6 --- kernel/arm/KERNEL.ARMV6 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/kernel/arm/KERNEL.ARMV6 b/kernel/arm/KERNEL.ARMV6 index c64d09088..3b19efb33 100644 --- a/kernel/arm/KERNEL.ARMV6 +++ b/kernel/arm/KERNEL.ARMV6 @@ -9,10 +9,10 @@ CGEMMKERNEL = ../generic/zgemmkernel_2x2.c CGEMMONCOPY = ../generic/zgemm_ncopy_2.c CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c -ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c -ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c -ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c -ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c +#ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c +#ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c +#ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c +#ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c #STRMMKERNEL = ../generic/trmmkernel_2x2.c @@ -21,6 +21,7 @@ ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c #SGEMMOTCOPY = ../generic/gemm_tcopy_2.c + ############################################################################### SAMAXKERNEL = iamax_vfp.S DAMAXKERNEL = iamax_vfp.S @@ -106,8 +107,8 @@ ZGEMVTKERNEL = zgemv_t_vfp.S STRMMKERNEL = strmm_kernel_4x2_vfp.S DTRMMKERNEL = dtrmm_kernel_4x2_vfp.S -# CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S -# ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S +#CTRMMKERNEL = ctrmm_kernel_2x2_vfp.S +ZTRMMKERNEL = ztrmm_kernel_2x2_vfp.S SGEMMKERNEL = sgemm_kernel_4x2_vfp.S SGEMMINCOPY = sgemm_ncopy_4_vfp.S @@ -135,9 +136,9 @@ DGEMMOTCOPYOBJ = dgemm_otcopy.o CGEMMONCOPYOBJ = cgemm_oncopy.o CGEMMOTCOPYOBJ = cgemm_otcopy.o -#ZGEMMKERNEL = zgemm_kernel_2x2_vfp.S -#ZGEMMONCOPY = zgemm_ncopy_2_vfp.S -#ZGEMMOTCOPY = zgemm_tcopy_2_vfp.S +ZGEMMKERNEL = zgemm_kernel_2x2_vfp.S +ZGEMMONCOPY = zgemm_ncopy_2_vfp.S +ZGEMMOTCOPY = zgemm_tcopy_2_vfp.S ZGEMMONCOPYOBJ = zgemm_oncopy.o ZGEMMOTCOPYOBJ = zgemm_otcopy.o From 5379eff022072a6738d1d3d82e8208db9f7f36f1 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sat, 17 May 2014 16:01:30 -0700 Subject: [PATCH 62/98] Remove routines for making exports/linux.def Signed-off-by: Timothy Gu --- exports/Makefile | 7 ++----- exports/gensymbol | 33 --------------------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/exports/Makefile b/exports/Makefile index 8e50a9809..2ff7adb78 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -123,7 +123,7 @@ ifeq ($(OSNAME), Linux) so : ../$(LIBSONAME) -../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c +../$(LIBSONAME) : ../$(LIBNAME) linktest.c ifneq ($(C_COMPILER), LSB) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ @@ -145,7 +145,7 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD)) so : ../$(LIBSONAME) -../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c +../$(LIBSONAME) : ../$(LIBNAME) linktest.c $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ $(FEXTRALIB) $(EXTRALIB) @@ -197,9 +197,6 @@ static : ../$(LIBNAME) $(AR) -cq ../$(LIBNAME) goto.$(SUFFIX) rm -f goto.$(SUFFIX) -linux.def : gensymbol ../Makefile.system ../getarch.c - perl ./gensymbol linux $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) - osx.def : gensymbol ../Makefile.system ../getarch.c perl ./gensymbol osx $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) diff --git a/exports/gensymbol b/exports/gensymbol index daedf8dcc..b20297d95 100644 --- a/exports/gensymbol +++ b/exports/gensymbol @@ -2771,14 +2771,6 @@ if ($ARGV[6] == 1) { @no_underscore_objs = (@no_underscore_objs, @lapackeobjs); } -@linuxobjs = ('__strtol_internal', 'exit', 'free', 'getenv', 'malloc', - 'mmap', 'printf', 'sqrt', - 'pthread_cond_broadcast', 'pthread_cond_destroy', - 'pthread_cond_init', 'pthread_cond_signal', 'pthread_cond_wait', - 'pthread_create', 'pthread_exit', 'pthread_join', - 'pthread_mutex_destroy', 'pthread_mutex_init', - 'pthread_mutex_lock', 'pthread_mutex_unlock'); - @hplobjs = (daxpy, dcopy, dscal, idamax, dgemv, dtrsv, dger, dgemm, dtrsm); @hplobjs2 = (HPL_dlaswp00N, HPL_dlaswp01N, HPL_dlaswp01T); @@ -2786,31 +2778,6 @@ $bu = $ARGV[2]; $bu = "" if (($bu eq "0") || ($bu eq "1")); -if ($ARGV[0] eq "linux"){ - - @underscore_objs = (@underscore_objs, @misc_common_objs); - @no_underscore_objs = (@no_underscore_objs, @misc_common_objs); - - foreach $objs (@underscore_objs) { - print $objs, $bu, "\n"; - } - - foreach $objs (@need_2underscore_objs) { - print $objs, $bu, $bu, "\n"; - } - -# if ($ARGV[4] == 0) { - foreach $objs (@no_underscore_objs) { - print $objs, "\n"; - } -# } - - foreach $objs (@linuxobjs) { - print $objs, "\n"; - } - exit(0); -} - if ($ARGV[0] eq "osx"){ @underscore_objs = (@underscore_objs, @misc_common_objs); From b6d904838e56867ccbdffe283a3940a65fc0a7bd Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sat, 17 May 2014 16:02:36 -0700 Subject: [PATCH 63/98] Remove routines for generating exports/symbol.S Signed-off-by: Timothy Gu --- exports/Makefile | 6 ------ exports/gensymbol | 26 -------------------------- 2 files changed, 32 deletions(-) diff --git a/exports/Makefile b/exports/Makefile index 2ff7adb78..60e936dbd 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -113,9 +113,6 @@ libgoto_hpl.def : gensymbol $(LIBDYNNAME) : ../$(LIBNAME) osx.def $(FC) $(FFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) -symbol.$(SUFFIX) : symbol.S - $(CC) $(CFLAGS) -c -o $(@F) $^ - dllinit.$(SUFFIX) : dllinit.c $(CC) $(CFLAGS) -c -o $(@F) -s $< @@ -203,9 +200,6 @@ osx.def : gensymbol ../Makefile.system ../getarch.c aix.def : gensymbol ../Makefile.system ../getarch.c perl ./gensymbol aix $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) -symbol.S : gensymbol - perl ./gensymbol win2kasm noarch dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > symbol.S - test : linktest.c $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) -lm && echo OK. rm -f linktest diff --git a/exports/gensymbol b/exports/gensymbol index b20297d95..f131de7bc 100644 --- a/exports/gensymbol +++ b/exports/gensymbol @@ -2923,32 +2923,6 @@ if ($ARGV[0] eq "microsoft"){ exit(0); } -if ($ARGV[0] eq "win2kasm"){ - - @underscore_objs = (@underscore_objs, @misc_common_objs); - - print "\t.text\n"; - foreach $objs (@underscore_objs) { - $uppercase = $objs; - $uppercase =~ tr/[a-z]/[A-Z]/; - print "\t.align 16\n"; - print "\t.globl _", $uppercase, "_\n"; - print "_", $uppercase, "_:\n"; - print "\tjmp\t_", $objs, "_\n"; - } - - foreach $objs (@need_2underscore_objs) { - $uppercase = $objs; - $uppercase =~ tr/[a-z]/[A-Z]/; - print "\t.align 16\n"; - print "\t.globl _", $uppercase, "__\n"; - print "_", $uppercase, "__:\n"; - print "\tjmp\t_", $objs, "__\n"; - } - - exit(0); -} - if ($ARGV[0] eq "linktest"){ @underscore_objs = (@underscore_objs, @misc_common_objs); From c0cf875a821698467bbc055280f4b7efef5e3f1b Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 14:09:22 +0200 Subject: [PATCH 64/98] added optimized lapack files from OpenBLAS --- interface/lapack/gesv.c | 154 ++++++++++++++++++++++++++++++++++++ interface/lapack/getf2.c | 109 ++++++++++++++++++++++++++ interface/lapack/getrf.c | 121 ++++++++++++++++++++++++++++ interface/lapack/getrs.c | 152 ++++++++++++++++++++++++++++++++++++ interface/lapack/larf.c | 109 ++++++++++++++++++++++++++ interface/lapack/laswp.c | 110 ++++++++++++++++++++++++++ interface/lapack/lauu2.c | 128 ++++++++++++++++++++++++++++++ interface/lapack/lauum.c | 139 +++++++++++++++++++++++++++++++++ interface/lapack/potf2.c | 128 ++++++++++++++++++++++++++++++ interface/lapack/potrf.c | 139 +++++++++++++++++++++++++++++++++ interface/lapack/potri.c | 160 ++++++++++++++++++++++++++++++++++++++ interface/lapack/zgetf2.c | 109 ++++++++++++++++++++++++++ interface/lapack/zgetrf.c | 122 +++++++++++++++++++++++++++++ interface/lapack/zgetrs.c | 153 ++++++++++++++++++++++++++++++++++++ interface/lapack/zlaswp.c | 108 +++++++++++++++++++++++++ interface/lapack/zlauu2.c | 129 ++++++++++++++++++++++++++++++ interface/lapack/zlauum.c | 141 +++++++++++++++++++++++++++++++++ interface/lapack/zpotf2.c | 129 ++++++++++++++++++++++++++++++ interface/lapack/zpotrf.c | 141 +++++++++++++++++++++++++++++++++ interface/lapack/zpotri.c | 157 +++++++++++++++++++++++++++++++++++++ 20 files changed, 2638 insertions(+) create mode 100644 interface/lapack/gesv.c create mode 100644 interface/lapack/getf2.c create mode 100644 interface/lapack/getrf.c create mode 100644 interface/lapack/getrs.c create mode 100644 interface/lapack/larf.c create mode 100644 interface/lapack/laswp.c create mode 100644 interface/lapack/lauu2.c create mode 100644 interface/lapack/lauum.c create mode 100644 interface/lapack/potf2.c create mode 100644 interface/lapack/potrf.c create mode 100644 interface/lapack/potri.c create mode 100644 interface/lapack/zgetf2.c create mode 100644 interface/lapack/zgetrf.c create mode 100644 interface/lapack/zgetrs.c create mode 100644 interface/lapack/zlaswp.c create mode 100644 interface/lapack/zlauu2.c create mode 100644 interface/lapack/zlauum.c create mode 100644 interface/lapack/zpotf2.c create mode 100644 interface/lapack/zpotrf.c create mode 100644 interface/lapack/zpotri.c diff --git a/interface/lapack/gesv.c b/interface/lapack/gesv.c new file mode 100644 index 000000000..ce6bcbd0b --- /dev/null +++ b/interface/lapack/gesv.c @@ -0,0 +1,154 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifndef COMPLEX +#ifdef XDOUBLE +#define ERROR_NAME "QGESV " +#elif defined(DOUBLE) +#define ERROR_NAME "DGESV " +#else +#define ERROR_NAME "SGESV " +#endif +#else +#ifdef XDOUBLE +#define ERROR_NAME "XGESV " +#elif defined(DOUBLE) +#define ERROR_NAME "ZGESV " +#else +#define ERROR_NAME "CGESV " +#endif +#endif + +int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv, + FLOAT *b, blasint *ldB, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *N; + args.n = *NRHS; + args.a = (void *)a; + args.lda = *ldA; + args.b = (void *)b; + args.ldb = *ldB; + args.c = (void *)ipiv; + + info = 0; + if (args.ldb < MAX(1,args.m)) info = 7; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + args.alpha = NULL; + args.beta = NULL; + + *Info = 0; + + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + args.n = *N; + info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); + + if (info == 0){ + args.n = *NRHS; + GETRS_N_SINGLE(&args, NULL, NULL, sa, sb, 0); + } + +#ifdef SMP + } else { + + args.n = *N; + info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); + + if (info == 0){ + args.n = *NRHS; + GETRS_N_PARALLEL(&args, NULL, NULL, sa, sb, 0); + } + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + *Info = info; + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, *N * *N, 2. / 3. * *N * *N * *N + *N * *N); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/getf2.c b/interface/lapack/getf2.c new file mode 100644 index 000000000..cae15953b --- /dev/null +++ b/interface/lapack/getf2.c @@ -0,0 +1,109 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGETF2" +#elif defined(DOUBLE) +#define ERROR_NAME "DGETF2" +#else +#define ERROR_NAME "SGETF2" +#endif + +int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + args.c = (void *)ipiv; + + info = 0; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = GETF2(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/getrf.c b/interface/lapack/getrf.c new file mode 100644 index 000000000..aa799e8d3 --- /dev/null +++ b/interface/lapack/getrf.c @@ -0,0 +1,121 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGETRF" +#elif defined(DOUBLE) +#define ERROR_NAME "DGETRF" +#else +#define ERROR_NAME "SGETRF" +#endif + +int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + args.c = (void *)ipiv; + + info = 0; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + *Info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/getrs.c b/interface/lapack/getrs.c new file mode 100644 index 000000000..761a00160 --- /dev/null +++ b/interface/lapack/getrs.c @@ -0,0 +1,152 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QGETRS" +#elif defined(DOUBLE) +#define ERROR_NAME "DGETRS" +#else +#define ERROR_NAME "SGETRS" +#endif + +static blasint (*getrs_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + GETRS_N_SINGLE, GETRS_T_SINGLE, +}; + +#ifdef SMP +static blasint (*getrs_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + GETRS_N_PARALLEL, GETRS_T_PARALLEL, +}; +#endif + +int NAME(char *TRANS, blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, + blasint *ipiv, FLOAT *b, blasint *ldB, blasint *Info){ + + char trans_arg = *TRANS; + + blas_arg_t args; + + blasint info; + int trans; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *N; + args.n = *NRHS; + args.a = (void *)a; + args.lda = *ldA; + args.b = (void *)b; + args.ldb = *ldB; + args.c = (void *)ipiv; + + info = 0; + + TOUPPER(trans_arg); + trans = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 0; + if (trans_arg == 'C') trans = 1; + + if (args.ldb < MAX(1, args.m)) info = 8; + if (args.lda < MAX(1, args.m)) info = 5; + if (args.n < 0) info = 3; + if (args.m < 0) info = 2; + if (trans < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return 0; + } + + args.alpha = NULL; + args.beta = NULL; + + *Info = info; + + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + (getrs_single[trans])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + (getrs_parallel[trans])(&args, NULL, NULL, sa, sb, 0); + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2 * args.m * args.m * args.n); + + IDEBUG_END; + + return 0; + +} diff --git a/interface/lapack/larf.c b/interface/lapack/larf.c new file mode 100644 index 000000000..3b538c4a2 --- /dev/null +++ b/interface/lapack/larf.c @@ -0,0 +1,109 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +static int (*larf[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LARF_L, LARF_R, +}; + +int NAME(char *SIDE, blasint *M, blasint *N, FLOAT *v, blasint *incV, FLOAT *tau, FLOAT *c, blasint *ldC, FLOAT *work){ + + blas_arg_t args; + + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + char side_arg = *SIDE; + int side; + + PRINT_DEBUG_NAME; + + TOUPPER(side_arg); + + args.m = *M; + args.n = *N; + args.a = (void *)v; + args.lda = *incV; + args.c = (void *)c; + args.ldc = *ldC; + + args.alpha = (void *)tau; + + side = -1; + if (side_arg == 'L') side = 0; + if (side_arg == 'R') side = 1; + + if (args.m == 0 || args.n == 0) return 0; + +#ifndef COMPLEX + if (*tau == ZERO) return 0; +#else + if ((*(tau + 0) == ZERO) && (*(tau + 1) == ZERO)) return 0; +#endif + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + larf[side](&args, NULL, NULL, sa, sb, 0); + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/laswp.c b/interface/lapack/laswp.c new file mode 100644 index 000000000..026b5156f --- /dev/null +++ b/interface/lapack/laswp.c @@ -0,0 +1,110 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +static int (*laswp[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, blasint *, BLASLONG) = { +#ifdef XDOUBLE + qlaswp_plus, qlaswp_minus, +#elif defined(DOUBLE) + dlaswp_plus, dlaswp_minus, +#else + slaswp_plus, slaswp_minus, +#endif +}; + +int NAME(blasint *N, FLOAT *a, blasint *LDA, blasint *K1, blasint *K2, blasint *ipiv, blasint *INCX){ + + blasint n = *N; + blasint lda = *LDA; + blasint k1 = *K1; + blasint k2 = *K2; + blasint incx = *INCX; + int flag; + +#ifdef SMP + int mode, nthreads; + FLOAT dummyalpha[2] = {ZERO, ZERO}; +#endif + + PRINT_DEBUG_NAME; + + if (incx == 0 || n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + flag = (incx < 0); + +#ifdef SMP + nthreads = num_cpu_avail(1); + + if (nthreads == 1) { +#endif + + (laswp[flag])(n, k1, k2, ZERO, a, lda, NULL, 0, ipiv, incx); + +#ifdef SMP + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_REAL; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_REAL; +#else + mode = BLAS_SINGLE | BLAS_REAL; +#endif + + blas_level1_thread(mode, n, k1, k2, dummyalpha, + a, lda, NULL, 0, ipiv, incx, + laswp[flag], nthreads); + } +#endif + + FUNCTION_PROFILE_END(COMPSIZE, n * (k2 - k1), 0); + + IDEBUG_END; + + return 0; + +} diff --git a/interface/lapack/lauu2.c b/interface/lapack/lauu2.c new file mode 100644 index 000000000..14417e986 --- /dev/null +++ b/interface/lapack/lauu2.c @@ -0,0 +1,128 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QLAUU2" +#elif defined(DOUBLE) +#define ERROR_NAME "DLAUU2" +#else +#define ERROR_NAME "SLAUU2" +#endif + +static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifdef XDOUBLE + qlauu2_U, qlauu2_L, +#elif defined(DOUBLE) + dlauu2_U, dlauu2_L, +#else + slauu2_U, slauu2_L, +#endif + }; + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/lauum.c b/interface/lapack/lauum.c new file mode 100644 index 000000000..e5b593f30 --- /dev/null +++ b/interface/lapack/lauum.c @@ -0,0 +1,139 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QLAUUM" +#elif defined(DOUBLE) +#define ERROR_NAME "DLAUUM" +#else +#define ERROR_NAME "SLAUUM" +#endif + +static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_SINGLE, LAUUM_L_SINGLE, +}; + +#ifdef SMP +static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/potf2.c b/interface/lapack/potf2.c new file mode 100644 index 000000000..76822a49c --- /dev/null +++ b/interface/lapack/potf2.c @@ -0,0 +1,128 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QPOTF2" +#elif defined(DOUBLE) +#define ERROR_NAME "DPOTF2" +#else +#define ERROR_NAME "SPOTF2" +#endif + +static blasint (*potf2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { +#ifdef XDOUBLE + qpotf2_U, qpotf2_L, +#elif defined(DOUBLE) + dpotf2_U, dpotf2_L, +#else + spotf2_U, spotf2_L, +#endif + }; + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (potf2[uplo])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/potrf.c b/interface/lapack/potrf.c new file mode 100644 index 000000000..9a15012d3 --- /dev/null +++ b/interface/lapack/potrf.c @@ -0,0 +1,139 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QPOTRF" +#elif defined(DOUBLE) +#define ERROR_NAME "DPOTRF" +#else +#define ERROR_NAME "SPOTRF" +#endif + +static blasint (*potrf_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + POTRF_U_SINGLE, POTRF_L_SINGLE, +}; + +#ifdef SMP +static blasint (*potrf_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + POTRF_U_PARALLEL, POTRF_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (potrf_single[uplo])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + *Info = (potrf_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/potri.c b/interface/lapack/potri.c new file mode 100644 index 000000000..a4f33221a --- /dev/null +++ b/interface/lapack/potri.c @@ -0,0 +1,160 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QPOTRI" +#elif defined(DOUBLE) +#define ERROR_NAME "DPOTRI" +#else +#define ERROR_NAME "SPOTRI" +#endif + +static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UN_SINGLE, TRTRI_LN_SINGLE, +}; + +static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + LAUUM_U_SINGLE, LAUUM_L_SINGLE, +}; + +#ifdef SMP +static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UN_PARALLEL, TRTRI_LN_PARALLEL, +}; + +static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + info = (trtri_single[uplo])(&args, NULL, NULL, sa, sb, 0); + + if (!info) { + info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); + } + + *Info = info; + +#ifdef SMP + } else { + info = (trtri_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + + if (!info) { + info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + } + + *Info = info; + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zgetf2.c b/interface/lapack/zgetf2.c new file mode 100644 index 000000000..950ef46e9 --- /dev/null +++ b/interface/lapack/zgetf2.c @@ -0,0 +1,109 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XGETF2" +#elif defined(DOUBLE) +#define ERROR_NAME "ZGETF2" +#else +#define ERROR_NAME "CGETF2" +#endif + +int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + args.c = (void *)ipiv; + + info = 0; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = GETF2(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zgetrf.c b/interface/lapack/zgetrf.c new file mode 100644 index 000000000..9f041d9bd --- /dev/null +++ b/interface/lapack/zgetrf.c @@ -0,0 +1,122 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XGETRF" +#elif defined(DOUBLE) +#define ERROR_NAME "ZGETRF" +#else +#define ERROR_NAME "CGETRF" +#endif + +int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){ + + blas_arg_t args; + + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *M; + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + args.c = (void *)ipiv; + + info = 0; + if (args.lda < MAX(1,args.m)) info = 4; + if (args.n < 0) info = 2; + if (args.m < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + *Info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zgetrs.c b/interface/lapack/zgetrs.c new file mode 100644 index 000000000..81d50e34f --- /dev/null +++ b/interface/lapack/zgetrs.c @@ -0,0 +1,153 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XGETRS" +#elif defined(DOUBLE) +#define ERROR_NAME "ZGETRS" +#else +#define ERROR_NAME "CGETRS" +#endif + +static blasint (*getrs_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + GETRS_N_SINGLE, GETRS_T_SINGLE, GETRS_R_SINGLE, GETRS_C_SINGLE, +}; + +#ifdef SMP +static blasint (*getrs_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + GETRS_N_PARALLEL, GETRS_T_PARALLEL, GETRS_R_PARALLEL, GETRS_C_PARALLEL, +}; +#endif + +int NAME(char *TRANS, blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, + blasint *ipiv, FLOAT *b, blasint *ldB, blasint *Info){ + + char trans_arg = *TRANS; + + blas_arg_t args; + + blasint info; + int trans; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.m = *N; + args.n = *NRHS; + args.a = (void *)a; + args.lda = *ldA; + args.b = (void *)b; + args.ldb = *ldB; + args.c = (void *)ipiv; + + info = 0; + + TOUPPER(trans_arg); + trans = -1; + + if (trans_arg == 'N') trans = 0; + if (trans_arg == 'T') trans = 1; + if (trans_arg == 'R') trans = 2; + if (trans_arg == 'C') trans = 3; + + if (args.ldb < MAX(1, args.m)) info = 8; + if (args.lda < MAX(1, args.m)) info = 5; + if (args.n < 0) info = 3; + if (args.m < 0) info = 2; + if (trans < 0) info = 1; + + if (info != 0) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + return 0; + } + + args.alpha = NULL; + args.beta = NULL; + + *Info = info; + + if (args.m == 0 || args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + (getrs_single[trans])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + (getrs_parallel[trans])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2 * args.m * args.m * args.n); + + IDEBUG_END; + + return 0; + +} diff --git a/interface/lapack/zlaswp.c b/interface/lapack/zlaswp.c new file mode 100644 index 000000000..85ead2c86 --- /dev/null +++ b/interface/lapack/zlaswp.c @@ -0,0 +1,108 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +static int (*laswp[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, blasint *, BLASLONG) = { +#ifdef XDOUBLE + xlaswp_plus, xlaswp_minus, +#elif defined(DOUBLE) + zlaswp_plus, zlaswp_minus, +#else + claswp_plus, claswp_minus, +#endif +}; + +int NAME(blasint *N, FLOAT *a, blasint *LDA, blasint *K1, blasint *K2, blasint *ipiv, blasint *INCX){ + + blasint n = *N; + blasint lda = *LDA; + blasint k1 = *K1; + blasint k2 = *K2; + blasint incx = *INCX; + int flag; + +#ifdef SMP + int mode; + FLOAT dummyalpha[2] = {ZERO, ZERO}; + int nthreads; +#endif + + PRINT_DEBUG_NAME; + + if (incx == 0 || n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + + flag = (incx < 0); + +#ifdef SMP + nthreads = num_cpu_avail(2); + + if (nthreads == 1) { +#endif + + (laswp[flag])(n, k1, k2, ZERO, ZERO, a, lda, NULL, 0, ipiv, incx); + +#ifdef SMP + } else { + +#ifdef XDOUBLE + mode = BLAS_XDOUBLE | BLAS_COMPLEX; +#elif defined(DOUBLE) + mode = BLAS_DOUBLE | BLAS_COMPLEX; +#else + mode = BLAS_SINGLE | BLAS_COMPLEX; +#endif + + blas_level1_thread(mode, n, k1, k2, dummyalpha, a, lda, NULL, 0, ipiv, incx, laswp[flag], nthreads); + } +#endif + + FUNCTION_PROFILE_END(COMPSIZE, n * (k2 - k1), 0); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zlauu2.c b/interface/lapack/zlauu2.c new file mode 100644 index 000000000..05603fe1b --- /dev/null +++ b/interface/lapack/zlauu2.c @@ -0,0 +1,129 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QLAUU2" +#elif defined(DOUBLE) +#define ERROR_NAME "ZLAUU2" +#else +#define ERROR_NAME "CLAUU2" +#endif + +static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + +#ifdef XDOUBLE + xlauu2_U, xlauu2_L, +#elif defined(DOUBLE) + zlauu2_U, zlauu2_L, +#else + clauu2_U, clauu2_L, +#endif + }; + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zlauum.c b/interface/lapack/zlauum.c new file mode 100644 index 000000000..23990e8e4 --- /dev/null +++ b/interface/lapack/zlauum.c @@ -0,0 +1,141 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XLAUUM" +#elif defined(DOUBLE) +#define ERROR_NAME "ZLAUUM" +#else +#define ERROR_NAME "CLAUUM" +#endif + +static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_SINGLE, LAUUM_L_SINGLE, +}; + +#ifdef SMP +static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zpotf2.c b/interface/lapack/zpotf2.c new file mode 100644 index 000000000..f8f81e2c5 --- /dev/null +++ b/interface/lapack/zpotf2.c @@ -0,0 +1,129 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XPOTF2" +#elif defined(DOUBLE) +#define ERROR_NAME "ZPOTF2" +#else +#define ERROR_NAME "CPOTF2" +#endif + +static blasint (*potf2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + +#ifdef XDOUBLE + xpotf2_U, xpotf2_L, +#elif defined(DOUBLE) + zpotf2_U, zpotf2_L, +#else + cpotf2_U, cpotf2_L, +#endif + }; + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (potf2[uplo])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zpotrf.c b/interface/lapack/zpotrf.c new file mode 100644 index 000000000..e2004d744 --- /dev/null +++ b/interface/lapack/zpotrf.c @@ -0,0 +1,141 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XPOTRF" +#elif defined(DOUBLE) +#define ERROR_NAME "ZPOTRF" +#else +#define ERROR_NAME "CPOTRF" +#endif + +static blasint (*potrf_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + POTRF_U_SINGLE, POTRF_L_SINGLE, +}; + +#ifdef SMP +static blasint (*potrf_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + POTRF_U_PARALLEL, POTRF_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (potrf_single[uplo])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + *Info = (potrf_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zpotri.c b/interface/lapack/zpotri.c new file mode 100644 index 000000000..df325424e --- /dev/null +++ b/interface/lapack/zpotri.c @@ -0,0 +1,157 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XPOTRI" +#elif defined(DOUBLE) +#define ERROR_NAME "ZPOTRI" +#else +#define ERROR_NAME "CPOTRI" +#endif + +static blasint (*trtri_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UN_SINGLE, TRTRI_LN_SINGLE, +}; + +static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + LAUUM_U_SINGLE, LAUUM_L_SINGLE, +}; + +#ifdef SMP +static blasint (*trtri_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + TRTRI_UN_PARALLEL, TRTRI_LN_PARALLEL, +}; + +static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) ={ + LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + info = (trtri_single[uplo])(&args, NULL, NULL, sa, sb, 0); + + if (!info) { + info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); + } + + *Info = info; + +#ifdef SMP + } else { + info = (trtri_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + + if (!info) { + info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + } + + *Info = info; + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} From ac029f81b3f21ad9c1a68656a937065934bfb33c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 19:07:51 +0200 Subject: [PATCH 65/98] enabled and tested optimized dgetrf function --- interface/Makefile | 17 ++++++++++------- lapack-netlib/SRC/Makefile | 2 +- lapack/Makefile | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 708761559..92fc79bc2 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -347,10 +347,13 @@ SLAPACKOBJS = \ spotf2.$(SUFFIX) spotrf.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) \ slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ +#DLAPACKOBJS = \ +# dgetf2.$(SUFFIX) dgetrf.$(SUFFIX) dlauu2.$(SUFFIX) dlauum.$(SUFFIX) \ +# dpotf2.$(SUFFIX) dpotrf.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) \ +# dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ + DLAPACKOBJS = \ - dgetf2.$(SUFFIX) dgetrf.$(SUFFIX) dlauu2.$(SUFFIX) dlauum.$(SUFFIX) \ - dpotf2.$(SUFFIX) dpotrf.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) \ - dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ + dgetrf.$(SUFFIX) QLAPACKOBJS = \ qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ @@ -372,15 +375,15 @@ XLAPACKOBJS = \ xpotf2.$(SUFFIX) xpotrf.$(SUFFIX) xtrti2.$(SUFFIX) xtrtri.$(SUFFIX) \ xlaswp.$(SUFFIX) xgetrs.$(SUFFIX) xgesv.$(SUFFIX) xpotri.$(SUFFIX) \ -#ifneq ($(NO_LAPACK), 1) +ifneq ($(NO_LAPACK), 1) #SBLASOBJS += $(SLAPACKOBJS) -#DBLASOBJS += $(DLAPACKOBJS) +DBLASOBJS += $(DLAPACKOBJS) #QBLASOBJS += $(QLAPACKOBJS) #CBLASOBJS += $(CLAPACKOBJS) #ZBLASOBJS += $(ZLAPACKOBJS) #XBLASOBJS += $(XLAPACKOBJS) -#endif +endif FUNCOBJS = $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) @@ -1752,7 +1755,7 @@ xgetf2.$(SUFFIX) xgetf2.$(PSUFFIX) : zgetf2.c sgetrf.$(SUFFIX) sgetrf.$(PSUFFIX) : getrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -dgetrf.$(SUFFIX) dgetrf.$(PSUFFIX) : getrf.c +dgetrf.$(SUFFIX) dgetrf.$(PSUFFIX) : lapack/getrf.c $(CC) -c $(CFLAGS) $< -o $(@F) qgetrf.$(SUFFIX) qgetrf.$(PSUFFIX) : getrf.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 46a3f7881..018345d41 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -262,7 +262,7 @@ DLASRC = \ dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ - dgetc2.o dgetf2.o dgetrf.o dgetri.o \ + dgetc2.o dgetf2.o dgetri.o \ dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ dggglm.o dgghrd.o dgglse.o dggqrf.o \ dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ diff --git a/lapack/Makefile b/lapack/Makefile index dd203d222..da88ba00e 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = +SUBDIRS = getrf getf2 laswp FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 From 6fc46467093e54076cf22406cac92bb3d22c9d01 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 19:36:32 +0200 Subject: [PATCH 66/98] enabled and tested optimized zgetrf lapack function --- interface/Makefile | 13 ++++++++----- lapack-netlib/SRC/Makefile | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 92fc79bc2..433faab23 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -365,10 +365,13 @@ CLAPACKOBJS = \ cpotf2.$(SUFFIX) cpotrf.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) \ claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ +#ZLAPACKOBJS = \ +# zgetf2.$(SUFFIX) zgetrf.$(SUFFIX) zlauu2.$(SUFFIX) zlauum.$(SUFFIX) \ +# zpotf2.$(SUFFIX) zpotrf.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) \ +# zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ + ZLAPACKOBJS = \ - zgetf2.$(SUFFIX) zgetrf.$(SUFFIX) zlauu2.$(SUFFIX) zlauum.$(SUFFIX) \ - zpotf2.$(SUFFIX) zpotrf.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) \ - zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ + zgetrf.$(SUFFIX) XLAPACKOBJS = \ xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ @@ -380,7 +383,7 @@ ifneq ($(NO_LAPACK), 1) DBLASOBJS += $(DLAPACKOBJS) #QBLASOBJS += $(QLAPACKOBJS) #CBLASOBJS += $(CLAPACKOBJS) -#ZBLASOBJS += $(ZLAPACKOBJS) +ZBLASOBJS += $(ZLAPACKOBJS) #XBLASOBJS += $(XLAPACKOBJS) endif @@ -1764,7 +1767,7 @@ qgetrf.$(SUFFIX) qgetrf.$(PSUFFIX) : getrf.c cgetrf.$(SUFFIX) cgetrf.$(PSUFFIX) : zgetrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -zgetrf.$(SUFFIX) zgetrf.$(PSUFFIX) : zgetrf.c +zgetrf.$(SUFFIX) zgetrf.$(PSUFFIX) : lapack/zgetrf.c $(CC) -c $(CFLAGS) $< -o $(@F) xgetrf.$(SUFFIX) xgetrf.$(PSUFFIX) : zgetrf.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 018345d41..3c76f7c43 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -335,7 +335,7 @@ ZLASRC = \ zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ - zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ + zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o \ zgetri.o zgetrs.o \ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ zgghrd.o zgglse.o zggqrf.o zggrqf.o \ From eea6f51df9dbbe4417ee1097608da9276441bb5a Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 20:01:23 +0200 Subject: [PATCH 67/98] enabled and tested optimized sgetrf lapack function --- interface/Makefile | 14 +++++++++----- lapack-netlib/SRC/Makefile | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 433faab23..e436ad002 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -342,10 +342,14 @@ CBLASOBJS = $(CBLAS1OBJS) $(CBLAS2OBJS) $(CBLAS3OBJS) ZBLASOBJS = $(ZBLAS1OBJS) $(ZBLAS2OBJS) $(ZBLAS3OBJS) XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) +#SLAPACKOBJS = \ +# sgetf2.$(SUFFIX) sgetrf.$(SUFFIX) slauu2.$(SUFFIX) slauum.$(SUFFIX) \ +# spotf2.$(SUFFIX) spotrf.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) \ +# slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ + SLAPACKOBJS = \ - sgetf2.$(SUFFIX) sgetrf.$(SUFFIX) slauu2.$(SUFFIX) slauum.$(SUFFIX) \ - spotf2.$(SUFFIX) spotrf.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) \ - slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ + sgetrf.$(SUFFIX) + #DLAPACKOBJS = \ # dgetf2.$(SUFFIX) dgetrf.$(SUFFIX) dlauu2.$(SUFFIX) dlauum.$(SUFFIX) \ @@ -379,7 +383,7 @@ XLAPACKOBJS = \ xlaswp.$(SUFFIX) xgetrs.$(SUFFIX) xgesv.$(SUFFIX) xpotri.$(SUFFIX) \ ifneq ($(NO_LAPACK), 1) -#SBLASOBJS += $(SLAPACKOBJS) +SBLASOBJS += $(SLAPACKOBJS) DBLASOBJS += $(DLAPACKOBJS) #QBLASOBJS += $(QLAPACKOBJS) #CBLASOBJS += $(CLAPACKOBJS) @@ -1755,7 +1759,7 @@ zgetf2.$(SUFFIX) zgetf2.$(PSUFFIX) : zgetf2.c xgetf2.$(SUFFIX) xgetf2.$(PSUFFIX) : zgetf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -sgetrf.$(SUFFIX) sgetrf.$(PSUFFIX) : getrf.c +sgetrf.$(SUFFIX) sgetrf.$(PSUFFIX) : lapack/getrf.c $(CC) -c $(CFLAGS) $< -o $(@F) dgetrf.$(SUFFIX) dgetrf.$(PSUFFIX) : lapack/getrf.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 3c76f7c43..981bf1068 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -157,7 +157,7 @@ SLASRC = \ sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o +DSLASRC = spotrs.o sgetrs.o spotrf.o ifdef USEXBLAS SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ From 65f2fba4c389976e541120334352b8bead967539 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 20:32:27 +0200 Subject: [PATCH 68/98] enabled and tested optimized cgetrf lapack function --- interface/Makefile | 14 +++++++++----- lapack-netlib/SRC/Makefile | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index e436ad002..1b60ee391 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -364,10 +364,14 @@ QLAPACKOBJS = \ qpotf2.$(SUFFIX) qpotrf.$(SUFFIX) qtrti2.$(SUFFIX) qtrtri.$(SUFFIX) \ qlaswp.$(SUFFIX) qgetrs.$(SUFFIX) qgesv.$(SUFFIX) qpotri.$(SUFFIX) \ +#CLAPACKOBJS = \ +# cgetf2.$(SUFFIX) cgetrf.$(SUFFIX) clauu2.$(SUFFIX) clauum.$(SUFFIX) \ +# cpotf2.$(SUFFIX) cpotrf.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) \ +# claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ + CLAPACKOBJS = \ - cgetf2.$(SUFFIX) cgetrf.$(SUFFIX) clauu2.$(SUFFIX) clauum.$(SUFFIX) \ - cpotf2.$(SUFFIX) cpotrf.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) \ - claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ + cgetrf.$(SUFFIX) + #ZLAPACKOBJS = \ # zgetf2.$(SUFFIX) zgetrf.$(SUFFIX) zlauu2.$(SUFFIX) zlauum.$(SUFFIX) \ @@ -386,7 +390,7 @@ ifneq ($(NO_LAPACK), 1) SBLASOBJS += $(SLAPACKOBJS) DBLASOBJS += $(DLAPACKOBJS) #QBLASOBJS += $(QLAPACKOBJS) -#CBLASOBJS += $(CLAPACKOBJS) +CBLASOBJS += $(CLAPACKOBJS) ZBLASOBJS += $(ZLAPACKOBJS) #XBLASOBJS += $(XLAPACKOBJS) @@ -1768,7 +1772,7 @@ dgetrf.$(SUFFIX) dgetrf.$(PSUFFIX) : lapack/getrf.c qgetrf.$(SUFFIX) qgetrf.$(PSUFFIX) : getrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -cgetrf.$(SUFFIX) cgetrf.$(PSUFFIX) : zgetrf.c +cgetrf.$(SUFFIX) cgetrf.$(PSUFFIX) : lapack/zgetrf.c $(CC) -c $(CFLAGS) $< -o $(@F) zgetrf.$(SUFFIX) zgetrf.$(PSUFFIX) : lapack/zgetrf.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 981bf1068..789f0f907 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -252,7 +252,7 @@ CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o endif -ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o +ZCLASRC = cpotrs.o cgetrs.o cpotrf.o DLASRC = \ dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ From 536875d4639b279eedc25c7a0460ecce7815fd58 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 21:13:56 +0200 Subject: [PATCH 69/98] enabled and tested optimized getrs lapack functions --- interface/Makefile | 16 ++++++++-------- lapack-netlib/SRC/Makefile | 8 ++++---- lapack/Makefile | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 1b60ee391..957b4a8fe 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -348,7 +348,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) # slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ SLAPACKOBJS = \ - sgetrf.$(SUFFIX) + sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) #DLAPACKOBJS = \ @@ -357,7 +357,7 @@ SLAPACKOBJS = \ # dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ DLAPACKOBJS = \ - dgetrf.$(SUFFIX) + dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) QLAPACKOBJS = \ qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ @@ -370,7 +370,7 @@ QLAPACKOBJS = \ # claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ CLAPACKOBJS = \ - cgetrf.$(SUFFIX) + cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) #ZLAPACKOBJS = \ @@ -379,7 +379,7 @@ CLAPACKOBJS = \ # zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ ZLAPACKOBJS = \ - zgetrf.$(SUFFIX) + zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) XLAPACKOBJS = \ xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ @@ -1907,19 +1907,19 @@ zlaswp.$(SUFFIX) zlaswp.$(PSUFFIX) : zlaswp.c xlaswp.$(SUFFIX) xlaswp.$(PSUFFIX) : zlaswp.c $(CC) -c $(CFLAGS) $< -o $(@F) -sgetrs.$(SUFFIX) sgetrs.$(PSUFFIX) : getrs.c +sgetrs.$(SUFFIX) sgetrs.$(PSUFFIX) : lapack/getrs.c $(CC) -c $(CFLAGS) $< -o $(@F) -dgetrs.$(SUFFIX) dgetrs.$(PSUFFIX) : getrs.c +dgetrs.$(SUFFIX) dgetrs.$(PSUFFIX) : lapack/getrs.c $(CC) -c $(CFLAGS) $< -o $(@F) qgetrs.$(SUFFIX) qgetrs.$(PSUFFIX) : getrs.c $(CC) -c $(CFLAGS) $< -o $(@F) -cgetrs.$(SUFFIX) cgetrs.$(PSUFFIX) : zgetrs.c +cgetrs.$(SUFFIX) cgetrs.$(PSUFFIX) : lapack/zgetrs.c $(CC) -c $(CFLAGS) $< -o $(@F) -zgetrs.$(SUFFIX) zgetrs.$(PSUFFIX) : zgetrs.c +zgetrs.$(SUFFIX) zgetrs.$(PSUFFIX) : lapack/zgetrs.c $(CC) -c $(CFLAGS) $< -o $(@F) xgetrs.$(SUFFIX) xgetrs.$(PSUFFIX) : zgetrs.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 789f0f907..6b76852b0 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -157,7 +157,7 @@ SLASRC = \ sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -DSLASRC = spotrs.o sgetrs.o spotrf.o +DSLASRC = spotrs.o spotrf.o ifdef USEXBLAS SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ @@ -252,7 +252,7 @@ CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o endif -ZCLASRC = cpotrs.o cgetrs.o cpotrf.o +ZCLASRC = cpotrs.o cpotrf.o DLASRC = \ dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ @@ -263,7 +263,7 @@ DLASRC = \ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ dgetc2.o dgetf2.o dgetri.o \ - dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ + dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ dggglm.o dgghrd.o dgglse.o dggqrf.o \ dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ @@ -336,7 +336,7 @@ ZLASRC = \ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o \ - zgetri.o zgetrs.o \ + zgetri.o \ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ zgghrd.o zgglse.o zggqrf.o zggrqf.o \ zggsvd.o zggsvp.o \ diff --git a/lapack/Makefile b/lapack/Makefile index da88ba00e..b0e3cf071 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = getrf getf2 laswp +SUBDIRS = getrf getf2 laswp getrs FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 From 4f98f8c9b32602f6590f1997be5b272f62c8cb78 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 21:42:37 +0200 Subject: [PATCH 70/98] enabled and tested optimized potrf lapack functions --- interface/Makefile | 16 ++++++++-------- lapack-netlib/SRC/Makefile | 8 ++++---- lapack/Makefile | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 957b4a8fe..d694591e6 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -348,7 +348,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) # slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ SLAPACKOBJS = \ - sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) + sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) #DLAPACKOBJS = \ @@ -357,7 +357,7 @@ SLAPACKOBJS = \ # dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ DLAPACKOBJS = \ - dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) + dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) QLAPACKOBJS = \ qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ @@ -370,7 +370,7 @@ QLAPACKOBJS = \ # claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ CLAPACKOBJS = \ - cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) + cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) #ZLAPACKOBJS = \ @@ -379,7 +379,7 @@ CLAPACKOBJS = \ # zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ ZLAPACKOBJS = \ - zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) + zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) XLAPACKOBJS = \ xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ @@ -1835,19 +1835,19 @@ zpotf2.$(SUFFIX) zpotf2.$(PSUFFIX) : zpotf2.c xpotf2.$(SUFFIX) xpotf2.$(PSUFFIX) : zpotf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -spotrf.$(SUFFIX) spotrf.$(PSUFFIX) : potrf.c +spotrf.$(SUFFIX) spotrf.$(PSUFFIX) : lapack/potrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -dpotrf.$(SUFFIX) dpotrf.$(PSUFFIX) : potrf.c +dpotrf.$(SUFFIX) dpotrf.$(PSUFFIX) : lapack/potrf.c $(CC) -c $(CFLAGS) $< -o $(@F) qpotrf.$(SUFFIX) qpotrf.$(PSUFFIX) : potrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -cpotrf.$(SUFFIX) cpotrf.$(PSUFFIX) : zpotrf.c +cpotrf.$(SUFFIX) cpotrf.$(PSUFFIX) : lapack/zpotrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -zpotrf.$(SUFFIX) zpotrf.$(PSUFFIX) : zpotrf.c +zpotrf.$(SUFFIX) zpotrf.$(PSUFFIX) : lapack/zpotrf.c $(CC) -c $(CFLAGS) $< -o $(@F) xpotrf.$(SUFFIX) xpotrf.$(PSUFFIX) : zpotrf.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 6b76852b0..2f1e077fb 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -157,7 +157,7 @@ SLASRC = \ sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -DSLASRC = spotrs.o spotrf.o +DSLASRC = spotrs.o ifdef USEXBLAS SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ @@ -252,7 +252,7 @@ CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o endif -ZCLASRC = cpotrs.o cpotrf.o +ZCLASRC = cpotrs.o DLASRC = \ dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ @@ -287,7 +287,7 @@ DLASRC = \ dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ dpbstf.o dpbsv.o dpbsvx.o \ dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ - dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ + dposvx.o dpotf2.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ dppcon.o dppequ.o \ dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ @@ -372,7 +372,7 @@ ZLASRC = \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ - zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ + zposv.o zposvx.o zpotf2.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ diff --git a/lapack/Makefile b/lapack/Makefile index b0e3cf071..f99416fa6 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = getrf getf2 laswp getrs +SUBDIRS = getrf getf2 laswp getrs potrf potf2 FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 From 61a2c50e8ea4efa92c2e20e293775d251f8ade47 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 22:21:16 +0200 Subject: [PATCH 71/98] enabled and tested optimized getf2 lapack functions --- interface/Makefile | 16 ++++++++-------- lapack-netlib/SRC/Makefile | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index d694591e6..ff4102d9a 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -348,7 +348,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) # slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ SLAPACKOBJS = \ - sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) + sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) #DLAPACKOBJS = \ @@ -357,7 +357,7 @@ SLAPACKOBJS = \ # dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ DLAPACKOBJS = \ - dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) + dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) QLAPACKOBJS = \ qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ @@ -370,7 +370,7 @@ QLAPACKOBJS = \ # claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ CLAPACKOBJS = \ - cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) + cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) #ZLAPACKOBJS = \ @@ -379,7 +379,7 @@ CLAPACKOBJS = \ # zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ ZLAPACKOBJS = \ - zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) + zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) XLAPACKOBJS = \ xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ @@ -1745,19 +1745,19 @@ cblas_cher2k.$(SUFFIX) cblas_cher2k.$(PSUFFIX) : syr2k.c cblas_zher2k.$(SUFFIX) cblas_zher2k.$(PSUFFIX) : syr2k.c $(CC) -DCBLAS -c $(CFLAGS) -DHEMM $< -o $(@F) -sgetf2.$(SUFFIX) sgetf2.$(PSUFFIX) : getf2.c +sgetf2.$(SUFFIX) sgetf2.$(PSUFFIX) : lapack/getf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -dgetf2.$(SUFFIX) dgetf2.$(PSUFFIX) : getf2.c +dgetf2.$(SUFFIX) dgetf2.$(PSUFFIX) : lapack/getf2.c $(CC) -c $(CFLAGS) $< -o $(@F) qgetf2.$(SUFFIX) qgetf2.$(PSUFFIX) : getf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -cgetf2.$(SUFFIX) cgetf2.$(PSUFFIX) : zgetf2.c +cgetf2.$(SUFFIX) cgetf2.$(PSUFFIX) : lapack/zgetf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -zgetf2.$(SUFFIX) zgetf2.$(PSUFFIX) : zgetf2.c +zgetf2.$(SUFFIX) zgetf2.$(PSUFFIX) : lapack/zgetf2.c $(CC) -c $(CFLAGS) $< -o $(@F) xgetf2.$(SUFFIX) xgetf2.$(PSUFFIX) : zgetf2.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 2f1e077fb..dee4be217 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -102,7 +102,7 @@ SLASRC = \ sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ - sgetc2.o sgetf2.o sgetri.o \ + sgetc2.o sgetri.o \ sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ sggglm.o sgghrd.o sgglse.o sggqrf.o \ sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ @@ -177,7 +177,7 @@ CLASRC = \ cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ - cgesvx.o cgetc2.o cgetf2.o cgetri.o \ + cgesvx.o cgetc2.o cgetri.o \ cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ cgghrd.o cgglse.o cggqrf.o cggrqf.o \ cggsvd.o cggsvp.o \ @@ -262,7 +262,7 @@ DLASRC = \ dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ - dgetc2.o dgetf2.o dgetri.o \ + dgetc2.o dgetri.o \ dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ dggglm.o dgghrd.o dgglse.o dggqrf.o \ dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ @@ -335,7 +335,7 @@ ZLASRC = \ zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ - zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o \ + zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o \ zgetri.o \ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ zgghrd.o zgglse.o zggqrf.o zggrqf.o \ From ebc95e6f11e64a671c5a42b4bbb85207e8644017 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 22:41:43 +0200 Subject: [PATCH 72/98] enabled and tested optimized potf2 lapack functions --- interface/Makefile | 23 +++++++++++++++-------- lapack-netlib/SRC/Makefile | 8 ++++---- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index ff4102d9a..42e9f50b5 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -348,7 +348,8 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) # slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ SLAPACKOBJS = \ - sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) + sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ + spotf2.$(SUFFIX) #DLAPACKOBJS = \ @@ -357,7 +358,9 @@ SLAPACKOBJS = \ # dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ DLAPACKOBJS = \ - dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) + dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ + dpotf2.$(SUFFIX) + QLAPACKOBJS = \ qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ @@ -370,7 +373,8 @@ QLAPACKOBJS = \ # claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ CLAPACKOBJS = \ - cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) + cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ + cpotf2.$(SUFFIX) #ZLAPACKOBJS = \ @@ -379,7 +383,10 @@ CLAPACKOBJS = \ # zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ ZLAPACKOBJS = \ - zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) + zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ + zpotf2.$(SUFFIX) + + XLAPACKOBJS = \ xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ @@ -1817,19 +1824,19 @@ zlauum.$(SUFFIX) zlauum.$(PSUFFIX) : zlauum.c xlauum.$(SUFFIX) xlauum.$(PSUFFIX) : zlauum.c $(CC) -c $(CFLAGS) $< -o $(@F) -spotf2.$(SUFFIX) spotf2.$(PSUFFIX) : potf2.c +spotf2.$(SUFFIX) spotf2.$(PSUFFIX) : lapack/potf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -dpotf2.$(SUFFIX) dpotf2.$(PSUFFIX) : potf2.c +dpotf2.$(SUFFIX) dpotf2.$(PSUFFIX) : lapack/potf2.c $(CC) -c $(CFLAGS) $< -o $(@F) qpotf2.$(SUFFIX) qpotf2.$(PSUFFIX) : potf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -cpotf2.$(SUFFIX) cpotf2.$(PSUFFIX) : zpotf2.c +cpotf2.$(SUFFIX) cpotf2.$(PSUFFIX) : lapack/zpotf2.c $(CC) -c $(CFLAGS) $< -o $(@F) -zpotf2.$(SUFFIX) zpotf2.$(PSUFFIX) : zpotf2.c +zpotf2.$(SUFFIX) zpotf2.$(PSUFFIX) : lapack/zpotf2.c $(CC) -c $(CFLAGS) $< -o $(@F) xpotf2.$(SUFFIX) xpotf2.$(PSUFFIX) : zpotf2.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index dee4be217..40bb5625c 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -127,7 +127,7 @@ SLASRC = \ sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ spbstf.o spbsv.o spbsvx.o \ spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ - sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \ + sposvx.o spotri.o spstrf.o spstf2.o \ sppcon.o sppequ.o \ spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ @@ -210,7 +210,7 @@ CLASRC = \ claswp.o clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ - cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \ + cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ @@ -287,7 +287,7 @@ DLASRC = \ dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ dpbstf.o dpbsv.o dpbsvx.o \ dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ - dposvx.o dpotf2.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ + dposvx.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ dppcon.o dppequ.o \ dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ @@ -372,7 +372,7 @@ ZLASRC = \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ - zposv.o zposvx.o zpotf2.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ + zposv.o zposvx.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ From aaa9d7fbf8428d3a02b78231d420c7a02f4af85a Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 18 May 2014 23:41:13 +0200 Subject: [PATCH 73/98] marked potri functions as bad because a lot of errors --- interface/lapack/{potri.c => potri.c.bad} | 0 interface/lapack/{zpotri.c => zpotri.c.bad} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename interface/lapack/{potri.c => potri.c.bad} (100%) rename interface/lapack/{zpotri.c => zpotri.c.bad} (100%) diff --git a/interface/lapack/potri.c b/interface/lapack/potri.c.bad similarity index 100% rename from interface/lapack/potri.c rename to interface/lapack/potri.c.bad diff --git a/interface/lapack/zpotri.c b/interface/lapack/zpotri.c.bad similarity index 100% rename from interface/lapack/zpotri.c rename to interface/lapack/zpotri.c.bad From 9ed981c5dc92def6295fd5b1e2ee56e83cc5b290 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 18 May 2014 18:54:38 -0700 Subject: [PATCH 74/98] Remove unused dll2 target Signed-off-by: Timothy Gu --- exports/Makefile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/exports/Makefile b/exports/Makefile index 60e936dbd..e09b3c3ad 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -75,9 +75,6 @@ zip : dll zip $(LIBZIPNAME) $(LIBDLLNAME) $(LIBNAME) dll : ../$(LIBDLLNAME) -#libgoto2.dll - -dll2 : libgoto2_shared.dll # On Windows, we only generate a DLL without a version suffix. This is because # applications which link against the dynamic library reference a fixed DLL name @@ -96,17 +93,9 @@ else -lib /machine:X64 /def:libopenblas.def endif -libgoto2_shared.dll : ../$(LIBNAME) libgoto2_shared.def - $(CC) $(CFLAGS) $(LDFLAGS) libgoto2_shared.def -shared -o $(@F) \ - -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ - -Wl,--out-implib,libgoto2_shared.lib $(FEXTRALIB) - libopenblas.def : gensymbol perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) -libgoto2_shared.def : gensymbol - perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) - libgoto_hpl.def : gensymbol perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) From f331cb1a76fded2efbf5aec7fe3a53bb73dc12e9 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 18 May 2014 19:09:26 -0700 Subject: [PATCH 75/98] Remove code for downloading lapack tarball and the patches themselves They are not used anymore since 3eb5af1. Signed-off-by: Timothy Gu --- Makefile | 31 - exports/gensymbol | 3 +- patch.for_lapack-3.1.1 | 684 ---------- patch.for_lapack-3.4.0 | 2956 ---------------------------------------- patch.for_lapack-3.4.1 | 932 ------------- patch.for_lapack-3.4.2 | 1000 -------------- 6 files changed, 1 insertion(+), 5605 deletions(-) delete mode 100644 patch.for_lapack-3.1.1 delete mode 100644 patch.for_lapack-3.4.0 delete mode 100644 patch.for_lapack-3.4.1 delete mode 100644 patch.for_lapack-3.4.2 diff --git a/Makefile b/Makefile index c2a019305..b34bb91a5 100644 --- a/Makefile +++ b/Makefile @@ -238,37 +238,6 @@ ifndef NOFORTRAN -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc endif -lapack-3.4.2 : lapack-3.4.2.tgz -ifndef NOFORTRAN -ifndef NO_LAPACK - @if test `$(MD5SUM) $< | $(AWK) '{print $$1}'` = 61bf1a8a4469d4bdb7604f5897179478; then \ - echo $(TAR) zxf $< ;\ - $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.2) ;\ - rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\ - else \ - rm -rf $(NETLIB_LAPACK_DIR) ;\ - echo " Cannot download lapack-3.4.2.tgz or the MD5 check sum is wrong (Please use orignal)."; \ - exit 1; \ - fi -endif -endif - -LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.2.tgz - -lapack-3.4.2.tgz : -ifndef NOFORTRAN -#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or -ifeq ($(OSNAME), $(filter $(OSNAME),Darwin NetBSD)) - curl -O $(LAPACK_URL); -else -ifeq ($(OSNAME), FreeBSD) - fetch $(LAPACK_URL); -else - wget -O $@ $(LAPACK_URL); -endif -endif -endif - large.tgz : ifndef NOFORTRAN if [ ! -a $< ]; then diff --git a/exports/gensymbol b/exports/gensymbol index f131de7bc..7e339c99e 100644 --- a/exports/gensymbol +++ b/exports/gensymbol @@ -2725,8 +2725,7 @@ if ($ARGV[8] == 1) { } elsif ($ARGV[5] == 1) { #NO_LAPACK=1 @underscore_objs = (@blasobjs, @misc_underscore_objs); -} elsif (-d "../lapack-3.1.1" || -d "../lapack-3.4.0" || -d "../lapack-3.4.1" || - -d "../lapack-3.4.2" || -d "../lapack-netlib") { +} elsif (-d "../lapack-netlib") { if ($ARGV[7] == 0){ # NEED2UNDERSCORES=0 diff --git a/patch.for_lapack-3.1.1 b/patch.for_lapack-3.1.1 deleted file mode 100644 index 9f10f26c7..000000000 --- a/patch.for_lapack-3.1.1 +++ /dev/null @@ -1,684 +0,0 @@ -diff -ruN lapack-3.1.1.old/INSTALL/Makefile lapack-3.1.1/INSTALL/Makefile ---- lapack-3.1.1.old/INSTALL/Makefile 2007-02-23 14:07:35.000000000 -0600 -+++ lapack-3.1.1/INSTALL/Makefile 2009-12-16 14:40:35.000000000 -0600 -@@ -27,7 +27,7 @@ - $(LOADER) $(LOADOPTS) -o testversion ilaver.o LAPACK_version.o - - clean: -- rm -f *.o -+ rm -f *.o test* - - slamch.o: slamch.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ - dlamch.o: dlamch.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ -diff -ruN lapack-3.1.1.old/Makefile lapack-3.1.1/Makefile ---- lapack-3.1.1.old/Makefile 2007-02-22 15:55:00.000000000 -0600 -+++ lapack-3.1.1/Makefile 2009-12-16 14:40:35.000000000 -0600 -@@ -20,9 +20,12 @@ - blaslib: - ( cd BLAS/SRC; $(MAKE) ) - --lapacklib: lapack_install -+lapacklib: - ( cd SRC; $(MAKE) ) - -+lapack_prof: -+ ( cd SRC; $(MAKE) lapack_prof) -+ - tmglib: - ( cd TESTING/MATGEN; $(MAKE) ) - -diff -ruN lapack-3.1.1.old/SRC/Makefile lapack-3.1.1/SRC/Makefile ---- lapack-3.1.1.old/SRC/Makefile 2007-02-23 15:33:05.000000000 -0600 -+++ lapack-3.1.1/SRC/Makefile 2009-12-16 14:41:09.000000000 -0600 -@@ -38,265 +38,273 @@ - # - ####################################################################### - --ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o iparmq.o \ -- ../INSTALL/ilaver.o ../INSTALL/lsame.o -+ALLAUX = ilaenv.$(SUFFIX) ieeeck.$(SUFFIX) lsamen.$(SUFFIX) iparmq.$(SUFFIX) \ -+ ../INSTALL/ilaver.$(SUFFIX) - - SCLAUX = \ -- sbdsdc.o \ -- sbdsqr.o sdisna.o slabad.o slacpy.o sladiv.o slae2.o slaebz.o \ -- slaed0.o slaed1.o slaed2.o slaed3.o slaed4.o slaed5.o slaed6.o \ -- slaed7.o slaed8.o slaed9.o slaeda.o slaev2.o slagtf.o \ -- slagts.o slamrg.o slanst.o \ -- slapy2.o slapy3.o slarnv.o \ -- slarra.o slarrb.o slarrc.o slarrd.o slarre.o slarrf.o slarrj.o \ -- slarrk.o slarrr.o slaneg.o \ -- slartg.o slaruv.o slas2.o slascl.o \ -- slasd0.o slasd1.o slasd2.o slasd3.o slasd4.o slasd5.o slasd6.o \ -- slasd7.o slasd8.o slasda.o slasdq.o slasdt.o \ -- slaset.o slasq1.o slasq2.o slasq3.o slazq3.o slasq4.o slazq4.o slasq5.o slasq6.o \ -- slasr.o slasrt.o slassq.o slasv2.o spttrf.o sstebz.o sstedc.o \ -- ssteqr.o ssterf.o slaisnan.o sisnan.o \ -- ../INSTALL/slamch.o ../INSTALL/second_$(TIMER).o -+ sbdsdc.$(SUFFIX) \ -+ sbdsqr.$(SUFFIX) sdisna.$(SUFFIX) slabad.$(SUFFIX) slacpy.$(SUFFIX) sladiv.$(SUFFIX) slae2.$(SUFFIX) slaebz.$(SUFFIX) \ -+ slaed0.$(SUFFIX) slaed1.$(SUFFIX) slaed2.$(SUFFIX) slaed3.$(SUFFIX) slaed4.$(SUFFIX) slaed5.$(SUFFIX) slaed6.$(SUFFIX) \ -+ slaed7.$(SUFFIX) slaed8.$(SUFFIX) slaed9.$(SUFFIX) slaeda.$(SUFFIX) slaev2.$(SUFFIX) slagtf.$(SUFFIX) \ -+ slagts.$(SUFFIX) slamrg.$(SUFFIX) slanst.$(SUFFIX) \ -+ slapy2.$(SUFFIX) slapy3.$(SUFFIX) slarnv.$(SUFFIX) \ -+ slarra.$(SUFFIX) slarrb.$(SUFFIX) slarrc.$(SUFFIX) slarrd.$(SUFFIX) slarre.$(SUFFIX) slarrf.$(SUFFIX) slarrj.$(SUFFIX) \ -+ slarrk.$(SUFFIX) slarrr.$(SUFFIX) slaneg.$(SUFFIX) \ -+ slartg.$(SUFFIX) slaruv.$(SUFFIX) slas2.$(SUFFIX) slascl.$(SUFFIX) \ -+ slasd0.$(SUFFIX) slasd1.$(SUFFIX) slasd2.$(SUFFIX) slasd3.$(SUFFIX) slasd4.$(SUFFIX) slasd5.$(SUFFIX) slasd6.$(SUFFIX) \ -+ slasd7.$(SUFFIX) slasd8.$(SUFFIX) slasda.$(SUFFIX) slasdq.$(SUFFIX) slasdt.$(SUFFIX) \ -+ slaset.$(SUFFIX) slasq1.$(SUFFIX) slasq2.$(SUFFIX) slasq3.$(SUFFIX) slazq3.$(SUFFIX) slasq4.$(SUFFIX) slazq4.$(SUFFIX) slasq5.$(SUFFIX) slasq6.$(SUFFIX) \ -+ slasr.$(SUFFIX) slasrt.$(SUFFIX) slassq.$(SUFFIX) slasv2.$(SUFFIX) spttrf.$(SUFFIX) sstebz.$(SUFFIX) sstedc.$(SUFFIX) \ -+ ssteqr.$(SUFFIX) ssterf.$(SUFFIX) slaisnan.$(SUFFIX) sisnan.$(SUFFIX) \ -+ ../INSTALL/second_$(TIMER).$(SUFFIX) - - DZLAUX = \ -- dbdsdc.o \ -- dbdsqr.o ddisna.o dlabad.o dlacpy.o dladiv.o dlae2.o dlaebz.o \ -- dlaed0.o dlaed1.o dlaed2.o dlaed3.o dlaed4.o dlaed5.o dlaed6.o \ -- dlaed7.o dlaed8.o dlaed9.o dlaeda.o dlaev2.o dlagtf.o \ -- dlagts.o dlamrg.o dlanst.o \ -- dlapy2.o dlapy3.o dlarnv.o \ -- dlarra.o dlarrb.o dlarrc.o dlarrd.o dlarre.o dlarrf.o dlarrj.o \ -- dlarrk.o dlarrr.o dlaneg.o \ -- dlartg.o dlaruv.o dlas2.o dlascl.o \ -- dlasd0.o dlasd1.o dlasd2.o dlasd3.o dlasd4.o dlasd5.o dlasd6.o \ -- dlasd7.o dlasd8.o dlasda.o dlasdq.o dlasdt.o \ -- dlaset.o dlasq1.o dlasq2.o dlasq3.o dlazq3.o dlasq4.o dlazq4.o dlasq5.o dlasq6.o \ -- dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \ -- dsteqr.o dsterf.o dlaisnan.o disnan.o \ -- ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o -+ dbdsdc.$(SUFFIX) \ -+ dbdsqr.$(SUFFIX) ddisna.$(SUFFIX) dlabad.$(SUFFIX) dlacpy.$(SUFFIX) dladiv.$(SUFFIX) dlae2.$(SUFFIX) dlaebz.$(SUFFIX) \ -+ dlaed0.$(SUFFIX) dlaed1.$(SUFFIX) dlaed2.$(SUFFIX) dlaed3.$(SUFFIX) dlaed4.$(SUFFIX) dlaed5.$(SUFFIX) dlaed6.$(SUFFIX) \ -+ dlaed7.$(SUFFIX) dlaed8.$(SUFFIX) dlaed9.$(SUFFIX) dlaeda.$(SUFFIX) dlaev2.$(SUFFIX) dlagtf.$(SUFFIX) \ -+ dlagts.$(SUFFIX) dlamrg.$(SUFFIX) dlanst.$(SUFFIX) \ -+ dlapy2.$(SUFFIX) dlapy3.$(SUFFIX) dlarnv.$(SUFFIX) \ -+ dlarra.$(SUFFIX) dlarrb.$(SUFFIX) dlarrc.$(SUFFIX) dlarrd.$(SUFFIX) dlarre.$(SUFFIX) dlarrf.$(SUFFIX) dlarrj.$(SUFFIX) \ -+ dlarrk.$(SUFFIX) dlarrr.$(SUFFIX) dlaneg.$(SUFFIX) \ -+ dlartg.$(SUFFIX) dlaruv.$(SUFFIX) dlas2.$(SUFFIX) dlascl.$(SUFFIX) \ -+ dlasd0.$(SUFFIX) dlasd1.$(SUFFIX) dlasd2.$(SUFFIX) dlasd3.$(SUFFIX) dlasd4.$(SUFFIX) dlasd5.$(SUFFIX) dlasd6.$(SUFFIX) \ -+ dlasd7.$(SUFFIX) dlasd8.$(SUFFIX) dlasda.$(SUFFIX) dlasdq.$(SUFFIX) dlasdt.$(SUFFIX) \ -+ dlaset.$(SUFFIX) dlasq1.$(SUFFIX) dlasq2.$(SUFFIX) dlasq3.$(SUFFIX) dlazq3.$(SUFFIX) dlasq4.$(SUFFIX) dlazq4.$(SUFFIX) dlasq5.$(SUFFIX) dlasq6.$(SUFFIX) \ -+ dlasr.$(SUFFIX) dlasrt.$(SUFFIX) dlassq.$(SUFFIX) dlasv2.$(SUFFIX) dpttrf.$(SUFFIX) dstebz.$(SUFFIX) dstedc.$(SUFFIX) \ -+ dsteqr.$(SUFFIX) dsterf.$(SUFFIX) dlaisnan.$(SUFFIX) disnan.$(SUFFIX) \ -+ ../INSTALL/dsecnd_$(TIMER).$(SUFFIX) - - SLASRC = \ -- sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \ -- sgbsvx.o sgbtf2.o sgbtrf.o sgbtrs.o sgebak.o sgebal.o sgebd2.o \ -- sgebrd.o sgecon.o sgeequ.o sgees.o sgeesx.o sgeev.o sgeevx.o \ -- sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \ -- sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ -- sgeqp3.o sgeqpf.o sgeqr2.o sgeqrf.o sgerfs.o sgerq2.o sgerqf.o \ -- sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o sgetc2.o sgetf2.o \ -- sgetrf.o sgetri.o \ -- sgetrs.o sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ -- sggglm.o sgghrd.o sgglse.o sggqrf.o \ -- sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ -- sgtsvx.o sgttrf.o sgttrs.o sgtts2.o shgeqz.o \ -- shsein.o shseqr.o slabrd.o slacon.o slacn2.o \ -- slaein.o slaexc.o slag2.o slags2.o slagtm.o slagv2.o slahqr.o \ -- slahrd.o slahr2.o slaic1.o slaln2.o slals0.o slalsa.o slalsd.o \ -- slangb.o slange.o slangt.o slanhs.o slansb.o slansp.o \ -- slansy.o slantb.o slantp.o slantr.o slanv2.o \ -- slapll.o slapmt.o \ -- slaqgb.o slaqge.o slaqp2.o slaqps.o slaqsb.o slaqsp.o slaqsy.o \ -- slaqr0.o slaqr1.o slaqr2.o slaqr3.o slaqr4.o slaqr5.o \ -- slaqtr.o slar1v.o slar2v.o \ -- slarf.o slarfb.o slarfg.o slarft.o slarfx.o slargv.o \ -- slarrv.o slartv.o \ -- slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o \ -- slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ -- slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ -- sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ -- sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ -- sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ -- sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ -- spbstf.o spbsv.o spbsvx.o \ -- spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ -- sposvx.o spotf2.o spotrf.o spotri.o spotrs.o sppcon.o sppequ.o \ -- spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ -- spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ -- ssbev.o ssbevd.o ssbevx.o ssbgst.o ssbgv.o ssbgvd.o ssbgvx.o \ -- ssbtrd.o sspcon.o sspev.o sspevd.o sspevx.o sspgst.o \ -- sspgv.o sspgvd.o sspgvx.o ssprfs.o sspsv.o sspsvx.o ssptrd.o \ -- ssptrf.o ssptri.o ssptrs.o sstegr.o sstein.o sstev.o sstevd.o sstevr.o \ -- sstevx.o ssycon.o ssyev.o ssyevd.o ssyevr.o ssyevx.o ssygs2.o \ -- ssygst.o ssygv.o ssygvd.o ssygvx.o ssyrfs.o ssysv.o ssysvx.o \ -- ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytrs.o stbcon.o \ -- stbrfs.o stbtrs.o stgevc.o stgex2.o stgexc.o stgsen.o \ -- stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ -- stptrs.o \ -- strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ -- strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o -+ sgbbrd.$(SUFFIX) sgbcon.$(SUFFIX) sgbequ.$(SUFFIX) sgbrfs.$(SUFFIX) sgbsv.$(SUFFIX) \ -+ sgbsvx.$(SUFFIX) sgbtf2.$(SUFFIX) sgbtrf.$(SUFFIX) sgbtrs.$(SUFFIX) sgebak.$(SUFFIX) sgebal.$(SUFFIX) sgebd2.$(SUFFIX) \ -+ sgebrd.$(SUFFIX) sgecon.$(SUFFIX) sgeequ.$(SUFFIX) sgees.$(SUFFIX) sgeesx.$(SUFFIX) sgeev.$(SUFFIX) sgeevx.$(SUFFIX) \ -+ sgegs.$(SUFFIX) sgegv.$(SUFFIX) sgehd2.$(SUFFIX) sgehrd.$(SUFFIX) sgelq2.$(SUFFIX) sgelqf.$(SUFFIX) \ -+ sgels.$(SUFFIX) sgelsd.$(SUFFIX) sgelss.$(SUFFIX) sgelsx.$(SUFFIX) sgelsy.$(SUFFIX) sgeql2.$(SUFFIX) sgeqlf.$(SUFFIX) \ -+ sgeqp3.$(SUFFIX) sgeqpf.$(SUFFIX) sgeqr2.$(SUFFIX) sgeqrf.$(SUFFIX) sgerfs.$(SUFFIX) sgerq2.$(SUFFIX) sgerqf.$(SUFFIX) \ -+ sgesc2.$(SUFFIX) sgesdd.$(SUFFIX) sgesvd.$(SUFFIX) sgesvx.$(SUFFIX) sgetc2.$(SUFFIX) \ -+ sgetri.$(SUFFIX) \ -+ sggbak.$(SUFFIX) sggbal.$(SUFFIX) sgges.$(SUFFIX) sggesx.$(SUFFIX) sggev.$(SUFFIX) sggevx.$(SUFFIX) \ -+ sggglm.$(SUFFIX) sgghrd.$(SUFFIX) sgglse.$(SUFFIX) sggqrf.$(SUFFIX) \ -+ sggrqf.$(SUFFIX) sggsvd.$(SUFFIX) sggsvp.$(SUFFIX) sgtcon.$(SUFFIX) sgtrfs.$(SUFFIX) sgtsv.$(SUFFIX) \ -+ sgtsvx.$(SUFFIX) sgttrf.$(SUFFIX) sgttrs.$(SUFFIX) sgtts2.$(SUFFIX) shgeqz.$(SUFFIX) \ -+ shsein.$(SUFFIX) shseqr.$(SUFFIX) slabrd.$(SUFFIX) slacon.$(SUFFIX) slacn2.$(SUFFIX) \ -+ slaein.$(SUFFIX) slaexc.$(SUFFIX) slag2.$(SUFFIX) slags2.$(SUFFIX) slagtm.$(SUFFIX) slagv2.$(SUFFIX) slahqr.$(SUFFIX) \ -+ slahrd.$(SUFFIX) slahr2.$(SUFFIX) slaic1.$(SUFFIX) slaln2.$(SUFFIX) slals0.$(SUFFIX) slalsa.$(SUFFIX) slalsd.$(SUFFIX) \ -+ slangb.$(SUFFIX) slange.$(SUFFIX) slangt.$(SUFFIX) slanhs.$(SUFFIX) slansb.$(SUFFIX) slansp.$(SUFFIX) \ -+ slansy.$(SUFFIX) slantb.$(SUFFIX) slantp.$(SUFFIX) slantr.$(SUFFIX) slanv2.$(SUFFIX) \ -+ slapll.$(SUFFIX) slapmt.$(SUFFIX) \ -+ slaqgb.$(SUFFIX) slaqge.$(SUFFIX) slaqp2.$(SUFFIX) slaqps.$(SUFFIX) slaqsb.$(SUFFIX) slaqsp.$(SUFFIX) slaqsy.$(SUFFIX) \ -+ slaqr0.$(SUFFIX) slaqr1.$(SUFFIX) slaqr2.$(SUFFIX) slaqr3.$(SUFFIX) slaqr4.$(SUFFIX) slaqr5.$(SUFFIX) \ -+ slaqtr.$(SUFFIX) slar1v.$(SUFFIX) slar2v.$(SUFFIX) \ -+ slarf.$(SUFFIX) slarfb.$(SUFFIX) slarfg.$(SUFFIX) slarft.$(SUFFIX) slarfx.$(SUFFIX) slargv.$(SUFFIX) \ -+ slarrv.$(SUFFIX) slartv.$(SUFFIX) \ -+ slarz.$(SUFFIX) slarzb.$(SUFFIX) slarzt.$(SUFFIX) slasy2.$(SUFFIX) slasyf.$(SUFFIX) \ -+ slatbs.$(SUFFIX) slatdf.$(SUFFIX) slatps.$(SUFFIX) slatrd.$(SUFFIX) slatrs.$(SUFFIX) slatrz.$(SUFFIX) slatzm.$(SUFFIX) \ -+ sopgtr.$(SUFFIX) sopmtr.$(SUFFIX) sorg2l.$(SUFFIX) sorg2r.$(SUFFIX) \ -+ sorgbr.$(SUFFIX) sorghr.$(SUFFIX) sorgl2.$(SUFFIX) sorglq.$(SUFFIX) sorgql.$(SUFFIX) sorgqr.$(SUFFIX) sorgr2.$(SUFFIX) \ -+ sorgrq.$(SUFFIX) sorgtr.$(SUFFIX) sorm2l.$(SUFFIX) sorm2r.$(SUFFIX) \ -+ sormbr.$(SUFFIX) sormhr.$(SUFFIX) sorml2.$(SUFFIX) sormlq.$(SUFFIX) sormql.$(SUFFIX) sormqr.$(SUFFIX) sormr2.$(SUFFIX) \ -+ sormr3.$(SUFFIX) sormrq.$(SUFFIX) sormrz.$(SUFFIX) sormtr.$(SUFFIX) spbcon.$(SUFFIX) spbequ.$(SUFFIX) spbrfs.$(SUFFIX) \ -+ spbstf.$(SUFFIX) spbsv.$(SUFFIX) spbsvx.$(SUFFIX) \ -+ spbtf2.$(SUFFIX) spbtrf.$(SUFFIX) spbtrs.$(SUFFIX) spocon.$(SUFFIX) spoequ.$(SUFFIX) sporfs.$(SUFFIX) sposv.$(SUFFIX) \ -+ sposvx.$(SUFFIX) spotrs.$(SUFFIX) sppcon.$(SUFFIX) sppequ.$(SUFFIX) \ -+ spprfs.$(SUFFIX) sppsv.$(SUFFIX) sppsvx.$(SUFFIX) spptrf.$(SUFFIX) spptri.$(SUFFIX) spptrs.$(SUFFIX) sptcon.$(SUFFIX) \ -+ spteqr.$(SUFFIX) sptrfs.$(SUFFIX) sptsv.$(SUFFIX) sptsvx.$(SUFFIX) spttrs.$(SUFFIX) sptts2.$(SUFFIX) srscl.$(SUFFIX) \ -+ ssbev.$(SUFFIX) ssbevd.$(SUFFIX) ssbevx.$(SUFFIX) ssbgst.$(SUFFIX) ssbgv.$(SUFFIX) ssbgvd.$(SUFFIX) ssbgvx.$(SUFFIX) \ -+ ssbtrd.$(SUFFIX) sspcon.$(SUFFIX) sspev.$(SUFFIX) sspevd.$(SUFFIX) sspevx.$(SUFFIX) sspgst.$(SUFFIX) \ -+ sspgv.$(SUFFIX) sspgvd.$(SUFFIX) sspgvx.$(SUFFIX) ssprfs.$(SUFFIX) sspsv.$(SUFFIX) sspsvx.$(SUFFIX) ssptrd.$(SUFFIX) \ -+ ssptrf.$(SUFFIX) ssptri.$(SUFFIX) ssptrs.$(SUFFIX) sstegr.$(SUFFIX) sstein.$(SUFFIX) sstev.$(SUFFIX) sstevd.$(SUFFIX) sstevr.$(SUFFIX) \ -+ sstevx.$(SUFFIX) ssycon.$(SUFFIX) ssyev.$(SUFFIX) ssyevd.$(SUFFIX) ssyevr.$(SUFFIX) ssyevx.$(SUFFIX) ssygs2.$(SUFFIX) \ -+ ssygst.$(SUFFIX) ssygv.$(SUFFIX) ssygvd.$(SUFFIX) ssygvx.$(SUFFIX) ssyrfs.$(SUFFIX) ssysv.$(SUFFIX) ssysvx.$(SUFFIX) \ -+ ssytd2.$(SUFFIX) ssytf2.$(SUFFIX) ssytrd.$(SUFFIX) ssytrf.$(SUFFIX) ssytri.$(SUFFIX) ssytrs.$(SUFFIX) stbcon.$(SUFFIX) \ -+ stbrfs.$(SUFFIX) stbtrs.$(SUFFIX) stgevc.$(SUFFIX) stgex2.$(SUFFIX) stgexc.$(SUFFIX) stgsen.$(SUFFIX) \ -+ stgsja.$(SUFFIX) stgsna.$(SUFFIX) stgsy2.$(SUFFIX) stgsyl.$(SUFFIX) stpcon.$(SUFFIX) stprfs.$(SUFFIX) stptri.$(SUFFIX) \ -+ stptrs.$(SUFFIX) \ -+ strcon.$(SUFFIX) strevc.$(SUFFIX) strexc.$(SUFFIX) strrfs.$(SUFFIX) strsen.$(SUFFIX) strsna.$(SUFFIX) strsyl.$(SUFFIX) \ -+ strtrs.$(SUFFIX) stzrqf.$(SUFFIX) stzrzf.$(SUFFIX) sstemr.$(SUFFIX) - - CLASRC = \ -- cbdsqr.o cgbbrd.o cgbcon.o cgbequ.o cgbrfs.o cgbsv.o cgbsvx.o \ -- cgbtf2.o cgbtrf.o cgbtrs.o cgebak.o cgebal.o cgebd2.o cgebrd.o \ -- cgecon.o cgeequ.o cgees.o cgeesx.o cgeev.o cgeevx.o \ -- cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \ -- cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ -- cgeqpf.o cgeqr2.o cgeqrf.o cgerfs.o cgerq2.o cgerqf.o \ -- cgesc2.o cgesdd.o cgesv.o cgesvd.o cgesvx.o cgetc2.o cgetf2.o cgetrf.o \ -- cgetri.o cgetrs.o \ -- cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ -- cgghrd.o cgglse.o cggqrf.o cggrqf.o \ -- cggsvd.o cggsvp.o \ -- cgtcon.o cgtrfs.o cgtsv.o cgtsvx.o cgttrf.o cgttrs.o cgtts2.o chbev.o \ -- chbevd.o chbevx.o chbgst.o chbgv.o chbgvd.o chbgvx.o chbtrd.o \ -- checon.o cheev.o cheevd.o cheevr.o cheevx.o chegs2.o chegst.o \ -- chegv.o chegvd.o chegvx.o cherfs.o chesv.o chesvx.o chetd2.o \ -- chetf2.o chetrd.o \ -- chetrf.o chetri.o chetrs.o chgeqz.o chpcon.o chpev.o chpevd.o \ -- chpevx.o chpgst.o chpgv.o chpgvd.o chpgvx.o chprfs.o chpsv.o \ -- chpsvx.o \ -- chptrd.o chptrf.o chptri.o chptrs.o chsein.o chseqr.o clabrd.o \ -- clacgv.o clacon.o clacn2.o clacp2.o clacpy.o clacrm.o clacrt.o cladiv.o \ -- claed0.o claed7.o claed8.o \ -- claein.o claesy.o claev2.o clags2.o clagtm.o \ -- clahef.o clahqr.o \ -- clahrd.o clahr2.o claic1.o clals0.o clalsa.o clalsd.o clangb.o clange.o clangt.o \ -- clanhb.o clanhe.o \ -- clanhp.o clanhs.o clanht.o clansb.o clansp.o clansy.o clantb.o \ -- clantp.o clantr.o clapll.o clapmt.o clarcm.o claqgb.o claqge.o \ -- claqhb.o claqhe.o claqhp.o claqp2.o claqps.o claqsb.o \ -- claqr0.o claqr1.o claqr2.o claqr3.o claqr4.o claqr5.o \ -- claqsp.o claqsy.o clar1v.o clar2v.o clarf.o clarfb.o clarfg.o clarft.o \ -- clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ -- clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ -- claswp.o clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ -- clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ -- cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ -- cposv.o cposvx.o cpotf2.o cpotrf.o cpotri.o cpotrs.o cppcon.o \ -- cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ -- cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ -- crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ -- cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \ -- cstegr.o cstein.o csteqr.o csycon.o csymv.o \ -- csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o \ -- csytrs.o ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \ -- ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ -- ctprfs.o ctptri.o \ -- ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ -- ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ -- cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ -- cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ -- cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ -- cunmtr.o cupgtr.o cupmtr.o icmax1.o scsum1.o cstemr.o -+ cbdsqr.$(SUFFIX) cgbbrd.$(SUFFIX) cgbcon.$(SUFFIX) cgbequ.$(SUFFIX) cgbrfs.$(SUFFIX) cgbsv.$(SUFFIX) cgbsvx.$(SUFFIX) \ -+ cgbtf2.$(SUFFIX) cgbtrf.$(SUFFIX) cgbtrs.$(SUFFIX) cgebak.$(SUFFIX) cgebal.$(SUFFIX) cgebd2.$(SUFFIX) cgebrd.$(SUFFIX) \ -+ cgecon.$(SUFFIX) cgeequ.$(SUFFIX) cgees.$(SUFFIX) cgeesx.$(SUFFIX) cgeev.$(SUFFIX) cgeevx.$(SUFFIX) \ -+ cgegs.$(SUFFIX) cgegv.$(SUFFIX) cgehd2.$(SUFFIX) cgehrd.$(SUFFIX) cgelq2.$(SUFFIX) cgelqf.$(SUFFIX) \ -+ cgels.$(SUFFIX) cgelsd.$(SUFFIX) cgelss.$(SUFFIX) cgelsx.$(SUFFIX) cgelsy.$(SUFFIX) cgeql2.$(SUFFIX) cgeqlf.$(SUFFIX) cgeqp3.$(SUFFIX) \ -+ cgeqpf.$(SUFFIX) cgeqr2.$(SUFFIX) cgeqrf.$(SUFFIX) cgerfs.$(SUFFIX) cgerq2.$(SUFFIX) cgerqf.$(SUFFIX) \ -+ cgesc2.$(SUFFIX) cgesdd.$(SUFFIX) cgesvd.$(SUFFIX) cgesvx.$(SUFFIX) cgetc2.$(SUFFIX) \ -+ cgetri.$(SUFFIX) \ -+ cggbak.$(SUFFIX) cggbal.$(SUFFIX) cgges.$(SUFFIX) cggesx.$(SUFFIX) cggev.$(SUFFIX) cggevx.$(SUFFIX) cggglm.$(SUFFIX) \ -+ cgghrd.$(SUFFIX) cgglse.$(SUFFIX) cggqrf.$(SUFFIX) cggrqf.$(SUFFIX) \ -+ cggsvd.$(SUFFIX) cggsvp.$(SUFFIX) \ -+ cgtcon.$(SUFFIX) cgtrfs.$(SUFFIX) cgtsv.$(SUFFIX) cgtsvx.$(SUFFIX) cgttrf.$(SUFFIX) cgttrs.$(SUFFIX) cgtts2.$(SUFFIX) chbev.$(SUFFIX) \ -+ chbevd.$(SUFFIX) chbevx.$(SUFFIX) chbgst.$(SUFFIX) chbgv.$(SUFFIX) chbgvd.$(SUFFIX) chbgvx.$(SUFFIX) chbtrd.$(SUFFIX) \ -+ checon.$(SUFFIX) cheev.$(SUFFIX) cheevd.$(SUFFIX) cheevr.$(SUFFIX) cheevx.$(SUFFIX) chegs2.$(SUFFIX) chegst.$(SUFFIX) \ -+ chegv.$(SUFFIX) chegvd.$(SUFFIX) chegvx.$(SUFFIX) cherfs.$(SUFFIX) chesv.$(SUFFIX) chesvx.$(SUFFIX) chetd2.$(SUFFIX) \ -+ chetf2.$(SUFFIX) chetrd.$(SUFFIX) \ -+ chetrf.$(SUFFIX) chetri.$(SUFFIX) chetrs.$(SUFFIX) chgeqz.$(SUFFIX) chpcon.$(SUFFIX) chpev.$(SUFFIX) chpevd.$(SUFFIX) \ -+ chpevx.$(SUFFIX) chpgst.$(SUFFIX) chpgv.$(SUFFIX) chpgvd.$(SUFFIX) chpgvx.$(SUFFIX) chprfs.$(SUFFIX) chpsv.$(SUFFIX) \ -+ chpsvx.$(SUFFIX) \ -+ chptrd.$(SUFFIX) chptrf.$(SUFFIX) chptri.$(SUFFIX) chptrs.$(SUFFIX) chsein.$(SUFFIX) chseqr.$(SUFFIX) clabrd.$(SUFFIX) \ -+ clacgv.$(SUFFIX) clacon.$(SUFFIX) clacn2.$(SUFFIX) clacp2.$(SUFFIX) clacpy.$(SUFFIX) clacrm.$(SUFFIX) clacrt.$(SUFFIX) cladiv.$(SUFFIX) \ -+ claed0.$(SUFFIX) claed7.$(SUFFIX) claed8.$(SUFFIX) \ -+ claein.$(SUFFIX) claesy.$(SUFFIX) claev2.$(SUFFIX) clags2.$(SUFFIX) clagtm.$(SUFFIX) \ -+ clahef.$(SUFFIX) clahqr.$(SUFFIX) \ -+ clahrd.$(SUFFIX) clahr2.$(SUFFIX) claic1.$(SUFFIX) clals0.$(SUFFIX) clalsa.$(SUFFIX) clalsd.$(SUFFIX) clangb.$(SUFFIX) clange.$(SUFFIX) clangt.$(SUFFIX) \ -+ clanhb.$(SUFFIX) clanhe.$(SUFFIX) \ -+ clanhp.$(SUFFIX) clanhs.$(SUFFIX) clanht.$(SUFFIX) clansb.$(SUFFIX) clansp.$(SUFFIX) clansy.$(SUFFIX) clantb.$(SUFFIX) \ -+ clantp.$(SUFFIX) clantr.$(SUFFIX) clapll.$(SUFFIX) clapmt.$(SUFFIX) clarcm.$(SUFFIX) claqgb.$(SUFFIX) claqge.$(SUFFIX) \ -+ claqhb.$(SUFFIX) claqhe.$(SUFFIX) claqhp.$(SUFFIX) claqp2.$(SUFFIX) claqps.$(SUFFIX) claqsb.$(SUFFIX) \ -+ claqr0.$(SUFFIX) claqr1.$(SUFFIX) claqr2.$(SUFFIX) claqr3.$(SUFFIX) claqr4.$(SUFFIX) claqr5.$(SUFFIX) \ -+ claqsp.$(SUFFIX) claqsy.$(SUFFIX) clar1v.$(SUFFIX) clar2v.$(SUFFIX) clarf.$(SUFFIX) clarfb.$(SUFFIX) clarfg.$(SUFFIX) clarft.$(SUFFIX) \ -+ clarfx.$(SUFFIX) clargv.$(SUFFIX) clarnv.$(SUFFIX) clarrv.$(SUFFIX) clartg.$(SUFFIX) clartv.$(SUFFIX) \ -+ clarz.$(SUFFIX) clarzb.$(SUFFIX) clarzt.$(SUFFIX) clascl.$(SUFFIX) claset.$(SUFFIX) clasr.$(SUFFIX) classq.$(SUFFIX) \ -+ clasyf.$(SUFFIX) clatbs.$(SUFFIX) clatdf.$(SUFFIX) clatps.$(SUFFIX) clatrd.$(SUFFIX) clatrs.$(SUFFIX) clatrz.$(SUFFIX) \ -+ clatzm.$(SUFFIX) cpbcon.$(SUFFIX) cpbequ.$(SUFFIX) cpbrfs.$(SUFFIX) cpbstf.$(SUFFIX) cpbsv.$(SUFFIX) \ -+ cpbsvx.$(SUFFIX) cpbtf2.$(SUFFIX) cpbtrf.$(SUFFIX) cpbtrs.$(SUFFIX) cpocon.$(SUFFIX) cpoequ.$(SUFFIX) cporfs.$(SUFFIX) \ -+ cposv.$(SUFFIX) cposvx.$(SUFFIX) cpotrs.$(SUFFIX) cppcon.$(SUFFIX) \ -+ cppequ.$(SUFFIX) cpprfs.$(SUFFIX) cppsv.$(SUFFIX) cppsvx.$(SUFFIX) cpptrf.$(SUFFIX) cpptri.$(SUFFIX) cpptrs.$(SUFFIX) \ -+ cptcon.$(SUFFIX) cpteqr.$(SUFFIX) cptrfs.$(SUFFIX) cptsv.$(SUFFIX) cptsvx.$(SUFFIX) cpttrf.$(SUFFIX) cpttrs.$(SUFFIX) cptts2.$(SUFFIX) \ -+ crot.$(SUFFIX) cspcon.$(SUFFIX) csprfs.$(SUFFIX) cspsv.$(SUFFIX) \ -+ cspsvx.$(SUFFIX) csptrf.$(SUFFIX) csptri.$(SUFFIX) csptrs.$(SUFFIX) csrscl.$(SUFFIX) cstedc.$(SUFFIX) \ -+ cstegr.$(SUFFIX) cstein.$(SUFFIX) csteqr.$(SUFFIX) csycon.$(SUFFIX) \ -+ csyrfs.$(SUFFIX) csysv.$(SUFFIX) csysvx.$(SUFFIX) csytf2.$(SUFFIX) csytrf.$(SUFFIX) csytri.$(SUFFIX) \ -+ csytrs.$(SUFFIX) ctbcon.$(SUFFIX) ctbrfs.$(SUFFIX) ctbtrs.$(SUFFIX) ctgevc.$(SUFFIX) ctgex2.$(SUFFIX) \ -+ ctgexc.$(SUFFIX) ctgsen.$(SUFFIX) ctgsja.$(SUFFIX) ctgsna.$(SUFFIX) ctgsy2.$(SUFFIX) ctgsyl.$(SUFFIX) ctpcon.$(SUFFIX) \ -+ ctprfs.$(SUFFIX) ctptri.$(SUFFIX) \ -+ ctptrs.$(SUFFIX) ctrcon.$(SUFFIX) ctrevc.$(SUFFIX) ctrexc.$(SUFFIX) ctrrfs.$(SUFFIX) ctrsen.$(SUFFIX) ctrsna.$(SUFFIX) \ -+ ctrsyl.$(SUFFIX) ctrtrs.$(SUFFIX) ctzrqf.$(SUFFIX) ctzrzf.$(SUFFIX) cung2l.$(SUFFIX) cung2r.$(SUFFIX) \ -+ cungbr.$(SUFFIX) cunghr.$(SUFFIX) cungl2.$(SUFFIX) cunglq.$(SUFFIX) cungql.$(SUFFIX) cungqr.$(SUFFIX) cungr2.$(SUFFIX) \ -+ cungrq.$(SUFFIX) cungtr.$(SUFFIX) cunm2l.$(SUFFIX) cunm2r.$(SUFFIX) cunmbr.$(SUFFIX) cunmhr.$(SUFFIX) cunml2.$(SUFFIX) \ -+ cunmlq.$(SUFFIX) cunmql.$(SUFFIX) cunmqr.$(SUFFIX) cunmr2.$(SUFFIX) cunmr3.$(SUFFIX) cunmrq.$(SUFFIX) cunmrz.$(SUFFIX) \ -+ cunmtr.$(SUFFIX) cupgtr.$(SUFFIX) cupmtr.$(SUFFIX) icmax1.$(SUFFIX) scsum1.$(SUFFIX) cstemr.$(SUFFIX) - - DLASRC = \ -- dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ -- dgbsvx.o dgbtf2.o dgbtrf.o dgbtrs.o dgebak.o dgebal.o dgebd2.o \ -- dgebrd.o dgecon.o dgeequ.o dgees.o dgeesx.o dgeev.o dgeevx.o \ -- dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \ -- dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ -- dgeqp3.o dgeqpf.o dgeqr2.o dgeqrf.o dgerfs.o dgerq2.o dgerqf.o \ -- dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o dgetc2.o dgetf2.o \ -- dgetrf.o dgetri.o \ -- dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ -- dggglm.o dgghrd.o dgglse.o dggqrf.o \ -- dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ -- dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ -- dhsein.o dhseqr.o dlabrd.o dlacon.o dlacn2.o \ -- dlaein.o dlaexc.o dlag2.o dlags2.o dlagtm.o dlagv2.o dlahqr.o \ -- dlahrd.o dlahr2.o dlaic1.o dlaln2.o dlals0.o dlalsa.o dlalsd.o \ -- dlangb.o dlange.o dlangt.o dlanhs.o dlansb.o dlansp.o \ -- dlansy.o dlantb.o dlantp.o dlantr.o dlanv2.o \ -- dlapll.o dlapmt.o \ -- dlaqgb.o dlaqge.o dlaqp2.o dlaqps.o dlaqsb.o dlaqsp.o dlaqsy.o \ -- dlaqr0.o dlaqr1.o dlaqr2.o dlaqr3.o dlaqr4.o dlaqr5.o \ -- dlaqtr.o dlar1v.o dlar2v.o \ -- dlarf.o dlarfb.o dlarfg.o dlarft.o dlarfx.o dlargv.o \ -- dlarrv.o dlartv.o \ -- dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o \ -- dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ -- dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ -- dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ -- dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ -- dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ -- dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ -- dpbstf.o dpbsv.o dpbsvx.o \ -- dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ -- dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dppcon.o dppequ.o \ -- dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ -- dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ -- dsbev.o dsbevd.o dsbevx.o dsbgst.o dsbgv.o dsbgvd.o dsbgvx.o \ -- dsbtrd.o dspcon.o dspev.o dspevd.o dspevx.o dspgst.o \ -- dspgv.o dspgvd.o dspgvx.o dsprfs.o dspsv.o dspsvx.o dsptrd.o \ -- dsptrf.o dsptri.o dsptrs.o dstegr.o dstein.o dstev.o dstevd.o dstevr.o \ -- dstevx.o dsycon.o dsyev.o dsyevd.o dsyevr.o \ -- dsyevx.o dsygs2.o dsygst.o dsygv.o dsygvd.o dsygvx.o dsyrfs.o \ -- dsysv.o dsysvx.o \ -- dsytd2.o dsytf2.o dsytrd.o dsytrf.o dsytri.o dsytrs.o dtbcon.o \ -- dtbrfs.o dtbtrs.o dtgevc.o dtgex2.o dtgexc.o dtgsen.o \ -- dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ -- dtptrs.o \ -- dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ -- dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ -- dsgesv.o dlag2s.o slag2d.o -+ dgbbrd.$(SUFFIX) dgbcon.$(SUFFIX) dgbequ.$(SUFFIX) dgbrfs.$(SUFFIX) dgbsv.$(SUFFIX) \ -+ dgbsvx.$(SUFFIX) dgbtf2.$(SUFFIX) dgbtrf.$(SUFFIX) dgbtrs.$(SUFFIX) dgebak.$(SUFFIX) dgebal.$(SUFFIX) dgebd2.$(SUFFIX) \ -+ dgebrd.$(SUFFIX) dgecon.$(SUFFIX) dgeequ.$(SUFFIX) dgees.$(SUFFIX) dgeesx.$(SUFFIX) dgeev.$(SUFFIX) dgeevx.$(SUFFIX) \ -+ dgegs.$(SUFFIX) dgegv.$(SUFFIX) dgehd2.$(SUFFIX) dgehrd.$(SUFFIX) dgelq2.$(SUFFIX) dgelqf.$(SUFFIX) \ -+ dgels.$(SUFFIX) dgelsd.$(SUFFIX) dgelss.$(SUFFIX) dgelsx.$(SUFFIX) dgelsy.$(SUFFIX) dgeql2.$(SUFFIX) dgeqlf.$(SUFFIX) \ -+ dgeqp3.$(SUFFIX) dgeqpf.$(SUFFIX) dgeqr2.$(SUFFIX) dgeqrf.$(SUFFIX) dgerfs.$(SUFFIX) dgerq2.$(SUFFIX) dgerqf.$(SUFFIX) \ -+ dgesc2.$(SUFFIX) dgesdd.$(SUFFIX) dgesvd.$(SUFFIX) dgesvx.$(SUFFIX) dgetc2.$(SUFFIX) \ -+ dgetri.$(SUFFIX) \ -+ dggbak.$(SUFFIX) dggbal.$(SUFFIX) dgges.$(SUFFIX) dggesx.$(SUFFIX) dggev.$(SUFFIX) dggevx.$(SUFFIX) \ -+ dggglm.$(SUFFIX) dgghrd.$(SUFFIX) dgglse.$(SUFFIX) dggqrf.$(SUFFIX) \ -+ dggrqf.$(SUFFIX) dggsvd.$(SUFFIX) dggsvp.$(SUFFIX) dgtcon.$(SUFFIX) dgtrfs.$(SUFFIX) dgtsv.$(SUFFIX) \ -+ dgtsvx.$(SUFFIX) dgttrf.$(SUFFIX) dgttrs.$(SUFFIX) dgtts2.$(SUFFIX) dhgeqz.$(SUFFIX) \ -+ dhsein.$(SUFFIX) dhseqr.$(SUFFIX) dlabrd.$(SUFFIX) dlacon.$(SUFFIX) dlacn2.$(SUFFIX) \ -+ dlaein.$(SUFFIX) dlaexc.$(SUFFIX) dlag2.$(SUFFIX) dlags2.$(SUFFIX) dlagtm.$(SUFFIX) dlagv2.$(SUFFIX) dlahqr.$(SUFFIX) \ -+ dlahrd.$(SUFFIX) dlahr2.$(SUFFIX) dlaic1.$(SUFFIX) dlaln2.$(SUFFIX) dlals0.$(SUFFIX) dlalsa.$(SUFFIX) dlalsd.$(SUFFIX) \ -+ dlangb.$(SUFFIX) dlange.$(SUFFIX) dlangt.$(SUFFIX) dlanhs.$(SUFFIX) dlansb.$(SUFFIX) dlansp.$(SUFFIX) \ -+ dlansy.$(SUFFIX) dlantb.$(SUFFIX) dlantp.$(SUFFIX) dlantr.$(SUFFIX) dlanv2.$(SUFFIX) \ -+ dlapll.$(SUFFIX) dlapmt.$(SUFFIX) \ -+ dlaqgb.$(SUFFIX) dlaqge.$(SUFFIX) dlaqp2.$(SUFFIX) dlaqps.$(SUFFIX) dlaqsb.$(SUFFIX) dlaqsp.$(SUFFIX) dlaqsy.$(SUFFIX) \ -+ dlaqr0.$(SUFFIX) dlaqr1.$(SUFFIX) dlaqr2.$(SUFFIX) dlaqr3.$(SUFFIX) dlaqr4.$(SUFFIX) dlaqr5.$(SUFFIX) \ -+ dlaqtr.$(SUFFIX) dlar1v.$(SUFFIX) dlar2v.$(SUFFIX) \ -+ dlarf.$(SUFFIX) dlarfb.$(SUFFIX) dlarfg.$(SUFFIX) dlarft.$(SUFFIX) dlarfx.$(SUFFIX) dlargv.$(SUFFIX) \ -+ dlarrv.$(SUFFIX) dlartv.$(SUFFIX) \ -+ dlarz.$(SUFFIX) dlarzb.$(SUFFIX) dlarzt.$(SUFFIX) dlasy2.$(SUFFIX) dlasyf.$(SUFFIX) \ -+ dlatbs.$(SUFFIX) dlatdf.$(SUFFIX) dlatps.$(SUFFIX) dlatrd.$(SUFFIX) dlatrs.$(SUFFIX) dlatrz.$(SUFFIX) dlatzm.$(SUFFIX) \ -+ dopgtr.$(SUFFIX) dopmtr.$(SUFFIX) dorg2l.$(SUFFIX) dorg2r.$(SUFFIX) \ -+ dorgbr.$(SUFFIX) dorghr.$(SUFFIX) dorgl2.$(SUFFIX) dorglq.$(SUFFIX) dorgql.$(SUFFIX) dorgqr.$(SUFFIX) dorgr2.$(SUFFIX) \ -+ dorgrq.$(SUFFIX) dorgtr.$(SUFFIX) dorm2l.$(SUFFIX) dorm2r.$(SUFFIX) \ -+ dormbr.$(SUFFIX) dormhr.$(SUFFIX) dorml2.$(SUFFIX) dormlq.$(SUFFIX) dormql.$(SUFFIX) dormqr.$(SUFFIX) dormr2.$(SUFFIX) \ -+ dormr3.$(SUFFIX) dormrq.$(SUFFIX) dormrz.$(SUFFIX) dormtr.$(SUFFIX) dpbcon.$(SUFFIX) dpbequ.$(SUFFIX) dpbrfs.$(SUFFIX) \ -+ dpbstf.$(SUFFIX) dpbsv.$(SUFFIX) dpbsvx.$(SUFFIX) \ -+ dpbtf2.$(SUFFIX) dpbtrf.$(SUFFIX) dpbtrs.$(SUFFIX) dpocon.$(SUFFIX) dpoequ.$(SUFFIX) dporfs.$(SUFFIX) dposv.$(SUFFIX) \ -+ dposvx.$(SUFFIX) dpotrs.$(SUFFIX) dppcon.$(SUFFIX) dppequ.$(SUFFIX) \ -+ dpprfs.$(SUFFIX) dppsv.$(SUFFIX) dppsvx.$(SUFFIX) dpptrf.$(SUFFIX) dpptri.$(SUFFIX) dpptrs.$(SUFFIX) dptcon.$(SUFFIX) \ -+ dpteqr.$(SUFFIX) dptrfs.$(SUFFIX) dptsv.$(SUFFIX) dptsvx.$(SUFFIX) dpttrs.$(SUFFIX) dptts2.$(SUFFIX) drscl.$(SUFFIX) \ -+ dsbev.$(SUFFIX) dsbevd.$(SUFFIX) dsbevx.$(SUFFIX) dsbgst.$(SUFFIX) dsbgv.$(SUFFIX) dsbgvd.$(SUFFIX) dsbgvx.$(SUFFIX) \ -+ dsbtrd.$(SUFFIX) dspcon.$(SUFFIX) dspev.$(SUFFIX) dspevd.$(SUFFIX) dspevx.$(SUFFIX) dspgst.$(SUFFIX) \ -+ dspgv.$(SUFFIX) dspgvd.$(SUFFIX) dspgvx.$(SUFFIX) dsprfs.$(SUFFIX) dspsv.$(SUFFIX) dspsvx.$(SUFFIX) dsptrd.$(SUFFIX) \ -+ dsptrf.$(SUFFIX) dsptri.$(SUFFIX) dsptrs.$(SUFFIX) dstegr.$(SUFFIX) dstein.$(SUFFIX) dstev.$(SUFFIX) dstevd.$(SUFFIX) dstevr.$(SUFFIX) \ -+ dstevx.$(SUFFIX) dsycon.$(SUFFIX) dsyev.$(SUFFIX) dsyevd.$(SUFFIX) dsyevr.$(SUFFIX) \ -+ dsyevx.$(SUFFIX) dsygs2.$(SUFFIX) dsygst.$(SUFFIX) dsygv.$(SUFFIX) dsygvd.$(SUFFIX) dsygvx.$(SUFFIX) dsyrfs.$(SUFFIX) \ -+ dsysv.$(SUFFIX) dsysvx.$(SUFFIX) \ -+ dsytd2.$(SUFFIX) dsytf2.$(SUFFIX) dsytrd.$(SUFFIX) dsytrf.$(SUFFIX) dsytri.$(SUFFIX) dsytrs.$(SUFFIX) dtbcon.$(SUFFIX) \ -+ dtbrfs.$(SUFFIX) dtbtrs.$(SUFFIX) dtgevc.$(SUFFIX) dtgex2.$(SUFFIX) dtgexc.$(SUFFIX) dtgsen.$(SUFFIX) \ -+ dtgsja.$(SUFFIX) dtgsna.$(SUFFIX) dtgsy2.$(SUFFIX) dtgsyl.$(SUFFIX) dtpcon.$(SUFFIX) dtprfs.$(SUFFIX) dtptri.$(SUFFIX) \ -+ dtptrs.$(SUFFIX) \ -+ dtrcon.$(SUFFIX) dtrevc.$(SUFFIX) dtrexc.$(SUFFIX) dtrrfs.$(SUFFIX) dtrsen.$(SUFFIX) dtrsna.$(SUFFIX) dtrsyl.$(SUFFIX) \ -+ dtrtrs.$(SUFFIX) dtzrqf.$(SUFFIX) dtzrzf.$(SUFFIX) dstemr.$(SUFFIX) \ -+ dsgesv.$(SUFFIX) dlag2s.$(SUFFIX) slag2d.$(SUFFIX) - - ZLASRC = \ -- zbdsqr.o zgbbrd.o zgbcon.o zgbequ.o zgbrfs.o zgbsv.o zgbsvx.o \ -- zgbtf2.o zgbtrf.o zgbtrs.o zgebak.o zgebal.o zgebd2.o zgebrd.o \ -- zgecon.o zgeequ.o zgees.o zgeesx.o zgeev.o zgeevx.o \ -- zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ -- zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ -- zgeqpf.o zgeqr2.o zgeqrf.o zgerfs.o zgerq2.o zgerqf.o \ -- zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ -- zgetri.o zgetrs.o \ -- zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ -- zgghrd.o zgglse.o zggqrf.o zggrqf.o \ -- zggsvd.o zggsvp.o \ -- zgtcon.o zgtrfs.o zgtsv.o zgtsvx.o zgttrf.o zgttrs.o zgtts2.o zhbev.o \ -- zhbevd.o zhbevx.o zhbgst.o zhbgv.o zhbgvd.o zhbgvx.o zhbtrd.o \ -- zhecon.o zheev.o zheevd.o zheevr.o zheevx.o zhegs2.o zhegst.o \ -- zhegv.o zhegvd.o zhegvx.o zherfs.o zhesv.o zhesvx.o zhetd2.o \ -- zhetf2.o zhetrd.o \ -- zhetrf.o zhetri.o zhetrs.o zhgeqz.o zhpcon.o zhpev.o zhpevd.o \ -- zhpevx.o zhpgst.o zhpgv.o zhpgvd.o zhpgvx.o zhprfs.o zhpsv.o \ -- zhpsvx.o \ -- zhptrd.o zhptrf.o zhptri.o zhptrs.o zhsein.o zhseqr.o zlabrd.o \ -- zlacgv.o zlacon.o zlacn2.o zlacp2.o zlacpy.o zlacrm.o zlacrt.o zladiv.o \ -- zlaed0.o zlaed7.o zlaed8.o \ -- zlaein.o zlaesy.o zlaev2.o zlags2.o zlagtm.o \ -- zlahef.o zlahqr.o \ -- zlahrd.o zlahr2.o zlaic1.o zlals0.o zlalsa.o zlalsd.o zlangb.o zlange.o \ -- zlangt.o zlanhb.o \ -- zlanhe.o \ -- zlanhp.o zlanhs.o zlanht.o zlansb.o zlansp.o zlansy.o zlantb.o \ -- zlantp.o zlantr.o zlapll.o zlapmt.o zlaqgb.o zlaqge.o \ -- zlaqhb.o zlaqhe.o zlaqhp.o zlaqp2.o zlaqps.o zlaqsb.o \ -- zlaqr0.o zlaqr1.o zlaqr2.o zlaqr3.o zlaqr4.o zlaqr5.o \ -- zlaqsp.o zlaqsy.o zlar1v.o zlar2v.o zlarcm.o zlarf.o zlarfb.o \ -- zlarfg.o zlarft.o \ -- zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ -- zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ -- zlassq.o zlaswp.o zlasyf.o \ -- zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ -- zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ -- zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ -- zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zppcon.o \ -- zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ -- zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ -- zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ -- zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \ -- zstegr.o zstein.o zsteqr.o zsycon.o zsymv.o \ -- zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o \ -- zsytrs.o ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \ -- ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ -- ztprfs.o ztptri.o \ -- ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ -- ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ -- zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ -- zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ -- zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ -- zunmtr.o zupgtr.o \ -- zupmtr.o izmax1.o dzsum1.o zstemr.o \ -- zcgesv.o zlag2c.o clag2z.o -+ zbdsqr.$(SUFFIX) zgbbrd.$(SUFFIX) zgbcon.$(SUFFIX) zgbequ.$(SUFFIX) zgbrfs.$(SUFFIX) zgbsv.$(SUFFIX) zgbsvx.$(SUFFIX) \ -+ zgbtf2.$(SUFFIX) zgbtrf.$(SUFFIX) zgbtrs.$(SUFFIX) zgebak.$(SUFFIX) zgebal.$(SUFFIX) zgebd2.$(SUFFIX) zgebrd.$(SUFFIX) \ -+ zgecon.$(SUFFIX) zgeequ.$(SUFFIX) zgees.$(SUFFIX) zgeesx.$(SUFFIX) zgeev.$(SUFFIX) zgeevx.$(SUFFIX) \ -+ zgegs.$(SUFFIX) zgegv.$(SUFFIX) zgehd2.$(SUFFIX) zgehrd.$(SUFFIX) zgelq2.$(SUFFIX) zgelqf.$(SUFFIX) \ -+ zgels.$(SUFFIX) zgelsd.$(SUFFIX) zgelss.$(SUFFIX) zgelsx.$(SUFFIX) zgelsy.$(SUFFIX) zgeql2.$(SUFFIX) zgeqlf.$(SUFFIX) zgeqp3.$(SUFFIX) \ -+ zgeqpf.$(SUFFIX) zgeqr2.$(SUFFIX) zgeqrf.$(SUFFIX) zgerfs.$(SUFFIX) zgerq2.$(SUFFIX) zgerqf.$(SUFFIX) \ -+ zgesc2.$(SUFFIX) zgesdd.$(SUFFIX) zgesvd.$(SUFFIX) zgesvx.$(SUFFIX) zgetc2.$(SUFFIX) \ -+ zgetri.$(SUFFIX) \ -+ zggbak.$(SUFFIX) zggbal.$(SUFFIX) zgges.$(SUFFIX) zggesx.$(SUFFIX) zggev.$(SUFFIX) zggevx.$(SUFFIX) zggglm.$(SUFFIX) \ -+ zgghrd.$(SUFFIX) zgglse.$(SUFFIX) zggqrf.$(SUFFIX) zggrqf.$(SUFFIX) \ -+ zggsvd.$(SUFFIX) zggsvp.$(SUFFIX) \ -+ zgtcon.$(SUFFIX) zgtrfs.$(SUFFIX) zgtsv.$(SUFFIX) zgtsvx.$(SUFFIX) zgttrf.$(SUFFIX) zgttrs.$(SUFFIX) zgtts2.$(SUFFIX) zhbev.$(SUFFIX) \ -+ zhbevd.$(SUFFIX) zhbevx.$(SUFFIX) zhbgst.$(SUFFIX) zhbgv.$(SUFFIX) zhbgvd.$(SUFFIX) zhbgvx.$(SUFFIX) zhbtrd.$(SUFFIX) \ -+ zhecon.$(SUFFIX) zheev.$(SUFFIX) zheevd.$(SUFFIX) zheevr.$(SUFFIX) zheevx.$(SUFFIX) zhegs2.$(SUFFIX) zhegst.$(SUFFIX) \ -+ zhegv.$(SUFFIX) zhegvd.$(SUFFIX) zhegvx.$(SUFFIX) zherfs.$(SUFFIX) zhesv.$(SUFFIX) zhesvx.$(SUFFIX) zhetd2.$(SUFFIX) \ -+ zhetf2.$(SUFFIX) zhetrd.$(SUFFIX) \ -+ zhetrf.$(SUFFIX) zhetri.$(SUFFIX) zhetrs.$(SUFFIX) zhgeqz.$(SUFFIX) zhpcon.$(SUFFIX) zhpev.$(SUFFIX) zhpevd.$(SUFFIX) \ -+ zhpevx.$(SUFFIX) zhpgst.$(SUFFIX) zhpgv.$(SUFFIX) zhpgvd.$(SUFFIX) zhpgvx.$(SUFFIX) zhprfs.$(SUFFIX) zhpsv.$(SUFFIX) \ -+ zhpsvx.$(SUFFIX) \ -+ zhptrd.$(SUFFIX) zhptrf.$(SUFFIX) zhptri.$(SUFFIX) zhptrs.$(SUFFIX) zhsein.$(SUFFIX) zhseqr.$(SUFFIX) zlabrd.$(SUFFIX) \ -+ zlacgv.$(SUFFIX) zlacon.$(SUFFIX) zlacn2.$(SUFFIX) zlacp2.$(SUFFIX) zlacpy.$(SUFFIX) zlacrm.$(SUFFIX) zlacrt.$(SUFFIX) zladiv.$(SUFFIX) \ -+ zlaed0.$(SUFFIX) zlaed7.$(SUFFIX) zlaed8.$(SUFFIX) \ -+ zlaein.$(SUFFIX) zlaesy.$(SUFFIX) zlaev2.$(SUFFIX) zlags2.$(SUFFIX) zlagtm.$(SUFFIX) \ -+ zlahef.$(SUFFIX) zlahqr.$(SUFFIX) \ -+ zlahrd.$(SUFFIX) zlahr2.$(SUFFIX) zlaic1.$(SUFFIX) zlals0.$(SUFFIX) zlalsa.$(SUFFIX) zlalsd.$(SUFFIX) zlangb.$(SUFFIX) zlange.$(SUFFIX) \ -+ zlangt.$(SUFFIX) zlanhb.$(SUFFIX) \ -+ zlanhe.$(SUFFIX) \ -+ zlanhp.$(SUFFIX) zlanhs.$(SUFFIX) zlanht.$(SUFFIX) zlansb.$(SUFFIX) zlansp.$(SUFFIX) zlansy.$(SUFFIX) zlantb.$(SUFFIX) \ -+ zlantp.$(SUFFIX) zlantr.$(SUFFIX) zlapll.$(SUFFIX) zlapmt.$(SUFFIX) zlaqgb.$(SUFFIX) zlaqge.$(SUFFIX) \ -+ zlaqhb.$(SUFFIX) zlaqhe.$(SUFFIX) zlaqhp.$(SUFFIX) zlaqp2.$(SUFFIX) zlaqps.$(SUFFIX) zlaqsb.$(SUFFIX) \ -+ zlaqr0.$(SUFFIX) zlaqr1.$(SUFFIX) zlaqr2.$(SUFFIX) zlaqr3.$(SUFFIX) zlaqr4.$(SUFFIX) zlaqr5.$(SUFFIX) \ -+ zlaqsp.$(SUFFIX) zlaqsy.$(SUFFIX) zlar1v.$(SUFFIX) zlar2v.$(SUFFIX) zlarcm.$(SUFFIX) zlarf.$(SUFFIX) zlarfb.$(SUFFIX) \ -+ zlarfg.$(SUFFIX) zlarft.$(SUFFIX) \ -+ zlarfx.$(SUFFIX) zlargv.$(SUFFIX) zlarnv.$(SUFFIX) zlarrv.$(SUFFIX) zlartg.$(SUFFIX) zlartv.$(SUFFIX) \ -+ zlarz.$(SUFFIX) zlarzb.$(SUFFIX) zlarzt.$(SUFFIX) zlascl.$(SUFFIX) zlaset.$(SUFFIX) zlasr.$(SUFFIX) \ -+ zlassq.$(SUFFIX) zlasyf.$(SUFFIX) \ -+ zlatbs.$(SUFFIX) zlatdf.$(SUFFIX) zlatps.$(SUFFIX) zlatrd.$(SUFFIX) zlatrs.$(SUFFIX) zlatrz.$(SUFFIX) zlatzm.$(SUFFIX) \ -+ zpbcon.$(SUFFIX) zpbequ.$(SUFFIX) zpbrfs.$(SUFFIX) zpbstf.$(SUFFIX) zpbsv.$(SUFFIX) \ -+ zpbsvx.$(SUFFIX) zpbtf2.$(SUFFIX) zpbtrf.$(SUFFIX) zpbtrs.$(SUFFIX) zpocon.$(SUFFIX) zpoequ.$(SUFFIX) zporfs.$(SUFFIX) \ -+ zposv.$(SUFFIX) zposvx.$(SUFFIX) zpotrs.$(SUFFIX) zppcon.$(SUFFIX) \ -+ zppequ.$(SUFFIX) zpprfs.$(SUFFIX) zppsv.$(SUFFIX) zppsvx.$(SUFFIX) zpptrf.$(SUFFIX) zpptri.$(SUFFIX) zpptrs.$(SUFFIX) \ -+ zptcon.$(SUFFIX) zpteqr.$(SUFFIX) zptrfs.$(SUFFIX) zptsv.$(SUFFIX) zptsvx.$(SUFFIX) zpttrf.$(SUFFIX) zpttrs.$(SUFFIX) zptts2.$(SUFFIX) \ -+ zrot.$(SUFFIX) zspcon.$(SUFFIX) zsprfs.$(SUFFIX) zspsv.$(SUFFIX) \ -+ zspsvx.$(SUFFIX) zsptrf.$(SUFFIX) zsptri.$(SUFFIX) zsptrs.$(SUFFIX) zdrscl.$(SUFFIX) zstedc.$(SUFFIX) \ -+ zstegr.$(SUFFIX) zstein.$(SUFFIX) zsteqr.$(SUFFIX) zsycon.$(SUFFIX) \ -+ zsyrfs.$(SUFFIX) zsysv.$(SUFFIX) zsysvx.$(SUFFIX) zsytf2.$(SUFFIX) zsytrf.$(SUFFIX) zsytri.$(SUFFIX) \ -+ zsytrs.$(SUFFIX) ztbcon.$(SUFFIX) ztbrfs.$(SUFFIX) ztbtrs.$(SUFFIX) ztgevc.$(SUFFIX) ztgex2.$(SUFFIX) \ -+ ztgexc.$(SUFFIX) ztgsen.$(SUFFIX) ztgsja.$(SUFFIX) ztgsna.$(SUFFIX) ztgsy2.$(SUFFIX) ztgsyl.$(SUFFIX) ztpcon.$(SUFFIX) \ -+ ztprfs.$(SUFFIX) ztptri.$(SUFFIX) \ -+ ztptrs.$(SUFFIX) ztrcon.$(SUFFIX) ztrevc.$(SUFFIX) ztrexc.$(SUFFIX) ztrrfs.$(SUFFIX) ztrsen.$(SUFFIX) ztrsna.$(SUFFIX) \ -+ ztrsyl.$(SUFFIX) ztrtrs.$(SUFFIX) ztzrqf.$(SUFFIX) ztzrzf.$(SUFFIX) zung2l.$(SUFFIX) \ -+ zung2r.$(SUFFIX) zungbr.$(SUFFIX) zunghr.$(SUFFIX) zungl2.$(SUFFIX) zunglq.$(SUFFIX) zungql.$(SUFFIX) zungqr.$(SUFFIX) zungr2.$(SUFFIX) \ -+ zungrq.$(SUFFIX) zungtr.$(SUFFIX) zunm2l.$(SUFFIX) zunm2r.$(SUFFIX) zunmbr.$(SUFFIX) zunmhr.$(SUFFIX) zunml2.$(SUFFIX) \ -+ zunmlq.$(SUFFIX) zunmql.$(SUFFIX) zunmqr.$(SUFFIX) zunmr2.$(SUFFIX) zunmr3.$(SUFFIX) zunmrq.$(SUFFIX) zunmrz.$(SUFFIX) \ -+ zunmtr.$(SUFFIX) zupgtr.$(SUFFIX) \ -+ zupmtr.$(SUFFIX) izmax1.$(SUFFIX) dzsum1.$(SUFFIX) zstemr.$(SUFFIX) \ -+ zcgesv.$(SUFFIX) zlag2c.$(SUFFIX) clag2z.$(SUFFIX) - - all: ../$(LAPACKLIB) - -+lapack_prof: ../$(LAPACKLIB_P) -+ - ALLOBJ=$(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) \ - $(ALLAUX) - -+ALLOBJ_P = $(ALLOBJ:.$(SUFFIX)=.$(PSUFFIX)) -+ - ../$(LAPACKLIB): $(ALLOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) - $(RANLIB) $@ - -+../$(LAPACKLIB_P): $(ALLOBJ_P) -+ $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ_P) -+ $(RANLIB) $@ -+ - single: $(SLASRC) $(ALLAUX) $(SCLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \ - $(SCLAUX) -@@ -317,6 +325,7 @@ - $(DZLAUX) - $(RANLIB) ../$(LAPACKLIB) - -+ - $(ALLAUX): $(FRC) - $(SCLAUX): $(FRC) - $(DZLAUX): $(FRC) -@@ -329,11 +338,16 @@ - @FRC=$(FRC) - - clean: -- rm -f *.o -+ rm -f *.$(SUFFIX) *.$(PSUFFIX) - --.f.o: -+%.$(SUFFIX): %.f - $(FORTRAN) $(OPTS) -c $< -o $@ - --slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ -+%.$(PSUFFIX): %.f -+ $(FORTRAN) $(POPTS) -c $< -o $@ -+ -+slaruv.$(SUFFIX): slaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dlaruv.$(SUFFIX): dlaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ - -+slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -diff -ruN lapack-3.1.1.old/TESTING/EIG/Makefile lapack-3.1.1/TESTING/EIG/Makefile ---- lapack-3.1.1.old/TESTING/EIG/Makefile 2007-02-20 15:33:03.000000000 -0600 -+++ lapack-3.1.1/TESTING/EIG/Makefile 2009-12-16 14:40:35.000000000 -0600 -@@ -78,7 +78,7 @@ - cget35.o cget36.o cget37.o cget38.o cget51.o cget52.o \ - cget54.o cglmts.o cgqrts.o cgrqts.o cgsvts.o \ - chbt21.o chet21.o chet22.o chpt21.o chst01.o \ -- clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o csbmv.o \ -+ clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o \ - csgt01.o cslect.o \ - cstt21.o cstt22.o cunt01.o cunt03.o - -@@ -115,7 +115,7 @@ - zget35.o zget36.o zget37.o zget38.o zget51.o zget52.o \ - zget54.o zglmts.o zgqrts.o zgrqts.o zgsvts.o \ - zhbt21.o zhet21.o zhet22.o zhpt21.o zhst01.o \ -- zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o zsbmv.o \ -+ zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o \ - zsgt01.o zslect.o \ - zstt21.o zstt22.o zunt01.o zunt03.o - -@@ -129,22 +129,22 @@ - ../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ; \ - $(LOADER) $(LOADOPTS) -o $@ \ - $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) - - ../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ; \ - $(LOADER) $(LOADOPTS) -o $@ \ - $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) - - ../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ; \ - $(LOADER) $(LOADOPTS) -o $@ \ - $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) - - ../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ; \ - $(LOADER) $(LOADOPTS) -o $@ \ - $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) - - $(AEIGTST): $(FRC) - $(SCIGTST): $(FRC) -diff -ruN lapack-3.1.1.old/TESTING/LIN/Makefile lapack-3.1.1/TESTING/LIN/Makefile ---- lapack-3.1.1.old/TESTING/LIN/Makefile 2007-02-20 15:33:03.000000000 -0600 -+++ lapack-3.1.1/TESTING/LIN/Makefile 2009-12-16 14:40:35.000000000 -0600 -@@ -97,7 +97,7 @@ - cqpt01.o cqrt01.o cqrt02.o cqrt03.o cqrt11.o \ - cqrt12.o cqrt13.o cqrt14.o cqrt15.o cqrt16.o \ - cqrt17.o crqt01.o crqt02.o crqt03.o crzt01.o crzt02.o \ -- csbmv.o cspt01.o \ -+ cspt01.o \ - cspt02.o cspt03.o csyt01.o csyt02.o csyt03.o \ - ctbt02.o ctbt03.o ctbt05.o ctbt06.o ctpt01.o \ - ctpt02.o ctpt03.o ctpt05.o ctpt06.o ctrt01.o \ -@@ -159,7 +159,7 @@ - zqpt01.o zqrt01.o zqrt02.o zqrt03.o zqrt11.o \ - zqrt12.o zqrt13.o zqrt14.o zqrt15.o zqrt16.o \ - zqrt17.o zrqt01.o zrqt02.o zrqt03.o zrzt01.o zrzt02.o \ -- zsbmv.o zspt01.o \ -+ zspt01.o \ - zspt02.o zspt03.o zsyt01.o zsyt02.o zsyt03.o \ - ztbt02.o ztbt03.o ztbt05.o ztbt06.o ztpt01.o \ - ztpt02.o ztpt03.o ztpt05.o ztpt06.o ztrt01.o \ -@@ -176,7 +176,7 @@ - zdrvab.o zerrab.o zget08.o \ - alaerh.o alahd.o aladhd.o alareq.o \ - chkxer.o zget02.o zlarhs.o zlatb4.o \ -- zsbmv.o xerbla.o -+ xerbla.o - - all: single double complex complex16 proto-double proto-complex16 - -@@ -190,27 +190,27 @@ - - ../xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) - $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(DLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) - $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintstds : $(DSLINTST) - $(LOADER) $(LOADOPTS) $(DSLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintstzc : $(ZCLINTST) - $(LOADER) $(LOADOPTS) $(ZCLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - $(ALINTST): $(FRC) - $(SCLNTST): $(FRC) diff --git a/patch.for_lapack-3.4.0 b/patch.for_lapack-3.4.0 deleted file mode 100644 index a3dc9b8a9..000000000 --- a/patch.for_lapack-3.4.0 +++ /dev/null @@ -1,2956 +0,0 @@ -diff -ruN lapack-3.4.0.old/INSTALL/Makefile lapack-3.4.0/INSTALL/Makefile ---- lapack-3.4.0.old/INSTALL/Makefile 2011-10-01 10:37:03.000000000 +0800 -+++ lapack-3.4.0/INSTALL/Makefile 2011-11-28 12:36:12.934827991 +0800 -@@ -27,7 +27,7 @@ - $(LOADER) $(LOADOPTS) -o testversion ilaver.o LAPACK_version.o - - clean: -- rm -f *.o -+ rm -f *.o test* - .f.o: - $(FORTRAN) $(OPTS) -c $< -o $@ - -diff -ruN lapack-3.4.0.old/Makefile lapack-3.4.0/Makefile ---- lapack-3.4.0.old/Makefile 2011-11-12 05:08:04.000000000 +0800 -+++ lapack-3.4.0/Makefile 2011-11-28 11:00:23.084828003 +0800 -@@ -20,9 +20,12 @@ - blaslib: - ( cd BLAS/SRC; $(MAKE) ) - --lapacklib: lapack_install -+lapacklib: - ( cd SRC; $(MAKE) ) - -+lapack_prof: -+ ( cd SRC; $(MAKE) lapack_prof) -+ - variants: - ( cd SRC/VARIANTS ; $(MAKE)) - - -diff -ruN lapack-3.4.0.old/SRC/Makefile lapack-3.4.0/SRC/Makefile ---- lapack-3.4.0.old/SRC/Makefile 2011-10-04 10:58:05.000000000 +0800 -+++ lapack-3.4.0/SRC/Makefile 2011-11-28 14:39:35.394827997 +0800 -@@ -54,356 +54,364 @@ - # - ####################################################################### - --ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \ -- ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ -- ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o -+ALLAUX = ilaenv.$(SUFFIX) ieeeck.$(SUFFIX) lsamen.$(SUFFIX) xerbla_array.$(SUFFIX) iparmq.$(SUFFIX) \ -+ ilaprec.$(SUFFIX) ilatrans.$(SUFFIX) ilauplo.$(SUFFIX) iladiag.$(SUFFIX) chla_transtype.$(SUFFIX) \ -+ ../INSTALL/ilaver.$(SUFFIX) - - SCLAUX = \ -- sbdsdc.o \ -- sbdsqr.o sdisna.o slabad.o slacpy.o sladiv.o slae2.o slaebz.o \ -- slaed0.o slaed1.o slaed2.o slaed3.o slaed4.o slaed5.o slaed6.o \ -- slaed7.o slaed8.o slaed9.o slaeda.o slaev2.o slagtf.o \ -- slagts.o slamrg.o slanst.o \ -- slapy2.o slapy3.o slarnv.o \ -- slarra.o slarrb.o slarrc.o slarrd.o slarre.o slarrf.o slarrj.o \ -- slarrk.o slarrr.o slaneg.o \ -- slartg.o slaruv.o slas2.o slascl.o \ -- slasd0.o slasd1.o slasd2.o slasd3.o slasd4.o slasd5.o slasd6.o \ -- slasd7.o slasd8.o slasda.o slasdq.o slasdt.o \ -- slaset.o slasq1.o slasq2.o slasq3.o slasq4.o slasq5.o slasq6.o \ -- slasr.o slasrt.o slassq.o slasv2.o spttrf.o sstebz.o sstedc.o \ -- ssteqr.o ssterf.o slaisnan.o sisnan.o \ -- slartgp.o slartgs.o \ -- ../INSTALL/second_$(TIMER).o -+ sbdsdc.$(SUFFIX) \ -+ sbdsqr.$(SUFFIX) sdisna.$(SUFFIX) slabad.$(SUFFIX) slacpy.$(SUFFIX) sladiv.$(SUFFIX) slae2.$(SUFFIX) slaebz.$(SUFFIX) \ -+ slaed0.$(SUFFIX) slaed1.$(SUFFIX) slaed2.$(SUFFIX) slaed3.$(SUFFIX) slaed4.$(SUFFIX) slaed5.$(SUFFIX) slaed6.$(SUFFIX) \ -+ slaed7.$(SUFFIX) slaed8.$(SUFFIX) slaed9.$(SUFFIX) slaeda.$(SUFFIX) slaev2.$(SUFFIX) slagtf.$(SUFFIX) \ -+ slagts.$(SUFFIX) slamrg.$(SUFFIX) slanst.$(SUFFIX) \ -+ slapy2.$(SUFFIX) slapy3.$(SUFFIX) slarnv.$(SUFFIX) \ -+ slarra.$(SUFFIX) slarrb.$(SUFFIX) slarrc.$(SUFFIX) slarrd.$(SUFFIX) slarre.$(SUFFIX) slarrf.$(SUFFIX) slarrj.$(SUFFIX) \ -+ slarrk.$(SUFFIX) slarrr.$(SUFFIX) slaneg.$(SUFFIX) \ -+ slartg.$(SUFFIX) slaruv.$(SUFFIX) slas2.$(SUFFIX) slascl.$(SUFFIX) \ -+ slasd0.$(SUFFIX) slasd1.$(SUFFIX) slasd2.$(SUFFIX) slasd3.$(SUFFIX) slasd4.$(SUFFIX) slasd5.$(SUFFIX) slasd6.$(SUFFIX) \ -+ slasd7.$(SUFFIX) slasd8.$(SUFFIX) slasda.$(SUFFIX) slasdq.$(SUFFIX) slasdt.$(SUFFIX) \ -+ slaset.$(SUFFIX) slasq1.$(SUFFIX) slasq2.$(SUFFIX) slasq3.$(SUFFIX) slasq4.$(SUFFIX) slasq5.$(SUFFIX) slasq6.$(SUFFIX) \ -+ slasr.$(SUFFIX) slasrt.$(SUFFIX) slassq.$(SUFFIX) slasv2.$(SUFFIX) spttrf.$(SUFFIX) sstebz.$(SUFFIX) sstedc.$(SUFFIX) \ -+ ssteqr.$(SUFFIX) ssterf.$(SUFFIX) slaisnan.$(SUFFIX) sisnan.$(SUFFIX) \ -+ slartgp.$(SUFFIX) slartgs.$(SUFFIX) \ -+ ../INSTALL/second_$(TIMER).$(SUFFIX) - - DZLAUX = \ -- dbdsdc.o \ -- dbdsqr.o ddisna.o dlabad.o dlacpy.o dladiv.o dlae2.o dlaebz.o \ -- dlaed0.o dlaed1.o dlaed2.o dlaed3.o dlaed4.o dlaed5.o dlaed6.o \ -- dlaed7.o dlaed8.o dlaed9.o dlaeda.o dlaev2.o dlagtf.o \ -- dlagts.o dlamrg.o dlanst.o \ -- dlapy2.o dlapy3.o dlarnv.o \ -- dlarra.o dlarrb.o dlarrc.o dlarrd.o dlarre.o dlarrf.o dlarrj.o \ -- dlarrk.o dlarrr.o dlaneg.o \ -- dlartg.o dlaruv.o dlas2.o dlascl.o \ -- dlasd0.o dlasd1.o dlasd2.o dlasd3.o dlasd4.o dlasd5.o dlasd6.o \ -- dlasd7.o dlasd8.o dlasda.o dlasdq.o dlasdt.o \ -- dlaset.o dlasq1.o dlasq2.o dlasq3.o dlasq4.o dlasq5.o dlasq6.o \ -- dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \ -- dsteqr.o dsterf.o dlaisnan.o disnan.o \ -- dlartgp.o dlartgs.o \ -- ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o -+ dbdsdc.$(SUFFIX) \ -+ dbdsqr.$(SUFFIX) ddisna.$(SUFFIX) dlabad.$(SUFFIX) dlacpy.$(SUFFIX) dladiv.$(SUFFIX) dlae2.$(SUFFIX) dlaebz.$(SUFFIX) \ -+ dlaed0.$(SUFFIX) dlaed1.$(SUFFIX) dlaed2.$(SUFFIX) dlaed3.$(SUFFIX) dlaed4.$(SUFFIX) dlaed5.$(SUFFIX) dlaed6.$(SUFFIX) \ -+ dlaed7.$(SUFFIX) dlaed8.$(SUFFIX) dlaed9.$(SUFFIX) dlaeda.$(SUFFIX) dlaev2.$(SUFFIX) dlagtf.$(SUFFIX) \ -+ dlagts.$(SUFFIX) dlamrg.$(SUFFIX) dlanst.$(SUFFIX) \ -+ dlapy2.$(SUFFIX) dlapy3.$(SUFFIX) dlarnv.$(SUFFIX) \ -+ dlarra.$(SUFFIX) dlarrb.$(SUFFIX) dlarrc.$(SUFFIX) dlarrd.$(SUFFIX) dlarre.$(SUFFIX) dlarrf.$(SUFFIX) dlarrj.$(SUFFIX) \ -+ dlarrk.$(SUFFIX) dlarrr.$(SUFFIX) dlaneg.$(SUFFIX) \ -+ dlartg.$(SUFFIX) dlaruv.$(SUFFIX) dlas2.$(SUFFIX) dlascl.$(SUFFIX) \ -+ dlasd0.$(SUFFIX) dlasd1.$(SUFFIX) dlasd2.$(SUFFIX) dlasd3.$(SUFFIX) dlasd4.$(SUFFIX) dlasd5.$(SUFFIX) dlasd6.$(SUFFIX) \ -+ dlasd7.$(SUFFIX) dlasd8.$(SUFFIX) dlasda.$(SUFFIX) dlasdq.$(SUFFIX) dlasdt.$(SUFFIX) \ -+ dlaset.$(SUFFIX) dlasq1.$(SUFFIX) dlasq2.$(SUFFIX) dlasq3.$(SUFFIX) dlasq4.$(SUFFIX) dlasq5.$(SUFFIX) dlasq6.$(SUFFIX) \ -+ dlasr.$(SUFFIX) dlasrt.$(SUFFIX) dlassq.$(SUFFIX) dlasv2.$(SUFFIX) dpttrf.$(SUFFIX) dstebz.$(SUFFIX) dstedc.$(SUFFIX) \ -+ dsteqr.$(SUFFIX) dsterf.$(SUFFIX) dlaisnan.$(SUFFIX) disnan.$(SUFFIX) \ -+ dlartgp.$(SUFFIX) dlartgs.$(SUFFIX) \ -+ ../INSTALL/dsecnd_$(TIMER).$(SUFFIX) - - SLASRC = \ -- sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \ -- sgbsvx.o sgbtf2.o sgbtrf.o sgbtrs.o sgebak.o sgebal.o sgebd2.o \ -- sgebrd.o sgecon.o sgeequ.o sgees.o sgeesx.o sgeev.o sgeevx.o \ -- sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \ -- sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ -- sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ -- sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ -- sgetc2.o sgetf2.o sgetri.o \ -- sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ -- sggglm.o sgghrd.o sgglse.o sggqrf.o \ -- sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ -- sgtsvx.o sgttrf.o sgttrs.o sgtts2.o shgeqz.o \ -- shsein.o shseqr.o slabrd.o slacon.o slacn2.o \ -- slaein.o slaexc.o slag2.o slags2.o slagtm.o slagv2.o slahqr.o \ -- slahrd.o slahr2.o slaic1.o slaln2.o slals0.o slalsa.o slalsd.o \ -- slangb.o slange.o slangt.o slanhs.o slansb.o slansp.o \ -- slansy.o slantb.o slantp.o slantr.o slanv2.o \ -- slapll.o slapmt.o \ -- slaqgb.o slaqge.o slaqp2.o slaqps.o slaqsb.o slaqsp.o slaqsy.o \ -- slaqr0.o slaqr1.o slaqr2.o slaqr3.o slaqr4.o slaqr5.o \ -- slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \ -- slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \ -- slarrv.o slartv.o \ -- slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o \ -- slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ -- slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ -- sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ -- sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ -- sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ -- sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ -- spbstf.o spbsv.o spbsvx.o \ -- spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ -- sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \ -- sppcon.o sppequ.o \ -- spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ -- spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ -- ssbev.o ssbevd.o ssbevx.o ssbgst.o ssbgv.o ssbgvd.o ssbgvx.o \ -- ssbtrd.o sspcon.o sspev.o sspevd.o sspevx.o sspgst.o \ -- sspgv.o sspgvd.o sspgvx.o ssprfs.o sspsv.o sspsvx.o ssptrd.o \ -- ssptrf.o ssptri.o ssptrs.o sstegr.o sstein.o sstev.o sstevd.o sstevr.o \ -- sstevx.o ssycon.o ssyev.o ssyevd.o ssyevr.o ssyevx.o ssygs2.o \ -- ssygst.o ssygv.o ssygvd.o ssygvx.o ssyrfs.o ssysv.o ssysvx.o \ -- ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytri2.o ssytri2x.o \ -- ssyswapr.o ssytrs.o ssytrs2.o ssyconv.o stbcon.o \ -- stbrfs.o stbtrs.o stgevc.o stgex2.o stgexc.o stgsen.o \ -- stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ -- stptrs.o \ -- strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ -- strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ -- slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ -- stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ -- sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ -- sgeequb.o ssyequb.o spoequb.o sgbequb.o \ -- sbbcsd.o slapmr.o sorbdb.o sorcsd.o \ -- sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ -- stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -+ sgbbrd.$(SUFFIX) sgbcon.$(SUFFIX) sgbequ.$(SUFFIX) sgbrfs.$(SUFFIX) sgbsv.$(SUFFIX) \ -+ sgbsvx.$(SUFFIX) sgbtf2.$(SUFFIX) sgbtrf.$(SUFFIX) sgbtrs.$(SUFFIX) sgebak.$(SUFFIX) sgebal.$(SUFFIX) sgebd2.$(SUFFIX) \ -+ sgebrd.$(SUFFIX) sgecon.$(SUFFIX) sgeequ.$(SUFFIX) sgees.$(SUFFIX) sgeesx.$(SUFFIX) sgeev.$(SUFFIX) sgeevx.$(SUFFIX) \ -+ sgegs.$(SUFFIX) sgegv.$(SUFFIX) sgehd2.$(SUFFIX) sgehrd.$(SUFFIX) sgelq2.$(SUFFIX) sgelqf.$(SUFFIX) \ -+ sgels.$(SUFFIX) sgelsd.$(SUFFIX) sgelss.$(SUFFIX) sgelsx.$(SUFFIX) sgelsy.$(SUFFIX) sgeql2.$(SUFFIX) sgeqlf.$(SUFFIX) \ -+ sgeqp3.$(SUFFIX) sgeqpf.$(SUFFIX) sgeqr2.$(SUFFIX) sgeqr2p.$(SUFFIX) sgeqrf.$(SUFFIX) sgeqrfp.$(SUFFIX) sgerfs.$(SUFFIX) \ -+ sgerq2.$(SUFFIX) sgerqf.$(SUFFIX) sgesc2.$(SUFFIX) sgesdd.$(SUFFIX) sgesv.$(SUFFIX) sgesvd.$(SUFFIX) sgesvx.$(SUFFIX) \ -+ sgetc2.$(SUFFIX) sgetri.$(SUFFIX) \ -+ sggbak.$(SUFFIX) sggbal.$(SUFFIX) sgges.$(SUFFIX) sggesx.$(SUFFIX) sggev.$(SUFFIX) sggevx.$(SUFFIX) \ -+ sggglm.$(SUFFIX) sgghrd.$(SUFFIX) sgglse.$(SUFFIX) sggqrf.$(SUFFIX) \ -+ sggrqf.$(SUFFIX) sggsvd.$(SUFFIX) sggsvp.$(SUFFIX) sgtcon.$(SUFFIX) sgtrfs.$(SUFFIX) sgtsv.$(SUFFIX) \ -+ sgtsvx.$(SUFFIX) sgttrf.$(SUFFIX) sgttrs.$(SUFFIX) sgtts2.$(SUFFIX) shgeqz.$(SUFFIX) \ -+ shsein.$(SUFFIX) shseqr.$(SUFFIX) slabrd.$(SUFFIX) slacon.$(SUFFIX) slacn2.$(SUFFIX) \ -+ slaein.$(SUFFIX) slaexc.$(SUFFIX) slag2.$(SUFFIX) slags2.$(SUFFIX) slagtm.$(SUFFIX) slagv2.$(SUFFIX) slahqr.$(SUFFIX) \ -+ slahrd.$(SUFFIX) slahr2.$(SUFFIX) slaic1.$(SUFFIX) slaln2.$(SUFFIX) slals0.$(SUFFIX) slalsa.$(SUFFIX) slalsd.$(SUFFIX) \ -+ slangb.$(SUFFIX) slange.$(SUFFIX) slangt.$(SUFFIX) slanhs.$(SUFFIX) slansb.$(SUFFIX) slansp.$(SUFFIX) \ -+ slansy.$(SUFFIX) slantb.$(SUFFIX) slantp.$(SUFFIX) slantr.$(SUFFIX) slanv2.$(SUFFIX) \ -+ slapll.$(SUFFIX) slapmt.$(SUFFIX) \ -+ slaqgb.$(SUFFIX) slaqge.$(SUFFIX) slaqp2.$(SUFFIX) slaqps.$(SUFFIX) slaqsb.$(SUFFIX) slaqsp.$(SUFFIX) slaqsy.$(SUFFIX) \ -+ slaqr0.$(SUFFIX) slaqr1.$(SUFFIX) slaqr2.$(SUFFIX) slaqr3.$(SUFFIX) slaqr4.$(SUFFIX) slaqr5.$(SUFFIX) \ -+ slaqtr.$(SUFFIX) slar1v.$(SUFFIX) slar2v.$(SUFFIX) ilaslr.$(SUFFIX) ilaslc.$(SUFFIX) \ -+ slarf.$(SUFFIX) slarfb.$(SUFFIX) slarfg.$(SUFFIX) slarfgp.$(SUFFIX) slarft.$(SUFFIX) slarfx.$(SUFFIX) slargv.$(SUFFIX) \ -+ slarrv.$(SUFFIX) slartv.$(SUFFIX) \ -+ slarz.$(SUFFIX) slarzb.$(SUFFIX) slarzt.$(SUFFIX) slasy2.$(SUFFIX) slasyf.$(SUFFIX) \ -+ slatbs.$(SUFFIX) slatdf.$(SUFFIX) slatps.$(SUFFIX) slatrd.$(SUFFIX) slatrs.$(SUFFIX) slatrz.$(SUFFIX) slatzm.$(SUFFIX) \ -+ sopgtr.$(SUFFIX) sopmtr.$(SUFFIX) sorg2l.$(SUFFIX) sorg2r.$(SUFFIX) \ -+ sorgbr.$(SUFFIX) sorghr.$(SUFFIX) sorgl2.$(SUFFIX) sorglq.$(SUFFIX) sorgql.$(SUFFIX) sorgqr.$(SUFFIX) sorgr2.$(SUFFIX) \ -+ sorgrq.$(SUFFIX) sorgtr.$(SUFFIX) sorm2l.$(SUFFIX) sorm2r.$(SUFFIX) \ -+ sormbr.$(SUFFIX) sormhr.$(SUFFIX) sorml2.$(SUFFIX) sormlq.$(SUFFIX) sormql.$(SUFFIX) sormqr.$(SUFFIX) sormr2.$(SUFFIX) \ -+ sormr3.$(SUFFIX) sormrq.$(SUFFIX) sormrz.$(SUFFIX) sormtr.$(SUFFIX) spbcon.$(SUFFIX) spbequ.$(SUFFIX) spbrfs.$(SUFFIX) \ -+ spbstf.$(SUFFIX) spbsv.$(SUFFIX) spbsvx.$(SUFFIX) \ -+ spbtf2.$(SUFFIX) spbtrf.$(SUFFIX) spbtrs.$(SUFFIX) spocon.$(SUFFIX) spoequ.$(SUFFIX) sporfs.$(SUFFIX) sposv.$(SUFFIX) \ -+ sposvx.$(SUFFIX) spotri.$(SUFFIX) spstrf.$(SUFFIX) spstf2.$(SUFFIX) \ -+ sppcon.$(SUFFIX) sppequ.$(SUFFIX) \ -+ spprfs.$(SUFFIX) sppsv.$(SUFFIX) sppsvx.$(SUFFIX) spptrf.$(SUFFIX) spptri.$(SUFFIX) spptrs.$(SUFFIX) sptcon.$(SUFFIX) \ -+ spteqr.$(SUFFIX) sptrfs.$(SUFFIX) sptsv.$(SUFFIX) sptsvx.$(SUFFIX) spttrs.$(SUFFIX) sptts2.$(SUFFIX) srscl.$(SUFFIX) \ -+ ssbev.$(SUFFIX) ssbevd.$(SUFFIX) ssbevx.$(SUFFIX) ssbgst.$(SUFFIX) ssbgv.$(SUFFIX) ssbgvd.$(SUFFIX) ssbgvx.$(SUFFIX) \ -+ ssbtrd.$(SUFFIX) sspcon.$(SUFFIX) sspev.$(SUFFIX) sspevd.$(SUFFIX) sspevx.$(SUFFIX) sspgst.$(SUFFIX) \ -+ sspgv.$(SUFFIX) sspgvd.$(SUFFIX) sspgvx.$(SUFFIX) ssprfs.$(SUFFIX) sspsv.$(SUFFIX) sspsvx.$(SUFFIX) ssptrd.$(SUFFIX) \ -+ ssptrf.$(SUFFIX) ssptri.$(SUFFIX) ssptrs.$(SUFFIX) sstegr.$(SUFFIX) sstein.$(SUFFIX) sstev.$(SUFFIX) sstevd.$(SUFFIX) sstevr.$(SUFFIX) \ -+ sstevx.$(SUFFIX) ssycon.$(SUFFIX) ssyev.$(SUFFIX) ssyevd.$(SUFFIX) ssyevr.$(SUFFIX) ssyevx.$(SUFFIX) ssygs2.$(SUFFIX) \ -+ ssygst.$(SUFFIX) ssygv.$(SUFFIX) ssygvd.$(SUFFIX) ssygvx.$(SUFFIX) ssyrfs.$(SUFFIX) ssysv.$(SUFFIX) ssysvx.$(SUFFIX) \ -+ ssytd2.$(SUFFIX) ssytf2.$(SUFFIX) ssytrd.$(SUFFIX) ssytrf.$(SUFFIX) ssytri.$(SUFFIX) ssytri2.$(SUFFIX) ssytri2x.$(SUFFIX) \ -+ ssyswapr.$(SUFFIX) ssytrs.$(SUFFIX) ssytrs2.$(SUFFIX) ssyconv.$(SUFFIX) stbcon.$(SUFFIX) \ -+ stbrfs.$(SUFFIX) stbtrs.$(SUFFIX) stgevc.$(SUFFIX) stgex2.$(SUFFIX) stgexc.$(SUFFIX) stgsen.$(SUFFIX) \ -+ stgsja.$(SUFFIX) stgsna.$(SUFFIX) stgsy2.$(SUFFIX) stgsyl.$(SUFFIX) stpcon.$(SUFFIX) stprfs.$(SUFFIX) stptri.$(SUFFIX) \ -+ stptrs.$(SUFFIX) \ -+ strcon.$(SUFFIX) strevc.$(SUFFIX) strexc.$(SUFFIX) strrfs.$(SUFFIX) strsen.$(SUFFIX) strsna.$(SUFFIX) strsyl.$(SUFFIX) \ -+ strtrs.$(SUFFIX) stzrqf.$(SUFFIX) stzrzf.$(SUFFIX) sstemr.$(SUFFIX) \ -+ slansf.$(SUFFIX) spftrf.$(SUFFIX) spftri.$(SUFFIX) spftrs.$(SUFFIX) ssfrk.$(SUFFIX) stfsm.$(SUFFIX) stftri.$(SUFFIX) stfttp.$(SUFFIX) \ -+ stfttr.$(SUFFIX) stpttf.$(SUFFIX) stpttr.$(SUFFIX) strttf.$(SUFFIX) strttp.$(SUFFIX) \ -+ sgejsv.$(SUFFIX) sgesvj.$(SUFFIX) sgsvj0.$(SUFFIX) sgsvj1.$(SUFFIX) \ -+ sgeequb.$(SUFFIX) ssyequb.$(SUFFIX) spoequb.$(SUFFIX) sgbequb.$(SUFFIX) \ -+ sbbcsd.$(SUFFIX) slapmr.$(SUFFIX) sorbdb.$(SUFFIX) sorcsd.$(SUFFIX) \ -+ sgeqrt.$(SUFFIX) sgeqrt2.$(SUFFIX) sgeqrt3.$(SUFFIX) sgemqrt.$(SUFFIX) \ -+ stpqrt.$(SUFFIX) stpqrt2.$(SUFFIX) stpmqrt.$(SUFFIX) stprfb.$(SUFFIX) - --DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o -+DSLASRC = spotrs.$(SUFFIX) - - ifdef USEXBLAS --SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ -- sla_gercond.o sla_gerpvgrw.o ssysvxx.o ssyrfsx.o \ -- sla_syrfsx_extended.o sla_syamv.o sla_syrcond.o sla_syrpvgrw.o \ -- sposvxx.o sporfsx.o sla_porfsx_extended.o sla_porcond.o \ -- sla_porpvgrw.o sgbsvxx.o sgbrfsx.o sla_gbrfsx_extended.o \ -- sla_gbamv.o sla_gbrcond.o sla_gbrpvgrw.o sla_lin_berr.o slarscl2.o \ -- slascl2.o sla_wwaddw.o -+SXLASRC = sgesvxx.$(SUFFIX) sgerfsx.$(SUFFIX) sla_gerfsx_extended.$(SUFFIX) sla_geamv.$(SUFFIX) \ -+ sla_gercond.$(SUFFIX) sla_gerpvgrw.$(SUFFIX) ssysvxx.$(SUFFIX) ssyrfsx.$(SUFFIX) \ -+ sla_syrfsx_extended.$(SUFFIX) sla_syamv.$(SUFFIX) sla_syrcond.$(SUFFIX) sla_syrpvgrw.$(SUFFIX) \ -+ sposvxx.$(SUFFIX) sporfsx.$(SUFFIX) sla_porfsx_extended.$(SUFFIX) sla_porcond.$(SUFFIX) \ -+ sla_porpvgrw.$(SUFFIX) sgbsvxx.$(SUFFIX) sgbrfsx.$(SUFFIX) sla_gbrfsx_extended.$(SUFFIX) \ -+ sla_gbamv.$(SUFFIX) sla_gbrcond.$(SUFFIX) sla_gbrpvgrw.$(SUFFIX) sla_lin_berr.$(SUFFIX) slarscl2.$(SUFFIX) \ -+ slascl2.$(SUFFIX) sla_wwaddw.$(SUFFIX) - endif - - CLASRC = \ -- cbdsqr.o cgbbrd.o cgbcon.o cgbequ.o cgbrfs.o cgbsv.o cgbsvx.o \ -- cgbtf2.o cgbtrf.o cgbtrs.o cgebak.o cgebal.o cgebd2.o cgebrd.o \ -- cgecon.o cgeequ.o cgees.o cgeesx.o cgeev.o cgeevx.o \ -- cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \ -- cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ -- cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ -- cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ -- cgesvx.o cgetc2.o cgetf2.o cgetri.o \ -- cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ -- cgghrd.o cgglse.o cggqrf.o cggrqf.o \ -- cggsvd.o cggsvp.o \ -- cgtcon.o cgtrfs.o cgtsv.o cgtsvx.o cgttrf.o cgttrs.o cgtts2.o chbev.o \ -- chbevd.o chbevx.o chbgst.o chbgv.o chbgvd.o chbgvx.o chbtrd.o \ -- checon.o cheev.o cheevd.o cheevr.o cheevx.o chegs2.o chegst.o \ -- chegv.o chegvd.o chegvx.o cherfs.o chesv.o chesvx.o chetd2.o \ -- chetf2.o chetrd.o \ -- chetrf.o chetri.o chetri2.o chetri2x.o cheswapr.o \ -- chetrs.o chetrs2.o chgeqz.o chpcon.o chpev.o chpevd.o \ -- chpevx.o chpgst.o chpgv.o chpgvd.o chpgvx.o chprfs.o chpsv.o \ -- chpsvx.o \ -- chptrd.o chptrf.o chptri.o chptrs.o chsein.o chseqr.o clabrd.o \ -- clacgv.o clacon.o clacn2.o clacp2.o clacpy.o clacrm.o clacrt.o cladiv.o \ -- claed0.o claed7.o claed8.o \ -- claein.o claesy.o claev2.o clags2.o clagtm.o \ -- clahef.o clahqr.o \ -- clahrd.o clahr2.o claic1.o clals0.o clalsa.o clalsd.o clangb.o clange.o clangt.o \ -- clanhb.o clanhe.o \ -- clanhp.o clanhs.o clanht.o clansb.o clansp.o clansy.o clantb.o \ -- clantp.o clantr.o clapll.o clapmt.o clarcm.o claqgb.o claqge.o \ -- claqhb.o claqhe.o claqhp.o claqp2.o claqps.o claqsb.o \ -- claqr0.o claqr1.o claqr2.o claqr3.o claqr4.o claqr5.o \ -- claqsp.o claqsy.o clar1v.o clar2v.o ilaclr.o ilaclc.o \ -- clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \ -- clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ -- clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ -- claswp.o clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ -- clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ -- cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ -- cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \ -- cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ -- cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ -- crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ -- cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \ -- cstegr.o cstein.o csteqr.o csycon.o csymv.o \ -- csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \ -- csyswapr.o csytrs.o csytrs2.o csyconv.o ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \ -- ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ -- ctprfs.o ctptri.o \ -- ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ -- ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ -- cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ -- cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ -- cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ -- cunmtr.o cupgtr.o cupmtr.o icmax1.o scsum1.o cstemr.o \ -- chfrk.o ctfttp.o clanhf.o cpftrf.o cpftri.o cpftrs.o ctfsm.o ctftri.o \ -- ctfttr.o ctpttf.o ctpttr.o ctrttf.o ctrttp.o \ -- cgeequb.o cgbequb.o csyequb.o cpoequb.o cheequb.o \ -- cbbcsd.o clapmr.o cunbdb.o cuncsd.o \ -- cgeqrt.o cgeqrt2.o cgeqrt3.o cgemqrt.o \ -- ctpqrt.o ctpqrt2.o ctpmqrt.o ctprfb.o -+ cbdsqr.$(SUFFIX) cgbbrd.$(SUFFIX) cgbcon.$(SUFFIX) cgbequ.$(SUFFIX) cgbrfs.$(SUFFIX) cgbsv.$(SUFFIX) cgbsvx.$(SUFFIX) \ -+ cgbtf2.$(SUFFIX) cgbtrf.$(SUFFIX) cgbtrs.$(SUFFIX) cgebak.$(SUFFIX) cgebal.$(SUFFIX) cgebd2.$(SUFFIX) cgebrd.$(SUFFIX) \ -+ cgecon.$(SUFFIX) cgeequ.$(SUFFIX) cgees.$(SUFFIX) cgeesx.$(SUFFIX) cgeev.$(SUFFIX) cgeevx.$(SUFFIX) \ -+ cgegs.$(SUFFIX) cgegv.$(SUFFIX) cgehd2.$(SUFFIX) cgehrd.$(SUFFIX) cgelq2.$(SUFFIX) cgelqf.$(SUFFIX) \ -+ cgels.$(SUFFIX) cgelsd.$(SUFFIX) cgelss.$(SUFFIX) cgelsx.$(SUFFIX) cgelsy.$(SUFFIX) cgeql2.$(SUFFIX) cgeqlf.$(SUFFIX) cgeqp3.$(SUFFIX) \ -+ cgeqpf.$(SUFFIX) cgeqr2.$(SUFFIX) cgeqr2p.$(SUFFIX) cgeqrf.$(SUFFIX) cgeqrfp.$(SUFFIX) cgerfs.$(SUFFIX) \ -+ cgerq2.$(SUFFIX) cgerqf.$(SUFFIX) cgesc2.$(SUFFIX) cgesdd.$(SUFFIX) cgesv.$(SUFFIX) cgesvd.$(SUFFIX) \ -+ cgesvx.$(SUFFIX) cgetc2.$(SUFFIX) cgetri.$(SUFFIX) \ -+ cggbak.$(SUFFIX) cggbal.$(SUFFIX) cgges.$(SUFFIX) cggesx.$(SUFFIX) cggev.$(SUFFIX) cggevx.$(SUFFIX) cggglm.$(SUFFIX) \ -+ cgghrd.$(SUFFIX) cgglse.$(SUFFIX) cggqrf.$(SUFFIX) cggrqf.$(SUFFIX) \ -+ cggsvd.$(SUFFIX) cggsvp.$(SUFFIX) \ -+ cgtcon.$(SUFFIX) cgtrfs.$(SUFFIX) cgtsv.$(SUFFIX) cgtsvx.$(SUFFIX) cgttrf.$(SUFFIX) cgttrs.$(SUFFIX) cgtts2.$(SUFFIX) chbev.$(SUFFIX) \ -+ chbevd.$(SUFFIX) chbevx.$(SUFFIX) chbgst.$(SUFFIX) chbgv.$(SUFFIX) chbgvd.$(SUFFIX) chbgvx.$(SUFFIX) chbtrd.$(SUFFIX) \ -+ checon.$(SUFFIX) cheev.$(SUFFIX) cheevd.$(SUFFIX) cheevr.$(SUFFIX) cheevx.$(SUFFIX) chegs2.$(SUFFIX) chegst.$(SUFFIX) \ -+ chegv.$(SUFFIX) chegvd.$(SUFFIX) chegvx.$(SUFFIX) cherfs.$(SUFFIX) chesv.$(SUFFIX) chesvx.$(SUFFIX) chetd2.$(SUFFIX) \ -+ chetf2.$(SUFFIX) chetrd.$(SUFFIX) \ -+ chetrf.$(SUFFIX) chetri.$(SUFFIX) chetri2.$(SUFFIX) chetri2x.$(SUFFIX) cheswapr.$(SUFFIX) \ -+ chetrs.$(SUFFIX) chetrs2.$(SUFFIX) chgeqz.$(SUFFIX) chpcon.$(SUFFIX) chpev.$(SUFFIX) chpevd.$(SUFFIX) \ -+ chpevx.$(SUFFIX) chpgst.$(SUFFIX) chpgv.$(SUFFIX) chpgvd.$(SUFFIX) chpgvx.$(SUFFIX) chprfs.$(SUFFIX) chpsv.$(SUFFIX) \ -+ chpsvx.$(SUFFIX) \ -+ chptrd.$(SUFFIX) chptrf.$(SUFFIX) chptri.$(SUFFIX) chptrs.$(SUFFIX) chsein.$(SUFFIX) chseqr.$(SUFFIX) clabrd.$(SUFFIX) \ -+ clacgv.$(SUFFIX) clacon.$(SUFFIX) clacn2.$(SUFFIX) clacp2.$(SUFFIX) clacpy.$(SUFFIX) clacrm.$(SUFFIX) clacrt.$(SUFFIX) cladiv.$(SUFFIX) \ -+ claed0.$(SUFFIX) claed7.$(SUFFIX) claed8.$(SUFFIX) \ -+ claein.$(SUFFIX) claesy.$(SUFFIX) claev2.$(SUFFIX) clags2.$(SUFFIX) clagtm.$(SUFFIX) \ -+ clahef.$(SUFFIX) clahqr.$(SUFFIX) \ -+ clahrd.$(SUFFIX) clahr2.$(SUFFIX) claic1.$(SUFFIX) clals0.$(SUFFIX) clalsa.$(SUFFIX) clalsd.$(SUFFIX) clangb.$(SUFFIX) clange.$(SUFFIX) clangt.$(SUFFIX) \ -+ clanhb.$(SUFFIX) clanhe.$(SUFFIX) \ -+ clanhp.$(SUFFIX) clanhs.$(SUFFIX) clanht.$(SUFFIX) clansb.$(SUFFIX) clansp.$(SUFFIX) clansy.$(SUFFIX) clantb.$(SUFFIX) \ -+ clantp.$(SUFFIX) clantr.$(SUFFIX) clapll.$(SUFFIX) clapmt.$(SUFFIX) clarcm.$(SUFFIX) claqgb.$(SUFFIX) claqge.$(SUFFIX) \ -+ claqhb.$(SUFFIX) claqhe.$(SUFFIX) claqhp.$(SUFFIX) claqp2.$(SUFFIX) claqps.$(SUFFIX) claqsb.$(SUFFIX) \ -+ claqr0.$(SUFFIX) claqr1.$(SUFFIX) claqr2.$(SUFFIX) claqr3.$(SUFFIX) claqr4.$(SUFFIX) claqr5.$(SUFFIX) \ -+ claqsp.$(SUFFIX) claqsy.$(SUFFIX) clar1v.$(SUFFIX) clar2v.$(SUFFIX) ilaclr.$(SUFFIX) ilaclc.$(SUFFIX) \ -+ clarf.$(SUFFIX) clarfb.$(SUFFIX) clarfg.$(SUFFIX) clarft.$(SUFFIX) clarfgp.$(SUFFIX) \ -+ clarfx.$(SUFFIX) clargv.$(SUFFIX) clarnv.$(SUFFIX) clarrv.$(SUFFIX) clartg.$(SUFFIX) clartv.$(SUFFIX) \ -+ clarz.$(SUFFIX) clarzb.$(SUFFIX) clarzt.$(SUFFIX) clascl.$(SUFFIX) claset.$(SUFFIX) clasr.$(SUFFIX) classq.$(SUFFIX) \ -+ clasyf.$(SUFFIX) clatbs.$(SUFFIX) clatdf.$(SUFFIX) clatps.$(SUFFIX) clatrd.$(SUFFIX) clatrs.$(SUFFIX) clatrz.$(SUFFIX) \ -+ clatzm.$(SUFFIX) cpbcon.$(SUFFIX) cpbequ.$(SUFFIX) cpbrfs.$(SUFFIX) cpbstf.$(SUFFIX) cpbsv.$(SUFFIX) \ -+ cpbsvx.$(SUFFIX) cpbtf2.$(SUFFIX) cpbtrf.$(SUFFIX) cpbtrs.$(SUFFIX) cpocon.$(SUFFIX) cpoequ.$(SUFFIX) cporfs.$(SUFFIX) \ -+ cposv.$(SUFFIX) cposvx.$(SUFFIX) cpotri.$(SUFFIX) cpstrf.$(SUFFIX) cpstf2.$(SUFFIX) \ -+ cppcon.$(SUFFIX) cppequ.$(SUFFIX) cpprfs.$(SUFFIX) cppsv.$(SUFFIX) cppsvx.$(SUFFIX) cpptrf.$(SUFFIX) cpptri.$(SUFFIX) cpptrs.$(SUFFIX) \ -+ cptcon.$(SUFFIX) cpteqr.$(SUFFIX) cptrfs.$(SUFFIX) cptsv.$(SUFFIX) cptsvx.$(SUFFIX) cpttrf.$(SUFFIX) cpttrs.$(SUFFIX) cptts2.$(SUFFIX) \ -+ crot.$(SUFFIX) cspcon.$(SUFFIX) cspmv.$(SUFFIX) cspr.$(SUFFIX) csprfs.$(SUFFIX) cspsv.$(SUFFIX) \ -+ cspsvx.$(SUFFIX) csptrf.$(SUFFIX) csptri.$(SUFFIX) csptrs.$(SUFFIX) csrscl.$(SUFFIX) cstedc.$(SUFFIX) \ -+ cstegr.$(SUFFIX) cstein.$(SUFFIX) csteqr.$(SUFFIX) csycon.$(SUFFIX) csymv.$(SUFFIX) \ -+ csyr.$(SUFFIX) csyrfs.$(SUFFIX) csysv.$(SUFFIX) csysvx.$(SUFFIX) csytf2.$(SUFFIX) csytrf.$(SUFFIX) csytri.$(SUFFIX) csytri2.$(SUFFIX) csytri2x.$(SUFFIX) \ -+ csyswapr.$(SUFFIX) csytrs.$(SUFFIX) csytrs2.$(SUFFIX) csyconv.$(SUFFIX) ctbcon.$(SUFFIX) ctbrfs.$(SUFFIX) ctbtrs.$(SUFFIX) ctgevc.$(SUFFIX) ctgex2.$(SUFFIX) \ -+ ctgexc.$(SUFFIX) ctgsen.$(SUFFIX) ctgsja.$(SUFFIX) ctgsna.$(SUFFIX) ctgsy2.$(SUFFIX) ctgsyl.$(SUFFIX) ctpcon.$(SUFFIX) \ -+ ctprfs.$(SUFFIX) ctptri.$(SUFFIX) \ -+ ctptrs.$(SUFFIX) ctrcon.$(SUFFIX) ctrevc.$(SUFFIX) ctrexc.$(SUFFIX) ctrrfs.$(SUFFIX) ctrsen.$(SUFFIX) ctrsna.$(SUFFIX) \ -+ ctrsyl.$(SUFFIX) ctrtrs.$(SUFFIX) ctzrqf.$(SUFFIX) ctzrzf.$(SUFFIX) cung2l.$(SUFFIX) cung2r.$(SUFFIX) \ -+ cungbr.$(SUFFIX) cunghr.$(SUFFIX) cungl2.$(SUFFIX) cunglq.$(SUFFIX) cungql.$(SUFFIX) cungqr.$(SUFFIX) cungr2.$(SUFFIX) \ -+ cungrq.$(SUFFIX) cungtr.$(SUFFIX) cunm2l.$(SUFFIX) cunm2r.$(SUFFIX) cunmbr.$(SUFFIX) cunmhr.$(SUFFIX) cunml2.$(SUFFIX) \ -+ cunmlq.$(SUFFIX) cunmql.$(SUFFIX) cunmqr.$(SUFFIX) cunmr2.$(SUFFIX) cunmr3.$(SUFFIX) cunmrq.$(SUFFIX) cunmrz.$(SUFFIX) \ -+ cunmtr.$(SUFFIX) cupgtr.$(SUFFIX) cupmtr.$(SUFFIX) icmax1.$(SUFFIX) scsum1.$(SUFFIX) cstemr.$(SUFFIX) \ -+ chfrk.$(SUFFIX) ctfttp.$(SUFFIX) clanhf.$(SUFFIX) cpftrf.$(SUFFIX) cpftri.$(SUFFIX) cpftrs.$(SUFFIX) ctfsm.$(SUFFIX) ctftri.$(SUFFIX) \ -+ ctfttr.$(SUFFIX) ctpttf.$(SUFFIX) ctpttr.$(SUFFIX) ctrttf.$(SUFFIX) ctrttp.$(SUFFIX) \ -+ cgeequb.$(SUFFIX) cgbequb.$(SUFFIX) csyequb.$(SUFFIX) cpoequb.$(SUFFIX) cheequb.$(SUFFIX) \ -+ cbbcsd.$(SUFFIX) clapmr.$(SUFFIX) cunbdb.$(SUFFIX) cuncsd.$(SUFFIX) \ -+ cgeqrt.$(SUFFIX) cgeqrt2.$(SUFFIX) cgeqrt3.$(SUFFIX) cgemqrt.$(SUFFIX) \ -+ ctpqrt.$(SUFFIX) ctpqrt2.$(SUFFIX) ctpmqrt.$(SUFFIX) ctprfb.$(SUFFIX) - - ifdef USEXBLAS --CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ -- cla_gercond_c.o cla_gercond_x.o cla_gerpvgrw.o \ -- csysvxx.o csyrfsx.o cla_syrfsx_extended.o cla_syamv.o \ -- cla_syrcond_c.o cla_syrcond_x.o cla_syrpvgrw.o \ -- cposvxx.o cporfsx.o cla_porfsx_extended.o \ -- cla_porcond_c.o cla_porcond_x.o cla_porpvgrw.o \ -- cgbsvxx.o cgbrfsx.o cla_gbrfsx_extended.o cla_gbamv.o \ -- cla_gbrcond_c.o cla_gbrcond_x.o cla_gbrpvgrw.o \ -- chesvxx.o cherfsx.o cla_herfsx_extended.o cla_heamv.o \ -- cla_hercond_c.o cla_hercond_x.o cla_herpvgrw.o \ -- cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o -+CXLASRC = cgesvxx.$(SUFFIX) cgerfsx.$(SUFFIX) cla_gerfsx_extended.$(SUFFIX) cla_geamv.$(SUFFIX) \ -+ cla_gercond_c.$(SUFFIX) cla_gercond_x.$(SUFFIX) cla_gerpvgrw.$(SUFFIX) \ -+ csysvxx.$(SUFFIX) csyrfsx.$(SUFFIX) cla_syrfsx_extended.$(SUFFIX) cla_syamv.$(SUFFIX) \ -+ cla_syrcond_c.$(SUFFIX) cla_syrcond_x.$(SUFFIX) cla_syrpvgrw.$(SUFFIX) \ -+ cposvxx.$(SUFFIX) cporfsx.$(SUFFIX) cla_porfsx_extended.$(SUFFIX) \ -+ cla_porcond_c.$(SUFFIX) cla_porcond_x.$(SUFFIX) cla_porpvgrw.$(SUFFIX) \ -+ cgbsvxx.$(SUFFIX) cgbrfsx.$(SUFFIX) cla_gbrfsx_extended.$(SUFFIX) cla_gbamv.$(SUFFIX) \ -+ cla_gbrcond_c.$(SUFFIX) cla_gbrcond_x.$(SUFFIX) cla_gbrpvgrw.$(SUFFIX) \ -+ chesvxx.$(SUFFIX) cherfsx.$(SUFFIX) cla_herfsx_extended.$(SUFFIX) cla_heamv.$(SUFFIX) \ -+ cla_hercond_c.$(SUFFIX) cla_hercond_x.$(SUFFIX) cla_herpvgrw.$(SUFFIX) \ -+ cla_lin_berr.$(SUFFIX) clarscl2.$(SUFFIX) clascl2.$(SUFFIX) cla_wwaddw.$(SUFFIX) - endif - --ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o -+ZCLASRC = cpotrs.$(SUFFIX) - - DLASRC = \ -- dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ -- dgbsvx.o dgbtf2.o dgbtrf.o dgbtrs.o dgebak.o dgebal.o dgebd2.o \ -- dgebrd.o dgecon.o dgeequ.o dgees.o dgeesx.o dgeev.o dgeevx.o \ -- dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \ -- dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ -- dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ -- dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ -- dgetc2.o dgetf2.o dgetrf.o dgetri.o \ -- dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ -- dggglm.o dgghrd.o dgglse.o dggqrf.o \ -- dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ -- dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ -- dhsein.o dhseqr.o dlabrd.o dlacon.o dlacn2.o \ -- dlaein.o dlaexc.o dlag2.o dlags2.o dlagtm.o dlagv2.o dlahqr.o \ -- dlahrd.o dlahr2.o dlaic1.o dlaln2.o dlals0.o dlalsa.o dlalsd.o \ -- dlangb.o dlange.o dlangt.o dlanhs.o dlansb.o dlansp.o \ -- dlansy.o dlantb.o dlantp.o dlantr.o dlanv2.o \ -- dlapll.o dlapmt.o \ -- dlaqgb.o dlaqge.o dlaqp2.o dlaqps.o dlaqsb.o dlaqsp.o dlaqsy.o \ -- dlaqr0.o dlaqr1.o dlaqr2.o dlaqr3.o dlaqr4.o dlaqr5.o \ -- dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \ -- dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ -- dlargv.o dlarrv.o dlartv.o \ -- dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o \ -- dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ -- dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ -- dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ -- dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ -- dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ -- dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ -- dpbstf.o dpbsv.o dpbsvx.o \ -- dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ -- dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ -- dppcon.o dppequ.o \ -- dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ -- dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ -- dsbev.o dsbevd.o dsbevx.o dsbgst.o dsbgv.o dsbgvd.o dsbgvx.o \ -- dsbtrd.o dspcon.o dspev.o dspevd.o dspevx.o dspgst.o \ -- dspgv.o dspgvd.o dspgvx.o dsprfs.o dspsv.o dspsvx.o dsptrd.o \ -- dsptrf.o dsptri.o dsptrs.o dstegr.o dstein.o dstev.o dstevd.o dstevr.o \ -- dstevx.o dsycon.o dsyev.o dsyevd.o dsyevr.o \ -- dsyevx.o dsygs2.o dsygst.o dsygv.o dsygvd.o dsygvx.o dsyrfs.o \ -- dsysv.o dsysvx.o \ -- dsytd2.o dsytf2.o dsytrd.o dsytrf.o dsytri.o dsytri2.o dsytri2x.o \ -- dsyswapr.o dsytrs.o dsytrs2.o dsyconv.o dtbcon.o \ -- dtbrfs.o dtbtrs.o dtgevc.o dtgex2.o dtgexc.o dtgsen.o \ -- dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ -- dtptrs.o \ -- dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ -- dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ -- dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ -- dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ -- dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ -- dgejsv.o dgesvj.o dgsvj0.o dgsvj1.o \ -- dgeequb.o dsyequb.o dpoequb.o dgbequb.o \ -- dbbcsd.o dlapmr.o dorbdb.o dorcsd.o \ -- dgeqrt.o dgeqrt2.o dgeqrt3.o dgemqrt.o \ -- dtpqrt.o dtpqrt2.o dtpmqrt.o dtprfb.o -+ dgbbrd.$(SUFFIX) dgbcon.$(SUFFIX) dgbequ.$(SUFFIX) dgbrfs.$(SUFFIX) dgbsv.$(SUFFIX) \ -+ dgbsvx.$(SUFFIX) dgbtf2.$(SUFFIX) dgbtrf.$(SUFFIX) dgbtrs.$(SUFFIX) dgebak.$(SUFFIX) dgebal.$(SUFFIX) dgebd2.$(SUFFIX) \ -+ dgebrd.$(SUFFIX) dgecon.$(SUFFIX) dgeequ.$(SUFFIX) dgees.$(SUFFIX) dgeesx.$(SUFFIX) dgeev.$(SUFFIX) dgeevx.$(SUFFIX) \ -+ dgegs.$(SUFFIX) dgegv.$(SUFFIX) dgehd2.$(SUFFIX) dgehrd.$(SUFFIX) dgelq2.$(SUFFIX) dgelqf.$(SUFFIX) \ -+ dgels.$(SUFFIX) dgelsd.$(SUFFIX) dgelss.$(SUFFIX) dgelsx.$(SUFFIX) dgelsy.$(SUFFIX) dgeql2.$(SUFFIX) dgeqlf.$(SUFFIX) \ -+ dgeqp3.$(SUFFIX) dgeqpf.$(SUFFIX) dgeqr2.$(SUFFIX) dgeqr2p.$(SUFFIX) dgeqrf.$(SUFFIX) dgeqrfp.$(SUFFIX) dgerfs.$(SUFFIX) \ -+ dgerq2.$(SUFFIX) dgerqf.$(SUFFIX) dgesc2.$(SUFFIX) dgesdd.$(SUFFIX) dgesv.$(SUFFIX) dgesvd.$(SUFFIX) dgesvx.$(SUFFIX) \ -+ dgetc2.$(SUFFIX) dgetri.$(SUFFIX) \ -+ dggbak.$(SUFFIX) dggbal.$(SUFFIX) dgges.$(SUFFIX) dggesx.$(SUFFIX) dggev.$(SUFFIX) dggevx.$(SUFFIX) \ -+ dggglm.$(SUFFIX) dgghrd.$(SUFFIX) dgglse.$(SUFFIX) dggqrf.$(SUFFIX) \ -+ dggrqf.$(SUFFIX) dggsvd.$(SUFFIX) dggsvp.$(SUFFIX) dgtcon.$(SUFFIX) dgtrfs.$(SUFFIX) dgtsv.$(SUFFIX) \ -+ dgtsvx.$(SUFFIX) dgttrf.$(SUFFIX) dgttrs.$(SUFFIX) dgtts2.$(SUFFIX) dhgeqz.$(SUFFIX) \ -+ dhsein.$(SUFFIX) dhseqr.$(SUFFIX) dlabrd.$(SUFFIX) dlacon.$(SUFFIX) dlacn2.$(SUFFIX) \ -+ dlaein.$(SUFFIX) dlaexc.$(SUFFIX) dlag2.$(SUFFIX) dlags2.$(SUFFIX) dlagtm.$(SUFFIX) dlagv2.$(SUFFIX) dlahqr.$(SUFFIX) \ -+ dlahrd.$(SUFFIX) dlahr2.$(SUFFIX) dlaic1.$(SUFFIX) dlaln2.$(SUFFIX) dlals0.$(SUFFIX) dlalsa.$(SUFFIX) dlalsd.$(SUFFIX) \ -+ dlangb.$(SUFFIX) dlange.$(SUFFIX) dlangt.$(SUFFIX) dlanhs.$(SUFFIX) dlansb.$(SUFFIX) dlansp.$(SUFFIX) \ -+ dlansy.$(SUFFIX) dlantb.$(SUFFIX) dlantp.$(SUFFIX) dlantr.$(SUFFIX) dlanv2.$(SUFFIX) \ -+ dlapll.$(SUFFIX) dlapmt.$(SUFFIX) \ -+ dlaqgb.$(SUFFIX) dlaqge.$(SUFFIX) dlaqp2.$(SUFFIX) dlaqps.$(SUFFIX) dlaqsb.$(SUFFIX) dlaqsp.$(SUFFIX) dlaqsy.$(SUFFIX) \ -+ dlaqr0.$(SUFFIX) dlaqr1.$(SUFFIX) dlaqr2.$(SUFFIX) dlaqr3.$(SUFFIX) dlaqr4.$(SUFFIX) dlaqr5.$(SUFFIX) \ -+ dlaqtr.$(SUFFIX) dlar1v.$(SUFFIX) dlar2v.$(SUFFIX) iladlr.$(SUFFIX) iladlc.$(SUFFIX) \ -+ dlarf.$(SUFFIX) dlarfb.$(SUFFIX) dlarfg.$(SUFFIX) dlarfgp.$(SUFFIX) dlarft.$(SUFFIX) dlarfx.$(SUFFIX) \ -+ dlargv.$(SUFFIX) dlarrv.$(SUFFIX) dlartv.$(SUFFIX) \ -+ dlarz.$(SUFFIX) dlarzb.$(SUFFIX) dlarzt.$(SUFFIX) dlasy2.$(SUFFIX) dlasyf.$(SUFFIX) \ -+ dlatbs.$(SUFFIX) dlatdf.$(SUFFIX) dlatps.$(SUFFIX) dlatrd.$(SUFFIX) dlatrs.$(SUFFIX) dlatrz.$(SUFFIX) dlatzm.$(SUFFIX) \ -+ dopgtr.$(SUFFIX) dopmtr.$(SUFFIX) dorg2l.$(SUFFIX) dorg2r.$(SUFFIX) \ -+ dorgbr.$(SUFFIX) dorghr.$(SUFFIX) dorgl2.$(SUFFIX) dorglq.$(SUFFIX) dorgql.$(SUFFIX) dorgqr.$(SUFFIX) dorgr2.$(SUFFIX) \ -+ dorgrq.$(SUFFIX) dorgtr.$(SUFFIX) dorm2l.$(SUFFIX) dorm2r.$(SUFFIX) \ -+ dormbr.$(SUFFIX) dormhr.$(SUFFIX) dorml2.$(SUFFIX) dormlq.$(SUFFIX) dormql.$(SUFFIX) dormqr.$(SUFFIX) dormr2.$(SUFFIX) \ -+ dormr3.$(SUFFIX) dormrq.$(SUFFIX) dormrz.$(SUFFIX) dormtr.$(SUFFIX) dpbcon.$(SUFFIX) dpbequ.$(SUFFIX) dpbrfs.$(SUFFIX) \ -+ dpbstf.$(SUFFIX) dpbsv.$(SUFFIX) dpbsvx.$(SUFFIX) \ -+ dpbtf2.$(SUFFIX) dpbtrf.$(SUFFIX) dpbtrs.$(SUFFIX) dpocon.$(SUFFIX) dpoequ.$(SUFFIX) dporfs.$(SUFFIX) dposv.$(SUFFIX) \ -+ dposvx.$(SUFFIX) dpotri.$(SUFFIX) dpotrs.$(SUFFIX) dpstrf.$(SUFFIX) dpstf2.$(SUFFIX) \ -+ dppcon.$(SUFFIX) dppequ.$(SUFFIX) \ -+ dpprfs.$(SUFFIX) dppsv.$(SUFFIX) dppsvx.$(SUFFIX) dpptrf.$(SUFFIX) dpptri.$(SUFFIX) dpptrs.$(SUFFIX) dptcon.$(SUFFIX) \ -+ dpteqr.$(SUFFIX) dptrfs.$(SUFFIX) dptsv.$(SUFFIX) dptsvx.$(SUFFIX) dpttrs.$(SUFFIX) dptts2.$(SUFFIX) drscl.$(SUFFIX) \ -+ dsbev.$(SUFFIX) dsbevd.$(SUFFIX) dsbevx.$(SUFFIX) dsbgst.$(SUFFIX) dsbgv.$(SUFFIX) dsbgvd.$(SUFFIX) dsbgvx.$(SUFFIX) \ -+ dsbtrd.$(SUFFIX) dspcon.$(SUFFIX) dspev.$(SUFFIX) dspevd.$(SUFFIX) dspevx.$(SUFFIX) dspgst.$(SUFFIX) \ -+ dspgv.$(SUFFIX) dspgvd.$(SUFFIX) dspgvx.$(SUFFIX) dsprfs.$(SUFFIX) dspsv.$(SUFFIX) dspsvx.$(SUFFIX) dsptrd.$(SUFFIX) \ -+ dsptrf.$(SUFFIX) dsptri.$(SUFFIX) dsptrs.$(SUFFIX) dstegr.$(SUFFIX) dstein.$(SUFFIX) dstev.$(SUFFIX) dstevd.$(SUFFIX) dstevr.$(SUFFIX) \ -+ dstevx.$(SUFFIX) dsycon.$(SUFFIX) dsyev.$(SUFFIX) dsyevd.$(SUFFIX) dsyevr.$(SUFFIX) \ -+ dsyevx.$(SUFFIX) dsygs2.$(SUFFIX) dsygst.$(SUFFIX) dsygv.$(SUFFIX) dsygvd.$(SUFFIX) dsygvx.$(SUFFIX) dsyrfs.$(SUFFIX) \ -+ dsysv.$(SUFFIX) dsysvx.$(SUFFIX) \ -+ dsytd2.$(SUFFIX) dsytf2.$(SUFFIX) dsytrd.$(SUFFIX) dsytrf.$(SUFFIX) dsytri.$(SUFFIX) dsytri2.$(SUFFIX) dsytri2x.$(SUFFIX) \ -+ dsyswapr.$(SUFFIX) dsytrs.$(SUFFIX) dsytrs2.$(SUFFIX) dsyconv.$(SUFFIX) dtbcon.$(SUFFIX) \ -+ dtbrfs.$(SUFFIX) dtbtrs.$(SUFFIX) dtgevc.$(SUFFIX) dtgex2.$(SUFFIX) dtgexc.$(SUFFIX) dtgsen.$(SUFFIX) \ -+ dtgsja.$(SUFFIX) dtgsna.$(SUFFIX) dtgsy2.$(SUFFIX) dtgsyl.$(SUFFIX) dtpcon.$(SUFFIX) dtprfs.$(SUFFIX) dtptri.$(SUFFIX) \ -+ dtptrs.$(SUFFIX) \ -+ dtrcon.$(SUFFIX) dtrevc.$(SUFFIX) dtrexc.$(SUFFIX) dtrrfs.$(SUFFIX) dtrsen.$(SUFFIX) dtrsna.$(SUFFIX) dtrsyl.$(SUFFIX) \ -+ dtrtrs.$(SUFFIX) dtzrqf.$(SUFFIX) dtzrzf.$(SUFFIX) dstemr.$(SUFFIX) \ -+ dsgesv.$(SUFFIX) dsposv.$(SUFFIX) dlag2s.$(SUFFIX) slag2d.$(SUFFIX) dlat2s.$(SUFFIX) \ -+ dlansf.$(SUFFIX) dpftrf.$(SUFFIX) dpftri.$(SUFFIX) dpftrs.$(SUFFIX) dsfrk.$(SUFFIX) dtfsm.$(SUFFIX) dtftri.$(SUFFIX) dtfttp.$(SUFFIX) \ -+ dtfttr.$(SUFFIX) dtpttf.$(SUFFIX) dtpttr.$(SUFFIX) dtrttf.$(SUFFIX) dtrttp.$(SUFFIX) \ -+ dgejsv.$(SUFFIX) dgesvj.$(SUFFIX) dgsvj0.$(SUFFIX) dgsvj1.$(SUFFIX) \ -+ dgeequb.$(SUFFIX) dsyequb.$(SUFFIX) dpoequb.$(SUFFIX) dgbequb.$(SUFFIX) \ -+ dbbcsd.$(SUFFIX) dlapmr.$(SUFFIX) dorbdb.$(SUFFIX) dorcsd.$(SUFFIX) \ -+ dgeqrt.$(SUFFIX) dgeqrt2.$(SUFFIX) dgeqrt3.$(SUFFIX) dgemqrt.$(SUFFIX) \ -+ dtpqrt.$(SUFFIX) dtpqrt2.$(SUFFIX) dtpmqrt.$(SUFFIX) dtprfb.$(SUFFIX) - - ifdef USEXBLAS --DXLASRC = dgesvxx.o dgerfsx.o dla_gerfsx_extended.o dla_geamv.o \ -- dla_gercond.o dla_gerpvgrw.o dsysvxx.o dsyrfsx.o \ -- dla_syrfsx_extended.o dla_syamv.o dla_syrcond.o dla_syrpvgrw.o \ -- dposvxx.o dporfsx.o dla_porfsx_extended.o dla_porcond.o \ -- dla_porpvgrw.o dgbsvxx.o dgbrfsx.o dla_gbrfsx_extended.o \ -- dla_gbamv.o dla_gbrcond.o dla_gbrpvgrw.o dla_lin_berr.o dlarscl2.o \ -- dlascl2.o dla_wwaddw.o -+DXLASRC = dgesvxx.$(SUFFIX) dgerfsx.$(SUFFIX) dla_gerfsx_extended.$(SUFFIX) dla_geamv.$(SUFFIX) \ -+ dla_gercond.$(SUFFIX) dla_gerpvgrw.$(SUFFIX) dsysvxx.$(SUFFIX) dsyrfsx.$(SUFFIX) \ -+ dla_syrfsx_extended.$(SUFFIX) dla_syamv.$(SUFFIX) dla_syrcond.$(SUFFIX) dla_syrpvgrw.$(SUFFIX) \ -+ dposvxx.$(SUFFIX) dporfsx.$(SUFFIX) dla_porfsx_extended.$(SUFFIX) dla_porcond.$(SUFFIX) \ -+ dla_porpvgrw.$(SUFFIX) dgbsvxx.$(SUFFIX) dgbrfsx.$(SUFFIX) dla_gbrfsx_extended.$(SUFFIX) \ -+ dla_gbamv.$(SUFFIX) dla_gbrcond.$(SUFFIX) dla_gbrpvgrw.$(SUFFIX) dla_lin_berr.$(SUFFIX) dlarscl2.$(SUFFIX) \ -+ dlascl2.$(SUFFIX) dla_wwaddw.$(SUFFIX) - endif - - ZLASRC = \ -- zbdsqr.o zgbbrd.o zgbcon.o zgbequ.o zgbrfs.o zgbsv.o zgbsvx.o \ -- zgbtf2.o zgbtrf.o zgbtrs.o zgebak.o zgebal.o zgebd2.o zgebrd.o \ -- zgecon.o zgeequ.o zgees.o zgeesx.o zgeev.o zgeevx.o \ -- zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ -- zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ -- zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ -- zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ -- zgetri.o zgetrs.o \ -- zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ -- zgghrd.o zgglse.o zggqrf.o zggrqf.o \ -- zggsvd.o zggsvp.o \ -- zgtcon.o zgtrfs.o zgtsv.o zgtsvx.o zgttrf.o zgttrs.o zgtts2.o zhbev.o \ -- zhbevd.o zhbevx.o zhbgst.o zhbgv.o zhbgvd.o zhbgvx.o zhbtrd.o \ -- zhecon.o zheev.o zheevd.o zheevr.o zheevx.o zhegs2.o zhegst.o \ -- zhegv.o zhegvd.o zhegvx.o zherfs.o zhesv.o zhesvx.o zhetd2.o \ -- zhetf2.o zhetrd.o \ -- zhetrf.o zhetri.o zhetri2.o zhetri2x.o zheswapr.o \ -- zhetrs.o zhetrs2.o zhgeqz.o zhpcon.o zhpev.o zhpevd.o \ -- zhpevx.o zhpgst.o zhpgv.o zhpgvd.o zhpgvx.o zhprfs.o zhpsv.o \ -- zhpsvx.o \ -- zhptrd.o zhptrf.o zhptri.o zhptrs.o zhsein.o zhseqr.o zlabrd.o \ -- zlacgv.o zlacon.o zlacn2.o zlacp2.o zlacpy.o zlacrm.o zlacrt.o zladiv.o \ -- zlaed0.o zlaed7.o zlaed8.o \ -- zlaein.o zlaesy.o zlaev2.o zlags2.o zlagtm.o \ -- zlahef.o zlahqr.o \ -- zlahrd.o zlahr2.o zlaic1.o zlals0.o zlalsa.o zlalsd.o zlangb.o zlange.o \ -- zlangt.o zlanhb.o \ -- zlanhe.o \ -- zlanhp.o zlanhs.o zlanht.o zlansb.o zlansp.o zlansy.o zlantb.o \ -- zlantp.o zlantr.o zlapll.o zlapmt.o zlaqgb.o zlaqge.o \ -- zlaqhb.o zlaqhe.o zlaqhp.o zlaqp2.o zlaqps.o zlaqsb.o \ -- zlaqr0.o zlaqr1.o zlaqr2.o zlaqr3.o zlaqr4.o zlaqr5.o \ -- zlaqsp.o zlaqsy.o zlar1v.o zlar2v.o ilazlr.o ilazlc.o \ -- zlarcm.o zlarf.o zlarfb.o \ -- zlarfg.o zlarft.o zlarfgp.o \ -- zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ -- zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ -- zlassq.o zlaswp.o zlasyf.o \ -- zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ -- zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ -- zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ -- zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ -- zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ -- zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ -- zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ -- zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \ -- zstegr.o zstein.o zsteqr.o zsycon.o zsymv.o \ -- zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \ -- zsyswapr.o zsytrs.o zsytrs2.o zsyconv.o ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \ -- ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ -- ztprfs.o ztptri.o \ -- ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ -- ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ -- zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ -- zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ -- zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ -- zunmtr.o zupgtr.o \ -- zupmtr.o izmax1.o dzsum1.o zstemr.o \ -- zcgesv.o zcposv.o zlag2c.o clag2z.o zlat2c.o \ -- zhfrk.o ztfttp.o zlanhf.o zpftrf.o zpftri.o zpftrs.o ztfsm.o ztftri.o \ -- ztfttr.o ztpttf.o ztpttr.o ztrttf.o ztrttp.o \ -- zgeequb.o zgbequb.o zsyequb.o zpoequb.o zheequb.o \ -- zbbcsd.o zlapmr.o zunbdb.o zuncsd.o \ -- zgeqrt.o zgeqrt2.o zgeqrt3.o zgemqrt.o \ -- ztpqrt.o ztpqrt2.o ztpmqrt.o ztprfb.o -+ zbdsqr.$(SUFFIX) zgbbrd.$(SUFFIX) zgbcon.$(SUFFIX) zgbequ.$(SUFFIX) zgbrfs.$(SUFFIX) zgbsv.$(SUFFIX) zgbsvx.$(SUFFIX) \ -+ zgbtf2.$(SUFFIX) zgbtrf.$(SUFFIX) zgbtrs.$(SUFFIX) zgebak.$(SUFFIX) zgebal.$(SUFFIX) zgebd2.$(SUFFIX) zgebrd.$(SUFFIX) \ -+ zgecon.$(SUFFIX) zgeequ.$(SUFFIX) zgees.$(SUFFIX) zgeesx.$(SUFFIX) zgeev.$(SUFFIX) zgeevx.$(SUFFIX) \ -+ zgegs.$(SUFFIX) zgegv.$(SUFFIX) zgehd2.$(SUFFIX) zgehrd.$(SUFFIX) zgelq2.$(SUFFIX) zgelqf.$(SUFFIX) \ -+ zgels.$(SUFFIX) zgelsd.$(SUFFIX) zgelss.$(SUFFIX) zgelsx.$(SUFFIX) zgelsy.$(SUFFIX) zgeql2.$(SUFFIX) zgeqlf.$(SUFFIX) zgeqp3.$(SUFFIX) \ -+ zgeqpf.$(SUFFIX) zgeqr2.$(SUFFIX) zgeqr2p.$(SUFFIX) zgeqrf.$(SUFFIX) zgeqrfp.$(SUFFIX) zgerfs.$(SUFFIX) zgerq2.$(SUFFIX) zgerqf.$(SUFFIX) \ -+ zgesc2.$(SUFFIX) zgesdd.$(SUFFIX) zgesv.$(SUFFIX) zgesvd.$(SUFFIX) zgesvx.$(SUFFIX) zgetc2.$(SUFFIX) \ -+ zgetri.$(SUFFIX) \ -+ zggbak.$(SUFFIX) zggbal.$(SUFFIX) zgges.$(SUFFIX) zggesx.$(SUFFIX) zggev.$(SUFFIX) zggevx.$(SUFFIX) zggglm.$(SUFFIX) \ -+ zgghrd.$(SUFFIX) zgglse.$(SUFFIX) zggqrf.$(SUFFIX) zggrqf.$(SUFFIX) \ -+ zggsvd.$(SUFFIX) zggsvp.$(SUFFIX) \ -+ zgtcon.$(SUFFIX) zgtrfs.$(SUFFIX) zgtsv.$(SUFFIX) zgtsvx.$(SUFFIX) zgttrf.$(SUFFIX) zgttrs.$(SUFFIX) zgtts2.$(SUFFIX) zhbev.$(SUFFIX) \ -+ zhbevd.$(SUFFIX) zhbevx.$(SUFFIX) zhbgst.$(SUFFIX) zhbgv.$(SUFFIX) zhbgvd.$(SUFFIX) zhbgvx.$(SUFFIX) zhbtrd.$(SUFFIX) \ -+ zhecon.$(SUFFIX) zheev.$(SUFFIX) zheevd.$(SUFFIX) zheevr.$(SUFFIX) zheevx.$(SUFFIX) zhegs2.$(SUFFIX) zhegst.$(SUFFIX) \ -+ zhegv.$(SUFFIX) zhegvd.$(SUFFIX) zhegvx.$(SUFFIX) zherfs.$(SUFFIX) zhesv.$(SUFFIX) zhesvx.$(SUFFIX) zhetd2.$(SUFFIX) \ -+ zhetf2.$(SUFFIX) zhetrd.$(SUFFIX) \ -+ zhetrf.$(SUFFIX) zhetri.$(SUFFIX) zhetri2.$(SUFFIX) zhetri2x.$(SUFFIX) zheswapr.$(SUFFIX) \ -+ zhetrs.$(SUFFIX) zhetrs2.$(SUFFIX) zhgeqz.$(SUFFIX) zhpcon.$(SUFFIX) zhpev.$(SUFFIX) zhpevd.$(SUFFIX) \ -+ zhpevx.$(SUFFIX) zhpgst.$(SUFFIX) zhpgv.$(SUFFIX) zhpgvd.$(SUFFIX) zhpgvx.$(SUFFIX) zhprfs.$(SUFFIX) zhpsv.$(SUFFIX) \ -+ zhpsvx.$(SUFFIX) \ -+ zhptrd.$(SUFFIX) zhptrf.$(SUFFIX) zhptri.$(SUFFIX) zhptrs.$(SUFFIX) zhsein.$(SUFFIX) zhseqr.$(SUFFIX) zlabrd.$(SUFFIX) \ -+ zlacgv.$(SUFFIX) zlacon.$(SUFFIX) zlacn2.$(SUFFIX) zlacp2.$(SUFFIX) zlacpy.$(SUFFIX) zlacrm.$(SUFFIX) zlacrt.$(SUFFIX) zladiv.$(SUFFIX) \ -+ zlaed0.$(SUFFIX) zlaed7.$(SUFFIX) zlaed8.$(SUFFIX) \ -+ zlaein.$(SUFFIX) zlaesy.$(SUFFIX) zlaev2.$(SUFFIX) zlags2.$(SUFFIX) zlagtm.$(SUFFIX) \ -+ zlahef.$(SUFFIX) zlahqr.$(SUFFIX) \ -+ zlahrd.$(SUFFIX) zlahr2.$(SUFFIX) zlaic1.$(SUFFIX) zlals0.$(SUFFIX) zlalsa.$(SUFFIX) zlalsd.$(SUFFIX) zlangb.$(SUFFIX) zlange.$(SUFFIX) \ -+ zlangt.$(SUFFIX) zlanhb.$(SUFFIX) \ -+ zlanhe.$(SUFFIX) \ -+ zlanhp.$(SUFFIX) zlanhs.$(SUFFIX) zlanht.$(SUFFIX) zlansb.$(SUFFIX) zlansp.$(SUFFIX) zlansy.$(SUFFIX) zlantb.$(SUFFIX) \ -+ zlantp.$(SUFFIX) zlantr.$(SUFFIX) zlapll.$(SUFFIX) zlapmt.$(SUFFIX) zlaqgb.$(SUFFIX) zlaqge.$(SUFFIX) \ -+ zlaqhb.$(SUFFIX) zlaqhe.$(SUFFIX) zlaqhp.$(SUFFIX) zlaqp2.$(SUFFIX) zlaqps.$(SUFFIX) zlaqsb.$(SUFFIX) \ -+ zlaqr0.$(SUFFIX) zlaqr1.$(SUFFIX) zlaqr2.$(SUFFIX) zlaqr3.$(SUFFIX) zlaqr4.$(SUFFIX) zlaqr5.$(SUFFIX) \ -+ zlaqsp.$(SUFFIX) zlaqsy.$(SUFFIX) zlar1v.$(SUFFIX) zlar2v.$(SUFFIX) ilazlr.$(SUFFIX) ilazlc.$(SUFFIX) \ -+ zlarcm.$(SUFFIX) zlarf.$(SUFFIX) zlarfb.$(SUFFIX) \ -+ zlarfg.$(SUFFIX) zlarft.$(SUFFIX) zlarfgp.$(SUFFIX) \ -+ zlarfx.$(SUFFIX) zlargv.$(SUFFIX) zlarnv.$(SUFFIX) zlarrv.$(SUFFIX) zlartg.$(SUFFIX) zlartv.$(SUFFIX) \ -+ zlarz.$(SUFFIX) zlarzb.$(SUFFIX) zlarzt.$(SUFFIX) zlascl.$(SUFFIX) zlaset.$(SUFFIX) zlasr.$(SUFFIX) \ -+ zlassq.$(SUFFIX) zlasyf.$(SUFFIX) \ -+ zlatbs.$(SUFFIX) zlatdf.$(SUFFIX) zlatps.$(SUFFIX) zlatrd.$(SUFFIX) zlatrs.$(SUFFIX) zlatrz.$(SUFFIX) zlatzm.$(SUFFIX) \ -+ zpbcon.$(SUFFIX) zpbequ.$(SUFFIX) zpbrfs.$(SUFFIX) zpbstf.$(SUFFIX) zpbsv.$(SUFFIX) \ -+ zpbsvx.$(SUFFIX) zpbtf2.$(SUFFIX) zpbtrf.$(SUFFIX) zpbtrs.$(SUFFIX) zpocon.$(SUFFIX) zpoequ.$(SUFFIX) zporfs.$(SUFFIX) \ -+ zposv.$(SUFFIX) zposvx.$(SUFFIX) zpotri.$(SUFFIX) zpotrs.$(SUFFIX) zpstrf.$(SUFFIX) zpstf2.$(SUFFIX) \ -+ zppcon.$(SUFFIX) zppequ.$(SUFFIX) zpprfs.$(SUFFIX) zppsv.$(SUFFIX) zppsvx.$(SUFFIX) zpptrf.$(SUFFIX) zpptri.$(SUFFIX) zpptrs.$(SUFFIX) \ -+ zptcon.$(SUFFIX) zpteqr.$(SUFFIX) zptrfs.$(SUFFIX) zptsv.$(SUFFIX) zptsvx.$(SUFFIX) zpttrf.$(SUFFIX) zpttrs.$(SUFFIX) zptts2.$(SUFFIX) \ -+ zrot.$(SUFFIX) zspcon.$(SUFFIX) zspmv.$(SUFFIX) zspr.$(SUFFIX) zsprfs.$(SUFFIX) zspsv.$(SUFFIX) \ -+ zspsvx.$(SUFFIX) zsptrf.$(SUFFIX) zsptri.$(SUFFIX) zsptrs.$(SUFFIX) zdrscl.$(SUFFIX) zstedc.$(SUFFIX) \ -+ zstegr.$(SUFFIX) zstein.$(SUFFIX) zsteqr.$(SUFFIX) zsycon.$(SUFFIX) zsymv.$(SUFFIX) \ -+ zsyr.$(SUFFIX) zsyrfs.$(SUFFIX) zsysv.$(SUFFIX) zsysvx.$(SUFFIX) zsytf2.$(SUFFIX) zsytrf.$(SUFFIX) zsytri.$(SUFFIX) zsytri2.$(SUFFIX) zsytri2x.$(SUFFIX) \ -+ zsyswapr.$(SUFFIX) zsytrs.$(SUFFIX) zsytrs2.$(SUFFIX) zsyconv.$(SUFFIX) ztbcon.$(SUFFIX) ztbrfs.$(SUFFIX) ztbtrs.$(SUFFIX) ztgevc.$(SUFFIX) ztgex2.$(SUFFIX) \ -+ ztgexc.$(SUFFIX) ztgsen.$(SUFFIX) ztgsja.$(SUFFIX) ztgsna.$(SUFFIX) ztgsy2.$(SUFFIX) ztgsyl.$(SUFFIX) ztpcon.$(SUFFIX) \ -+ ztprfs.$(SUFFIX) ztptri.$(SUFFIX) \ -+ ztptrs.$(SUFFIX) ztrcon.$(SUFFIX) ztrevc.$(SUFFIX) ztrexc.$(SUFFIX) ztrrfs.$(SUFFIX) ztrsen.$(SUFFIX) ztrsna.$(SUFFIX) \ -+ ztrsyl.$(SUFFIX) ztrtrs.$(SUFFIX) ztzrqf.$(SUFFIX) ztzrzf.$(SUFFIX) zung2l.$(SUFFIX) \ -+ zung2r.$(SUFFIX) zungbr.$(SUFFIX) zunghr.$(SUFFIX) zungl2.$(SUFFIX) zunglq.$(SUFFIX) zungql.$(SUFFIX) zungqr.$(SUFFIX) zungr2.$(SUFFIX) \ -+ zungrq.$(SUFFIX) zungtr.$(SUFFIX) zunm2l.$(SUFFIX) zunm2r.$(SUFFIX) zunmbr.$(SUFFIX) zunmhr.$(SUFFIX) zunml2.$(SUFFIX) \ -+ zunmlq.$(SUFFIX) zunmql.$(SUFFIX) zunmqr.$(SUFFIX) zunmr2.$(SUFFIX) zunmr3.$(SUFFIX) zunmrq.$(SUFFIX) zunmrz.$(SUFFIX) \ -+ zunmtr.$(SUFFIX) zupgtr.$(SUFFIX) \ -+ zupmtr.$(SUFFIX) izmax1.$(SUFFIX) dzsum1.$(SUFFIX) zstemr.$(SUFFIX) \ -+ zcgesv.$(SUFFIX) zcposv.$(SUFFIX) zlag2c.$(SUFFIX) clag2z.$(SUFFIX) zlat2c.$(SUFFIX) \ -+ zhfrk.$(SUFFIX) ztfttp.$(SUFFIX) zlanhf.$(SUFFIX) zpftrf.$(SUFFIX) zpftri.$(SUFFIX) zpftrs.$(SUFFIX) ztfsm.$(SUFFIX) ztftri.$(SUFFIX) \ -+ ztfttr.$(SUFFIX) ztpttf.$(SUFFIX) ztpttr.$(SUFFIX) ztrttf.$(SUFFIX) ztrttp.$(SUFFIX) \ -+ zgeequb.$(SUFFIX) zgbequb.$(SUFFIX) zsyequb.$(SUFFIX) zpoequb.$(SUFFIX) zheequb.$(SUFFIX) \ -+ zbbcsd.$(SUFFIX) zlapmr.$(SUFFIX) zunbdb.$(SUFFIX) zuncsd.$(SUFFIX) \ -+ zgeqrt.$(SUFFIX) zgeqrt2.$(SUFFIX) zgeqrt3.$(SUFFIX) zgemqrt.$(SUFFIX) \ -+ ztpqrt.$(SUFFIX) ztpqrt2.$(SUFFIX) ztpmqrt.$(SUFFIX) ztprfb.$(SUFFIX) - - ifdef USEXBLAS --ZXLASRC = zgesvxx.o zgerfsx.o zla_gerfsx_extended.o zla_geamv.o \ -- zla_gercond_c.o zla_gercond_x.o zla_gerpvgrw.o zsysvxx.o zsyrfsx.o \ -- zla_syrfsx_extended.o zla_syamv.o zla_syrcond_c.o zla_syrcond_x.o \ -- zla_syrpvgrw.o zposvxx.o zporfsx.o zla_porfsx_extended.o \ -- zla_porcond_c.o zla_porcond_x.o zla_porpvgrw.o zgbsvxx.o zgbrfsx.o \ -- zla_gbrfsx_extended.o zla_gbamv.o zla_gbrcond_c.o zla_gbrcond_x.o \ -- zla_gbrpvgrw.o zhesvxx.o zherfsx.o zla_herfsx_extended.o \ -- zla_heamv.o zla_hercond_c.o zla_hercond_x.o zla_herpvgrw.o \ -- zla_lin_berr.o zlarscl2.o zlascl2.o zla_wwaddw.o -+ZXLASRC = zgesvxx.$(SUFFIX) zgerfsx.$(SUFFIX) zla_gerfsx_extended.$(SUFFIX) zla_geamv.$(SUFFIX) \ -+ zla_gercond_c.$(SUFFIX) zla_gercond_x.$(SUFFIX) zla_gerpvgrw.$(SUFFIX) zsysvxx.$(SUFFIX) zsyrfsx.$(SUFFIX) \ -+ zla_syrfsx_extended.$(SUFFIX) zla_syamv.$(SUFFIX) zla_syrcond_c.$(SUFFIX) zla_syrcond_x.$(SUFFIX) \ -+ zla_syrpvgrw.$(SUFFIX) zposvxx.$(SUFFIX) zporfsx.$(SUFFIX) zla_porfsx_extended.$(SUFFIX) \ -+ zla_porcond_c.$(SUFFIX) zla_porcond_x.$(SUFFIX) zla_porpvgrw.$(SUFFIX) zgbsvxx.$(SUFFIX) zgbrfsx.$(SUFFIX) \ -+ zla_gbrfsx_extended.$(SUFFIX) zla_gbamv.$(SUFFIX) zla_gbrcond_c.$(SUFFIX) zla_gbrcond_x.$(SUFFIX) \ -+ zla_gbrpvgrw.$(SUFFIX) zhesvxx.$(SUFFIX) zherfsx.$(SUFFIX) zla_herfsx_extended.$(SUFFIX) \ -+ zla_heamv.$(SUFFIX) zla_hercond_c.$(SUFFIX) zla_hercond_x.$(SUFFIX) zla_herpvgrw.$(SUFFIX) \ -+ zla_lin_berr.$(SUFFIX) zlarscl2.$(SUFFIX) zlascl2.$(SUFFIX) zla_wwaddw.$(SUFFIX) - endif - - ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \ - $(SCLAUX) $(DZLAUX) $(ALLAUX) - -+ALLOBJ_P = $(ALLOBJ:.$(SUFFIX)=.$(PSUFFIX)) -+ - ifdef USEXBLAS - ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) - endif - - all: ../$(LAPACKLIB) - -+lapack_prof: ../$(LAPACKLIB_P) -+ - ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) - $(RANLIB) $@ - -+../$(LAPACKLIB_P): $(ALLOBJ_P) -+ $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ_P) -+ $(RANLIB) $@ -+ - single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \ - $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX) -@@ -444,15 +452,25 @@ - @FRC=$(FRC) - - clean: -- rm -f *.o -+ rm -f *.$(SUFFIX) *.$(PSUFFIX) - --.f.o: -+%.$(SUFFIX): %.f - $(FORTRAN) $(OPTS) -c $< -o $@ - --slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --zla_wwaddw.o: zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ -+%.$(PSUFFIX): %.f -+ $(FORTRAN) $(POPTS) -c $< -o $@ -+ - -+slaruv.$(SUFFIX): slaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dlaruv.$(SUFFIX): dlaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(SUFFIX): sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(SUFFIX): dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(SUFFIX): cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(SUFFIX): zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+ -+slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(PSUFFIX): sla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(PSUFFIX): dla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(PSUFFIX): cla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(PSUFFIX): zla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ - -diff -ruN lapack-3.4.0.old/TESTING/EIG/Makefile lapack-3.4.0/TESTING/EIG/Makefile ---- lapack-3.4.0.old/TESTING/EIG/Makefile 2011-09-27 05:52:31.000000000 +0800 -+++ lapack-3.4.0/TESTING/EIG/Makefile 2011-11-28 14:59:56.324827994 +0800 -@@ -78,7 +78,7 @@ - cget35.o cget36.o cget37.o cget38.o cget51.o cget52.o \ - cget54.o cglmts.o cgqrts.o cgrqts.o cgsvts.o \ - chbt21.o chet21.o chet22.o chpt21.o chst01.o \ -- clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o csbmv.o \ -+ clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o \ - csgt01.o cslect.o \ - cstt21.o cstt22.o cunt01.o cunt03.o - -@@ -115,7 +115,7 @@ - zget35.o zget36.o zget37.o zget38.o zget51.o zget52.o \ - zget54.o zglmts.o zgqrts.o zgrqts.o zgsvts.o \ - zhbt21.o zhet21.o zhet22.o zhpt21.o zhst01.o \ -- zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o zsbmv.o \ -+ zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o \ - zsgt01.o zslect.o \ - zstt21.o zstt22.o zunt01.o zunt03.o - -@@ -129,22 +129,22 @@ - ../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtsts \ - $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtsts $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtsts $@ - - ../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstc \ - $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstc $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstc $@ - - ../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstd \ - $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstd $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstd $@ - - ../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstz \ - $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstz $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstz $@ - - $(AEIGTST): $(FRC) - $(SCIGTST): $(FRC) -diff -ruN lapack-3.4.0.old/TESTING/LIN/Makefile lapack-3.4.0/TESTING/LIN/Makefile ---- lapack-3.4.0.old/TESTING/LIN/Makefile 2011-11-01 06:21:11.000000000 +0800 -+++ lapack-3.4.0/TESTING/LIN/Makefile 2011-11-28 15:14:55.804828003 +0800 -@@ -109,7 +109,7 @@ - cqpt01.o cqrt01.o cqrt01p.o cqrt02.o cqrt03.o cqrt11.o \ - cqrt12.o cqrt13.o cqrt14.o cqrt15.o cqrt16.o \ - cqrt17.o crqt01.o crqt02.o crqt03.o crzt01.o crzt02.o \ -- csbmv.o cspt01.o \ -+ cspt01.o \ - cspt02.o cspt03.o csyt01.o csyt02.o csyt03.o \ - ctbt02.o ctbt03.o ctbt05.o ctbt06.o ctpt01.o \ - ctpt02.o ctpt03.o ctpt05.o ctpt06.o ctrt01.o \ -@@ -186,7 +186,7 @@ - zqpt01.o zqrt01.o zqrt01p.o zqrt02.o zqrt03.o zqrt11.o \ - zqrt12.o zqrt13.o zqrt14.o zqrt15.o zqrt16.o \ - zqrt17.o zrqt01.o zrqt02.o zrqt03.o zrzt01.o zrzt02.o \ -- zsbmv.o zspt01.o \ -+ zspt01.o \ - zspt02.o zspt03.o zsyt01.o zsyt02.o zsyt03.o \ - ztbt02.o ztbt03.o ztbt05.o ztbt06.o ztpt01.o \ - ztpt02.o ztpt03.o ztpt05.o ztpt06.o ztrt01.o \ -@@ -211,7 +211,7 @@ - zdrvab.o zdrvac.o zerrab.o zerrac.o zget08.o \ - alaerh.o alahd.o aladhd.o alareq.o \ - chkxer.o zget02.o zlarhs.o zlatb4.o \ -- zsbmv.o xerbla.o zpot06.o zlaipd.o -+ xerbla.o zpot06.o zlaipd.o - - SLINTSTRFP = schkrfp.o sdrvrfp.o sdrvrf1.o sdrvrf2.o sdrvrf3.o sdrvrf4.o serrrfp.o \ - slatb4.o slarhs.o sget04.o spot01.o spot03.o spot02.o \ -@@ -222,11 +222,11 @@ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - CLINTSTRFP = cchkrfp.o cdrvrfp.o cdrvrf1.o cdrvrf2.o cdrvrf3.o cdrvrf4.o cerrrfp.o \ -- claipd.o clatb4.o clarhs.o csbmv.o cget04.o cpot01.o cpot03.o cpot02.o \ -+ claipd.o clatb4.o clarhs.o cget04.o cpot01.o cpot03.o cpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - ZLINTSTRFP = zchkrfp.o zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp.o \ -- zlatb4.o zlaipd.o zlarhs.o zsbmv.o zget04.o zpot01.o zpot03.o zpot02.o \ -+ zlatb4.o zlaipd.o zlarhs.o zget04.o zpot01.o zpot03.o zpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - all: single double complex complex16 proto-single proto-double proto-complex proto-complex16 -@@ -243,43 +243,43 @@ - - xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $^ \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstds : $(DSLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DSLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstzc : $(ZCLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZCLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfs : $(SLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(SLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfd : $(DLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfc : $(CLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(CLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfz : $(ZLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintsts: xlintsts - mv xlintsts $@ - -diff -ruN lapack-3.4.0.old/lapacke/src/Makefile lapack-3.4.0/lapacke/src/Makefile ---- lapack-3.4.0.old/lapacke/src/Makefile 2011-11-10 06:56:15.000000000 +0800 -+++ lapack-3.4.0/lapacke/src/Makefile 2012-04-13 22:37:09.000000000 +0800 -@@ -35,12 +35,2060 @@ - include ../make.inc - - C_FILES := $(wildcard *.c) --OBJ_FILES := $(C_FILES:.c=.o) -+ -+LAPACKE_OBJS := \ -+lapacke_cbbcsd.o \ -+lapacke_cbbcsd_work.o \ -+lapacke_cbdsqr.o \ -+lapacke_cbdsqr_work.o \ -+lapacke_cgbbrd.o \ -+lapacke_cgbbrd_work.o \ -+lapacke_cgbcon.o \ -+lapacke_cgbcon_work.o \ -+lapacke_cgbequb.o \ -+lapacke_cgbequb_work.o \ -+lapacke_cgbequ.o \ -+lapacke_cgbequ_work.o \ -+lapacke_cgbrfs.o \ -+lapacke_cgbrfs_work.o \ -+lapacke_cgbsv.o \ -+lapacke_cgbsv_work.o \ -+lapacke_cgbsvx.o \ -+lapacke_cgbsvx_work.o \ -+lapacke_cgbtrf.o \ -+lapacke_cgbtrf_work.o \ -+lapacke_cgbtrs.o \ -+lapacke_cgbtrs_work.o \ -+lapacke_cgebak.o \ -+lapacke_cgebak_work.o \ -+lapacke_cgebal.o \ -+lapacke_cgebal_work.o \ -+lapacke_cgebrd.o \ -+lapacke_cgebrd_work.o \ -+lapacke_cgecon.o \ -+lapacke_cgecon_work.o \ -+lapacke_cgeequb.o \ -+lapacke_cgeequb_work.o \ -+lapacke_cgeequ.o \ -+lapacke_cgeequ_work.o \ -+lapacke_cgees.o \ -+lapacke_cgees_work.o \ -+lapacke_cgeesx.o \ -+lapacke_cgeesx_work.o \ -+lapacke_cgeev.o \ -+lapacke_cgeev_work.o \ -+lapacke_cgeevx.o \ -+lapacke_cgeevx_work.o \ -+lapacke_cgehrd.o \ -+lapacke_cgehrd_work.o \ -+lapacke_cgelq2.o \ -+lapacke_cgelq2_work.o \ -+lapacke_cgelqf.o \ -+lapacke_cgelqf_work.o \ -+lapacke_cgels.o \ -+lapacke_cgelsd.o \ -+lapacke_cgelsd_work.o \ -+lapacke_cgelss.o \ -+lapacke_cgelss_work.o \ -+lapacke_cgels_work.o \ -+lapacke_cgelsy.o \ -+lapacke_cgelsy_work.o \ -+lapacke_cgemqrt.o \ -+lapacke_cgemqrt_work.o \ -+lapacke_cgeqlf.o \ -+lapacke_cgeqlf_work.o \ -+lapacke_cgeqp3.o \ -+lapacke_cgeqp3_work.o \ -+lapacke_cgeqpf.o \ -+lapacke_cgeqpf_work.o \ -+lapacke_cgeqr2.o \ -+lapacke_cgeqr2_work.o \ -+lapacke_cgeqrf.o \ -+lapacke_cgeqrfp.o \ -+lapacke_cgeqrfp_work.o \ -+lapacke_cgeqrf_work.o \ -+lapacke_cgeqrt2.o \ -+lapacke_cgeqrt2_work.o \ -+lapacke_cgeqrt3.o \ -+lapacke_cgeqrt3_work.o \ -+lapacke_cgeqrt.o \ -+lapacke_cgeqrt_work.o \ -+lapacke_cgerfs.o \ -+lapacke_cgerfs_work.o \ -+lapacke_cgerqf.o \ -+lapacke_cgerqf_work.o \ -+lapacke_cgesdd.o \ -+lapacke_cgesdd_work.o \ -+lapacke_cgesv.o \ -+lapacke_cgesvd.o \ -+lapacke_cgesvd_work.o \ -+lapacke_cgesv_work.o \ -+lapacke_cgesvx.o \ -+lapacke_cgesvx_work.o \ -+lapacke_cgetf2.o \ -+lapacke_cgetf2_work.o \ -+lapacke_cgetrf.o \ -+lapacke_cgetrf_work.o \ -+lapacke_cgetri.o \ -+lapacke_cgetri_work.o \ -+lapacke_cgetrs.o \ -+lapacke_cgetrs_work.o \ -+lapacke_cggbak.o \ -+lapacke_cggbak_work.o \ -+lapacke_cggbal.o \ -+lapacke_cggbal_work.o \ -+lapacke_cgges.o \ -+lapacke_cgges_work.o \ -+lapacke_cggesx.o \ -+lapacke_cggesx_work.o \ -+lapacke_cggev.o \ -+lapacke_cggev_work.o \ -+lapacke_cggevx.o \ -+lapacke_cggevx_work.o \ -+lapacke_cggglm.o \ -+lapacke_cggglm_work.o \ -+lapacke_cgghrd.o \ -+lapacke_cgghrd_work.o \ -+lapacke_cgglse.o \ -+lapacke_cgglse_work.o \ -+lapacke_cggqrf.o \ -+lapacke_cggqrf_work.o \ -+lapacke_cggrqf.o \ -+lapacke_cggrqf_work.o \ -+lapacke_cggsvd.o \ -+lapacke_cggsvd_work.o \ -+lapacke_cggsvp.o \ -+lapacke_cggsvp_work.o \ -+lapacke_cgtcon.o \ -+lapacke_cgtcon_work.o \ -+lapacke_cgtrfs.o \ -+lapacke_cgtrfs_work.o \ -+lapacke_cgtsv.o \ -+lapacke_cgtsv_work.o \ -+lapacke_cgtsvx.o \ -+lapacke_cgtsvx_work.o \ -+lapacke_cgttrf.o \ -+lapacke_cgttrf_work.o \ -+lapacke_cgttrs.o \ -+lapacke_cgttrs_work.o \ -+lapacke_chbev.o \ -+lapacke_chbevd.o \ -+lapacke_chbevd_work.o \ -+lapacke_chbev_work.o \ -+lapacke_chbevx.o \ -+lapacke_chbevx_work.o \ -+lapacke_chbgst.o \ -+lapacke_chbgst_work.o \ -+lapacke_chbgv.o \ -+lapacke_chbgvd.o \ -+lapacke_chbgvd_work.o \ -+lapacke_chbgv_work.o \ -+lapacke_chbgvx.o \ -+lapacke_chbgvx_work.o \ -+lapacke_chbtrd.o \ -+lapacke_chbtrd_work.o \ -+lapacke_checon.o \ -+lapacke_checon_work.o \ -+lapacke_cheequb.o \ -+lapacke_cheequb_work.o \ -+lapacke_cheev.o \ -+lapacke_cheevd.o \ -+lapacke_cheevd_work.o \ -+lapacke_cheevr.o \ -+lapacke_cheevr_work.o \ -+lapacke_cheev_work.o \ -+lapacke_cheevx.o \ -+lapacke_cheevx_work.o \ -+lapacke_chegst.o \ -+lapacke_chegst_work.o \ -+lapacke_chegv.o \ -+lapacke_chegvd.o \ -+lapacke_chegvd_work.o \ -+lapacke_chegv_work.o \ -+lapacke_chegvx.o \ -+lapacke_chegvx_work.o \ -+lapacke_cherfs.o \ -+lapacke_cherfs_work.o \ -+lapacke_chesv.o \ -+lapacke_chesv_work.o \ -+lapacke_chesvx.o \ -+lapacke_chesvx_work.o \ -+lapacke_cheswapr.o \ -+lapacke_cheswapr_work.o \ -+lapacke_chetrd.o \ -+lapacke_chetrd_work.o \ -+lapacke_chetrf.o \ -+lapacke_chetrf_work.o \ -+lapacke_chetri2.o \ -+lapacke_chetri2_work.o \ -+lapacke_chetri2x.o \ -+lapacke_chetri2x_work.o \ -+lapacke_chetri.o \ -+lapacke_chetri_work.o \ -+lapacke_chetrs2.o \ -+lapacke_chetrs2_work.o \ -+lapacke_chetrs.o \ -+lapacke_chetrs_work.o \ -+lapacke_chfrk.o \ -+lapacke_chfrk_work.o \ -+lapacke_chgeqz.o \ -+lapacke_chgeqz_work.o \ -+lapacke_chpcon.o \ -+lapacke_chpcon_work.o \ -+lapacke_chpev.o \ -+lapacke_chpevd.o \ -+lapacke_chpevd_work.o \ -+lapacke_chpev_work.o \ -+lapacke_chpevx.o \ -+lapacke_chpevx_work.o \ -+lapacke_chpgst.o \ -+lapacke_chpgst_work.o \ -+lapacke_chpgv.o \ -+lapacke_chpgvd.o \ -+lapacke_chpgvd_work.o \ -+lapacke_chpgv_work.o \ -+lapacke_chpgvx.o \ -+lapacke_chpgvx_work.o \ -+lapacke_chprfs.o \ -+lapacke_chprfs_work.o \ -+lapacke_chpsv.o \ -+lapacke_chpsv_work.o \ -+lapacke_chpsvx.o \ -+lapacke_chpsvx_work.o \ -+lapacke_chptrd.o \ -+lapacke_chptrd_work.o \ -+lapacke_chptrf.o \ -+lapacke_chptrf_work.o \ -+lapacke_chptri.o \ -+lapacke_chptri_work.o \ -+lapacke_chptrs.o \ -+lapacke_chptrs_work.o \ -+lapacke_chsein.o \ -+lapacke_chsein_work.o \ -+lapacke_chseqr.o \ -+lapacke_chseqr_work.o \ -+lapacke_clacgv.o \ -+lapacke_clacgv_work.o \ -+lapacke_clacpy.o \ -+lapacke_clacpy_work.o \ -+lapacke_clag2z.o \ -+lapacke_clag2z_work.o \ -+lapacke_clange.o \ -+lapacke_clange_work.o \ -+lapacke_clanhe.o \ -+lapacke_clanhe_work.o \ -+lapacke_clansy.o \ -+lapacke_clansy_work.o \ -+lapacke_clantr.o \ -+lapacke_clantr_work.o \ -+lapacke_clapmr.o \ -+lapacke_clapmr_work.o \ -+lapacke_clarfb.o \ -+lapacke_clarfb_work.o \ -+lapacke_clarfg.o \ -+lapacke_clarfg_work.o \ -+lapacke_clarft.o \ -+lapacke_clarft_work.o \ -+lapacke_clarfx.o \ -+lapacke_clarfx_work.o \ -+lapacke_clarnv.o \ -+lapacke_clarnv_work.o \ -+lapacke_claset.o \ -+lapacke_claset_work.o \ -+lapacke_claswp.o \ -+lapacke_claswp_work.o \ -+lapacke_clauum.o \ -+lapacke_clauum_work.o \ -+lapacke_cpbcon.o \ -+lapacke_cpbcon_work.o \ -+lapacke_cpbequ.o \ -+lapacke_cpbequ_work.o \ -+lapacke_cpbrfs.o \ -+lapacke_cpbrfs_work.o \ -+lapacke_cpbstf.o \ -+lapacke_cpbstf_work.o \ -+lapacke_cpbsv.o \ -+lapacke_cpbsv_work.o \ -+lapacke_cpbsvx.o \ -+lapacke_cpbsvx_work.o \ -+lapacke_cpbtrf.o \ -+lapacke_cpbtrf_work.o \ -+lapacke_cpbtrs.o \ -+lapacke_cpbtrs_work.o \ -+lapacke_cpftrf.o \ -+lapacke_cpftrf_work.o \ -+lapacke_cpftri.o \ -+lapacke_cpftri_work.o \ -+lapacke_cpftrs.o \ -+lapacke_cpftrs_work.o \ -+lapacke_cpocon.o \ -+lapacke_cpocon_work.o \ -+lapacke_cpoequb.o \ -+lapacke_cpoequb_work.o \ -+lapacke_cpoequ.o \ -+lapacke_cpoequ_work.o \ -+lapacke_cporfs.o \ -+lapacke_cporfs_work.o \ -+lapacke_cposv.o \ -+lapacke_cposv_work.o \ -+lapacke_cposvx.o \ -+lapacke_cposvx_work.o \ -+lapacke_cpotrf.o \ -+lapacke_cpotrf_work.o \ -+lapacke_cpotri.o \ -+lapacke_cpotri_work.o \ -+lapacke_cpotrs.o \ -+lapacke_cpotrs_work.o \ -+lapacke_cppcon.o \ -+lapacke_cppcon_work.o \ -+lapacke_cppequ.o \ -+lapacke_cppequ_work.o \ -+lapacke_cpprfs.o \ -+lapacke_cpprfs_work.o \ -+lapacke_cppsv.o \ -+lapacke_cppsv_work.o \ -+lapacke_cppsvx.o \ -+lapacke_cppsvx_work.o \ -+lapacke_cpptrf.o \ -+lapacke_cpptrf_work.o \ -+lapacke_cpptri.o \ -+lapacke_cpptri_work.o \ -+lapacke_cpptrs.o \ -+lapacke_cpptrs_work.o \ -+lapacke_cpstrf.o \ -+lapacke_cpstrf_work.o \ -+lapacke_cptcon.o \ -+lapacke_cptcon_work.o \ -+lapacke_cpteqr.o \ -+lapacke_cpteqr_work.o \ -+lapacke_cptrfs.o \ -+lapacke_cptrfs_work.o \ -+lapacke_cptsv.o \ -+lapacke_cptsv_work.o \ -+lapacke_cptsvx.o \ -+lapacke_cptsvx_work.o \ -+lapacke_cpttrf.o \ -+lapacke_cpttrf_work.o \ -+lapacke_cpttrs.o \ -+lapacke_cpttrs_work.o \ -+lapacke_cspcon.o \ -+lapacke_cspcon_work.o \ -+lapacke_csprfs.o \ -+lapacke_csprfs_work.o \ -+lapacke_cspsv.o \ -+lapacke_cspsv_work.o \ -+lapacke_cspsvx.o \ -+lapacke_cspsvx_work.o \ -+lapacke_csptrf.o \ -+lapacke_csptrf_work.o \ -+lapacke_csptri.o \ -+lapacke_csptri_work.o \ -+lapacke_csptrs.o \ -+lapacke_csptrs_work.o \ -+lapacke_cstedc.o \ -+lapacke_cstedc_work.o \ -+lapacke_cstegr.o \ -+lapacke_cstegr_work.o \ -+lapacke_cstein.o \ -+lapacke_cstein_work.o \ -+lapacke_cstemr.o \ -+lapacke_cstemr_work.o \ -+lapacke_csteqr.o \ -+lapacke_csteqr_work.o \ -+lapacke_csycon.o \ -+lapacke_csyconv.o \ -+lapacke_csyconv_work.o \ -+lapacke_csycon_work.o \ -+lapacke_csyequb.o \ -+lapacke_csyequb_work.o \ -+lapacke_csyrfs.o \ -+lapacke_csyrfs_work.o \ -+lapacke_csysv.o \ -+lapacke_csysv_work.o \ -+lapacke_csysvx.o \ -+lapacke_csysvx_work.o \ -+lapacke_csyswapr.o \ -+lapacke_csyswapr_work.o \ -+lapacke_csytrf.o \ -+lapacke_csytrf_work.o \ -+lapacke_csytri2.o \ -+lapacke_csytri2_work.o \ -+lapacke_csytri2x.o \ -+lapacke_csytri2x_work.o \ -+lapacke_csytri.o \ -+lapacke_csytri_work.o \ -+lapacke_csytrs2.o \ -+lapacke_csytrs2_work.o \ -+lapacke_csytrs.o \ -+lapacke_csytrs_work.o \ -+lapacke_ctbcon.o \ -+lapacke_ctbcon_work.o \ -+lapacke_ctbrfs.o \ -+lapacke_ctbrfs_work.o \ -+lapacke_ctbtrs.o \ -+lapacke_ctbtrs_work.o \ -+lapacke_ctfsm.o \ -+lapacke_ctfsm_work.o \ -+lapacke_ctftri.o \ -+lapacke_ctftri_work.o \ -+lapacke_ctfttp.o \ -+lapacke_ctfttp_work.o \ -+lapacke_ctfttr.o \ -+lapacke_ctfttr_work.o \ -+lapacke_ctgevc.o \ -+lapacke_ctgevc_work.o \ -+lapacke_ctgexc.o \ -+lapacke_ctgexc_work.o \ -+lapacke_ctgsen.o \ -+lapacke_ctgsen_work.o \ -+lapacke_ctgsja.o \ -+lapacke_ctgsja_work.o \ -+lapacke_ctgsna.o \ -+lapacke_ctgsna_work.o \ -+lapacke_ctgsyl.o \ -+lapacke_ctgsyl_work.o \ -+lapacke_ctpcon.o \ -+lapacke_ctpcon_work.o \ -+lapacke_ctpmqrt.o \ -+lapacke_ctpmqrt_work.o \ -+lapacke_ctpqrt2.o \ -+lapacke_ctpqrt2_work.o \ -+lapacke_ctpqrt.o \ -+lapacke_ctpqrt_work.o \ -+lapacke_ctprfb.o \ -+lapacke_ctprfb_work.o \ -+lapacke_ctprfs.o \ -+lapacke_ctprfs_work.o \ -+lapacke_ctptri.o \ -+lapacke_ctptri_work.o \ -+lapacke_ctptrs.o \ -+lapacke_ctptrs_work.o \ -+lapacke_ctpttf.o \ -+lapacke_ctpttf_work.o \ -+lapacke_ctpttr.o \ -+lapacke_ctpttr_work.o \ -+lapacke_ctrcon.o \ -+lapacke_ctrcon_work.o \ -+lapacke_ctrevc.o \ -+lapacke_ctrevc_work.o \ -+lapacke_ctrexc.o \ -+lapacke_ctrexc_work.o \ -+lapacke_ctrrfs.o \ -+lapacke_ctrrfs_work.o \ -+lapacke_ctrsen.o \ -+lapacke_ctrsen_work.o \ -+lapacke_ctrsna.o \ -+lapacke_ctrsna_work.o \ -+lapacke_ctrsyl.o \ -+lapacke_ctrsyl_work.o \ -+lapacke_ctrtri.o \ -+lapacke_ctrtri_work.o \ -+lapacke_ctrtrs.o \ -+lapacke_ctrtrs_work.o \ -+lapacke_ctrttf.o \ -+lapacke_ctrttf_work.o \ -+lapacke_ctrttp.o \ -+lapacke_ctrttp_work.o \ -+lapacke_ctzrzf.o \ -+lapacke_ctzrzf_work.o \ -+lapacke_cunbdb.o \ -+lapacke_cunbdb_work.o \ -+lapacke_cuncsd.o \ -+lapacke_cuncsd_work.o \ -+lapacke_cungbr.o \ -+lapacke_cungbr_work.o \ -+lapacke_cunghr.o \ -+lapacke_cunghr_work.o \ -+lapacke_cunglq.o \ -+lapacke_cunglq_work.o \ -+lapacke_cungql.o \ -+lapacke_cungql_work.o \ -+lapacke_cungqr.o \ -+lapacke_cungqr_work.o \ -+lapacke_cungrq.o \ -+lapacke_cungrq_work.o \ -+lapacke_cungtr.o \ -+lapacke_cungtr_work.o \ -+lapacke_cunmbr.o \ -+lapacke_cunmbr_work.o \ -+lapacke_cunmhr.o \ -+lapacke_cunmhr_work.o \ -+lapacke_cunmlq.o \ -+lapacke_cunmlq_work.o \ -+lapacke_cunmql.o \ -+lapacke_cunmql_work.o \ -+lapacke_cunmqr.o \ -+lapacke_cunmqr_work.o \ -+lapacke_cunmrq.o \ -+lapacke_cunmrq_work.o \ -+lapacke_cunmrz.o \ -+lapacke_cunmrz_work.o \ -+lapacke_cunmtr.o \ -+lapacke_cunmtr_work.o \ -+lapacke_cupgtr.o \ -+lapacke_cupgtr_work.o \ -+lapacke_cupmtr.o \ -+lapacke_cupmtr_work.o \ -+lapacke_dbbcsd.o \ -+lapacke_dbbcsd_work.o \ -+lapacke_dbdsdc.o \ -+lapacke_dbdsdc_work.o \ -+lapacke_dbdsqr.o \ -+lapacke_dbdsqr_work.o \ -+lapacke_ddisna.o \ -+lapacke_ddisna_work.o \ -+lapacke_dgbbrd.o \ -+lapacke_dgbbrd_work.o \ -+lapacke_dgbcon.o \ -+lapacke_dgbcon_work.o \ -+lapacke_dgbequb.o \ -+lapacke_dgbequb_work.o \ -+lapacke_dgbequ.o \ -+lapacke_dgbequ_work.o \ -+lapacke_dgbrfs.o \ -+lapacke_dgbrfs_work.o \ -+lapacke_dgbsv.o \ -+lapacke_dgbsv_work.o \ -+lapacke_dgbsvx.o \ -+lapacke_dgbsvx_work.o \ -+lapacke_dgbtrf.o \ -+lapacke_dgbtrf_work.o \ -+lapacke_dgbtrs.o \ -+lapacke_dgbtrs_work.o \ -+lapacke_dgebak.o \ -+lapacke_dgebak_work.o \ -+lapacke_dgebal.o \ -+lapacke_dgebal_work.o \ -+lapacke_dgebrd.o \ -+lapacke_dgebrd_work.o \ -+lapacke_dgecon.o \ -+lapacke_dgecon_work.o \ -+lapacke_dgeequb.o \ -+lapacke_dgeequb_work.o \ -+lapacke_dgeequ.o \ -+lapacke_dgeequ_work.o \ -+lapacke_dgees.o \ -+lapacke_dgees_work.o \ -+lapacke_dgeesx.o \ -+lapacke_dgeesx_work.o \ -+lapacke_dgeev.o \ -+lapacke_dgeev_work.o \ -+lapacke_dgeevx.o \ -+lapacke_dgeevx_work.o \ -+lapacke_dgehrd.o \ -+lapacke_dgehrd_work.o \ -+lapacke_dgejsv.o \ -+lapacke_dgejsv_work.o \ -+lapacke_dgelq2.o \ -+lapacke_dgelq2_work.o \ -+lapacke_dgelqf.o \ -+lapacke_dgelqf_work.o \ -+lapacke_dgels.o \ -+lapacke_dgelsd.o \ -+lapacke_dgelsd_work.o \ -+lapacke_dgelss.o \ -+lapacke_dgelss_work.o \ -+lapacke_dgels_work.o \ -+lapacke_dgelsy.o \ -+lapacke_dgelsy_work.o \ -+lapacke_dgemqrt.o \ -+lapacke_dgemqrt_work.o \ -+lapacke_dgeqlf.o \ -+lapacke_dgeqlf_work.o \ -+lapacke_dgeqp3.o \ -+lapacke_dgeqp3_work.o \ -+lapacke_dgeqpf.o \ -+lapacke_dgeqpf_work.o \ -+lapacke_dgeqr2.o \ -+lapacke_dgeqr2_work.o \ -+lapacke_dgeqrf.o \ -+lapacke_dgeqrfp.o \ -+lapacke_dgeqrfp_work.o \ -+lapacke_dgeqrf_work.o \ -+lapacke_dgeqrt2.o \ -+lapacke_dgeqrt2_work.o \ -+lapacke_dgeqrt3.o \ -+lapacke_dgeqrt3_work.o \ -+lapacke_dgeqrt.o \ -+lapacke_dgeqrt_work.o \ -+lapacke_dgerfs.o \ -+lapacke_dgerfs_work.o \ -+lapacke_dgerqf.o \ -+lapacke_dgerqf_work.o \ -+lapacke_dgesdd.o \ -+lapacke_dgesdd_work.o \ -+lapacke_dgesv.o \ -+lapacke_dgesvd.o \ -+lapacke_dgesvd_work.o \ -+lapacke_dgesvj.o \ -+lapacke_dgesvj_work.o \ -+lapacke_dgesv_work.o \ -+lapacke_dgesvx.o \ -+lapacke_dgesvx_work.o \ -+lapacke_dgetf2.o \ -+lapacke_dgetf2_work.o \ -+lapacke_dgetrf.o \ -+lapacke_dgetrf_work.o \ -+lapacke_dgetri.o \ -+lapacke_dgetri_work.o \ -+lapacke_dgetrs.o \ -+lapacke_dgetrs_work.o \ -+lapacke_dggbak.o \ -+lapacke_dggbak_work.o \ -+lapacke_dggbal.o \ -+lapacke_dggbal_work.o \ -+lapacke_dgges.o \ -+lapacke_dgges_work.o \ -+lapacke_dggesx.o \ -+lapacke_dggesx_work.o \ -+lapacke_dggev.o \ -+lapacke_dggev_work.o \ -+lapacke_dggevx.o \ -+lapacke_dggevx_work.o \ -+lapacke_dggglm.o \ -+lapacke_dggglm_work.o \ -+lapacke_dgghrd.o \ -+lapacke_dgghrd_work.o \ -+lapacke_dgglse.o \ -+lapacke_dgglse_work.o \ -+lapacke_dggqrf.o \ -+lapacke_dggqrf_work.o \ -+lapacke_dggrqf.o \ -+lapacke_dggrqf_work.o \ -+lapacke_dggsvd.o \ -+lapacke_dggsvd_work.o \ -+lapacke_dggsvp.o \ -+lapacke_dggsvp_work.o \ -+lapacke_dgtcon.o \ -+lapacke_dgtcon_work.o \ -+lapacke_dgtrfs.o \ -+lapacke_dgtrfs_work.o \ -+lapacke_dgtsv.o \ -+lapacke_dgtsv_work.o \ -+lapacke_dgtsvx.o \ -+lapacke_dgtsvx_work.o \ -+lapacke_dgttrf.o \ -+lapacke_dgttrf_work.o \ -+lapacke_dgttrs.o \ -+lapacke_dgttrs_work.o \ -+lapacke_dhgeqz.o \ -+lapacke_dhgeqz_work.o \ -+lapacke_dhsein.o \ -+lapacke_dhsein_work.o \ -+lapacke_dhseqr.o \ -+lapacke_dhseqr_work.o \ -+lapacke_dlacpy.o \ -+lapacke_dlacpy_work.o \ -+lapacke_dlag2s.o \ -+lapacke_dlag2s_work.o \ -+lapacke_dlamch.o \ -+lapacke_dlamch_work.o \ -+lapacke_dlange.o \ -+lapacke_dlange_work.o \ -+lapacke_dlansy.o \ -+lapacke_dlansy_work.o \ -+lapacke_dlantr.o \ -+lapacke_dlantr_work.o \ -+lapacke_dlapmr.o \ -+lapacke_dlapmr_work.o \ -+lapacke_dlapy2.o \ -+lapacke_dlapy2_work.o \ -+lapacke_dlapy3.o \ -+lapacke_dlapy3_work.o \ -+lapacke_dlarfb.o \ -+lapacke_dlarfb_work.o \ -+lapacke_dlarfg.o \ -+lapacke_dlarfg_work.o \ -+lapacke_dlarft.o \ -+lapacke_dlarft_work.o \ -+lapacke_dlarfx.o \ -+lapacke_dlarfx_work.o \ -+lapacke_dlarnv.o \ -+lapacke_dlarnv_work.o \ -+lapacke_dlartgp.o \ -+lapacke_dlartgp_work.o \ -+lapacke_dlartgs.o \ -+lapacke_dlartgs_work.o \ -+lapacke_dlaset.o \ -+lapacke_dlaset_work.o \ -+lapacke_dlasrt.o \ -+lapacke_dlasrt_work.o \ -+lapacke_dlaswp.o \ -+lapacke_dlaswp_work.o \ -+lapacke_dlauum.o \ -+lapacke_dlauum_work.o \ -+lapacke_dopgtr.o \ -+lapacke_dopgtr_work.o \ -+lapacke_dopmtr.o \ -+lapacke_dopmtr_work.o \ -+lapacke_dorbdb.o \ -+lapacke_dorbdb_work.o \ -+lapacke_dorcsd.o \ -+lapacke_dorcsd_work.o \ -+lapacke_dorgbr.o \ -+lapacke_dorgbr_work.o \ -+lapacke_dorghr.o \ -+lapacke_dorghr_work.o \ -+lapacke_dorglq.o \ -+lapacke_dorglq_work.o \ -+lapacke_dorgql.o \ -+lapacke_dorgql_work.o \ -+lapacke_dorgqr.o \ -+lapacke_dorgqr_work.o \ -+lapacke_dorgrq.o \ -+lapacke_dorgrq_work.o \ -+lapacke_dorgtr.o \ -+lapacke_dorgtr_work.o \ -+lapacke_dormbr.o \ -+lapacke_dormbr_work.o \ -+lapacke_dormhr.o \ -+lapacke_dormhr_work.o \ -+lapacke_dormlq.o \ -+lapacke_dormlq_work.o \ -+lapacke_dormql.o \ -+lapacke_dormql_work.o \ -+lapacke_dormqr.o \ -+lapacke_dormqr_work.o \ -+lapacke_dormrq.o \ -+lapacke_dormrq_work.o \ -+lapacke_dormrz.o \ -+lapacke_dormrz_work.o \ -+lapacke_dormtr.o \ -+lapacke_dormtr_work.o \ -+lapacke_dpbcon.o \ -+lapacke_dpbcon_work.o \ -+lapacke_dpbequ.o \ -+lapacke_dpbequ_work.o \ -+lapacke_dpbrfs.o \ -+lapacke_dpbrfs_work.o \ -+lapacke_dpbstf.o \ -+lapacke_dpbstf_work.o \ -+lapacke_dpbsv.o \ -+lapacke_dpbsv_work.o \ -+lapacke_dpbsvx.o \ -+lapacke_dpbsvx_work.o \ -+lapacke_dpbtrf.o \ -+lapacke_dpbtrf_work.o \ -+lapacke_dpbtrs.o \ -+lapacke_dpbtrs_work.o \ -+lapacke_dpftrf.o \ -+lapacke_dpftrf_work.o \ -+lapacke_dpftri.o \ -+lapacke_dpftri_work.o \ -+lapacke_dpftrs.o \ -+lapacke_dpftrs_work.o \ -+lapacke_dpocon.o \ -+lapacke_dpocon_work.o \ -+lapacke_dpoequb.o \ -+lapacke_dpoequb_work.o \ -+lapacke_dpoequ.o \ -+lapacke_dpoequ_work.o \ -+lapacke_dporfs.o \ -+lapacke_dporfs_work.o \ -+lapacke_dposv.o \ -+lapacke_dposv_work.o \ -+lapacke_dposvx.o \ -+lapacke_dposvx_work.o \ -+lapacke_dpotrf.o \ -+lapacke_dpotrf_work.o \ -+lapacke_dpotri.o \ -+lapacke_dpotri_work.o \ -+lapacke_dpotrs.o \ -+lapacke_dpotrs_work.o \ -+lapacke_dppcon.o \ -+lapacke_dppcon_work.o \ -+lapacke_dppequ.o \ -+lapacke_dppequ_work.o \ -+lapacke_dpprfs.o \ -+lapacke_dpprfs_work.o \ -+lapacke_dppsv.o \ -+lapacke_dppsv_work.o \ -+lapacke_dppsvx.o \ -+lapacke_dppsvx_work.o \ -+lapacke_dpptrf.o \ -+lapacke_dpptrf_work.o \ -+lapacke_dpptri.o \ -+lapacke_dpptri_work.o \ -+lapacke_dpptrs.o \ -+lapacke_dpptrs_work.o \ -+lapacke_dpstrf.o \ -+lapacke_dpstrf_work.o \ -+lapacke_dptcon.o \ -+lapacke_dptcon_work.o \ -+lapacke_dpteqr.o \ -+lapacke_dpteqr_work.o \ -+lapacke_dptrfs.o \ -+lapacke_dptrfs_work.o \ -+lapacke_dptsv.o \ -+lapacke_dptsv_work.o \ -+lapacke_dptsvx.o \ -+lapacke_dptsvx_work.o \ -+lapacke_dpttrf.o \ -+lapacke_dpttrf_work.o \ -+lapacke_dpttrs.o \ -+lapacke_dpttrs_work.o \ -+lapacke_dsbev.o \ -+lapacke_dsbevd.o \ -+lapacke_dsbevd_work.o \ -+lapacke_dsbev_work.o \ -+lapacke_dsbevx.o \ -+lapacke_dsbevx_work.o \ -+lapacke_dsbgst.o \ -+lapacke_dsbgst_work.o \ -+lapacke_dsbgv.o \ -+lapacke_dsbgvd.o \ -+lapacke_dsbgvd_work.o \ -+lapacke_dsbgv_work.o \ -+lapacke_dsbgvx.o \ -+lapacke_dsbgvx_work.o \ -+lapacke_dsbtrd.o \ -+lapacke_dsbtrd_work.o \ -+lapacke_dsfrk.o \ -+lapacke_dsfrk_work.o \ -+lapacke_dsgesv.o \ -+lapacke_dsgesv_work.o \ -+lapacke_dspcon.o \ -+lapacke_dspcon_work.o \ -+lapacke_dspev.o \ -+lapacke_dspevd.o \ -+lapacke_dspevd_work.o \ -+lapacke_dspev_work.o \ -+lapacke_dspevx.o \ -+lapacke_dspevx_work.o \ -+lapacke_dspgst.o \ -+lapacke_dspgst_work.o \ -+lapacke_dspgv.o \ -+lapacke_dspgvd.o \ -+lapacke_dspgvd_work.o \ -+lapacke_dspgv_work.o \ -+lapacke_dspgvx.o \ -+lapacke_dspgvx_work.o \ -+lapacke_dsposv.o \ -+lapacke_dsposv_work.o \ -+lapacke_dsprfs.o \ -+lapacke_dsprfs_work.o \ -+lapacke_dspsv.o \ -+lapacke_dspsv_work.o \ -+lapacke_dspsvx.o \ -+lapacke_dspsvx_work.o \ -+lapacke_dsptrd.o \ -+lapacke_dsptrd_work.o \ -+lapacke_dsptrf.o \ -+lapacke_dsptrf_work.o \ -+lapacke_dsptri.o \ -+lapacke_dsptri_work.o \ -+lapacke_dsptrs.o \ -+lapacke_dsptrs_work.o \ -+lapacke_dstebz.o \ -+lapacke_dstebz_work.o \ -+lapacke_dstedc.o \ -+lapacke_dstedc_work.o \ -+lapacke_dstegr.o \ -+lapacke_dstegr_work.o \ -+lapacke_dstein.o \ -+lapacke_dstein_work.o \ -+lapacke_dstemr.o \ -+lapacke_dstemr_work.o \ -+lapacke_dsteqr.o \ -+lapacke_dsteqr_work.o \ -+lapacke_dsterf.o \ -+lapacke_dsterf_work.o \ -+lapacke_dstev.o \ -+lapacke_dstevd.o \ -+lapacke_dstevd_work.o \ -+lapacke_dstevr.o \ -+lapacke_dstevr_work.o \ -+lapacke_dstev_work.o \ -+lapacke_dstevx.o \ -+lapacke_dstevx_work.o \ -+lapacke_dsycon.o \ -+lapacke_dsyconv.o \ -+lapacke_dsyconv_work.o \ -+lapacke_dsycon_work.o \ -+lapacke_dsyequb.o \ -+lapacke_dsyequb_work.o \ -+lapacke_dsyev.o \ -+lapacke_dsyevd.o \ -+lapacke_dsyevd_work.o \ -+lapacke_dsyevr.o \ -+lapacke_dsyevr_work.o \ -+lapacke_dsyev_work.o \ -+lapacke_dsyevx.o \ -+lapacke_dsyevx_work.o \ -+lapacke_dsygst.o \ -+lapacke_dsygst_work.o \ -+lapacke_dsygv.o \ -+lapacke_dsygvd.o \ -+lapacke_dsygvd_work.o \ -+lapacke_dsygv_work.o \ -+lapacke_dsygvx.o \ -+lapacke_dsygvx_work.o \ -+lapacke_dsyrfs.o \ -+lapacke_dsyrfs_work.o \ -+lapacke_dsysv.o \ -+lapacke_dsysv_work.o \ -+lapacke_dsysvx.o \ -+lapacke_dsysvx_work.o \ -+lapacke_dsyswapr.o \ -+lapacke_dsyswapr_work.o \ -+lapacke_dsytrd.o \ -+lapacke_dsytrd_work.o \ -+lapacke_dsytrf.o \ -+lapacke_dsytrf_work.o \ -+lapacke_dsytri2.o \ -+lapacke_dsytri2_work.o \ -+lapacke_dsytri2x.o \ -+lapacke_dsytri2x_work.o \ -+lapacke_dsytri.o \ -+lapacke_dsytri_work.o \ -+lapacke_dsytrs2.o \ -+lapacke_dsytrs2_work.o \ -+lapacke_dsytrs.o \ -+lapacke_dsytrs_work.o \ -+lapacke_dtbcon.o \ -+lapacke_dtbcon_work.o \ -+lapacke_dtbrfs.o \ -+lapacke_dtbrfs_work.o \ -+lapacke_dtbtrs.o \ -+lapacke_dtbtrs_work.o \ -+lapacke_dtfsm.o \ -+lapacke_dtfsm_work.o \ -+lapacke_dtftri.o \ -+lapacke_dtftri_work.o \ -+lapacke_dtfttp.o \ -+lapacke_dtfttp_work.o \ -+lapacke_dtfttr.o \ -+lapacke_dtfttr_work.o \ -+lapacke_dtgevc.o \ -+lapacke_dtgevc_work.o \ -+lapacke_dtgexc.o \ -+lapacke_dtgexc_work.o \ -+lapacke_dtgsen.o \ -+lapacke_dtgsen_work.o \ -+lapacke_dtgsja.o \ -+lapacke_dtgsja_work.o \ -+lapacke_dtgsna.o \ -+lapacke_dtgsna_work.o \ -+lapacke_dtgsyl.o \ -+lapacke_dtgsyl_work.o \ -+lapacke_dtpcon.o \ -+lapacke_dtpcon_work.o \ -+lapacke_dtpmqrt.o \ -+lapacke_dtpmqrt_work.o \ -+lapacke_dtpqrt2.o \ -+lapacke_dtpqrt2_work.o \ -+lapacke_dtpqrt.o \ -+lapacke_dtpqrt_work.o \ -+lapacke_dtprfb.o \ -+lapacke_dtprfb_work.o \ -+lapacke_dtprfs.o \ -+lapacke_dtprfs_work.o \ -+lapacke_dtptri.o \ -+lapacke_dtptri_work.o \ -+lapacke_dtptrs.o \ -+lapacke_dtptrs_work.o \ -+lapacke_dtpttf.o \ -+lapacke_dtpttf_work.o \ -+lapacke_dtpttr.o \ -+lapacke_dtpttr_work.o \ -+lapacke_dtrcon.o \ -+lapacke_dtrcon_work.o \ -+lapacke_dtrevc.o \ -+lapacke_dtrevc_work.o \ -+lapacke_dtrexc.o \ -+lapacke_dtrexc_work.o \ -+lapacke_dtrrfs.o \ -+lapacke_dtrrfs_work.o \ -+lapacke_dtrsen.o \ -+lapacke_dtrsen_work.o \ -+lapacke_dtrsna.o \ -+lapacke_dtrsna_work.o \ -+lapacke_dtrsyl.o \ -+lapacke_dtrsyl_work.o \ -+lapacke_dtrtri.o \ -+lapacke_dtrtri_work.o \ -+lapacke_dtrtrs.o \ -+lapacke_dtrtrs_work.o \ -+lapacke_dtrttf.o \ -+lapacke_dtrttf_work.o \ -+lapacke_dtrttp.o \ -+lapacke_dtrttp_work.o \ -+lapacke_dtzrzf.o \ -+lapacke_dtzrzf_work.o \ -+lapacke_sbbcsd.o \ -+lapacke_sbbcsd_work.o \ -+lapacke_sbdsdc.o \ -+lapacke_sbdsdc_work.o \ -+lapacke_sbdsqr.o \ -+lapacke_sbdsqr_work.o \ -+lapacke_sdisna.o \ -+lapacke_sdisna_work.o \ -+lapacke_sgbbrd.o \ -+lapacke_sgbbrd_work.o \ -+lapacke_sgbcon.o \ -+lapacke_sgbcon_work.o \ -+lapacke_sgbequb.o \ -+lapacke_sgbequb_work.o \ -+lapacke_sgbequ.o \ -+lapacke_sgbequ_work.o \ -+lapacke_sgbrfs.o \ -+lapacke_sgbrfs_work.o \ -+lapacke_sgbsv.o \ -+lapacke_sgbsv_work.o \ -+lapacke_sgbsvx.o \ -+lapacke_sgbsvx_work.o \ -+lapacke_sgbtrf.o \ -+lapacke_sgbtrf_work.o \ -+lapacke_sgbtrs.o \ -+lapacke_sgbtrs_work.o \ -+lapacke_sgebak.o \ -+lapacke_sgebak_work.o \ -+lapacke_sgebal.o \ -+lapacke_sgebal_work.o \ -+lapacke_sgebrd.o \ -+lapacke_sgebrd_work.o \ -+lapacke_sgecon.o \ -+lapacke_sgecon_work.o \ -+lapacke_sgeequb.o \ -+lapacke_sgeequb_work.o \ -+lapacke_sgeequ.o \ -+lapacke_sgeequ_work.o \ -+lapacke_sgees.o \ -+lapacke_sgees_work.o \ -+lapacke_sgeesx.o \ -+lapacke_sgeesx_work.o \ -+lapacke_sgeev.o \ -+lapacke_sgeev_work.o \ -+lapacke_sgeevx.o \ -+lapacke_sgeevx_work.o \ -+lapacke_sgehrd.o \ -+lapacke_sgehrd_work.o \ -+lapacke_sgejsv.o \ -+lapacke_sgejsv_work.o \ -+lapacke_sgelq2.o \ -+lapacke_sgelq2_work.o \ -+lapacke_sgelqf.o \ -+lapacke_sgelqf_work.o \ -+lapacke_sgels.o \ -+lapacke_sgelsd.o \ -+lapacke_sgelsd_work.o \ -+lapacke_sgelss.o \ -+lapacke_sgelss_work.o \ -+lapacke_sgels_work.o \ -+lapacke_sgelsy.o \ -+lapacke_sgelsy_work.o \ -+lapacke_sgemqrt.o \ -+lapacke_sgemqrt_work.o \ -+lapacke_sgeqlf.o \ -+lapacke_sgeqlf_work.o \ -+lapacke_sgeqp3.o \ -+lapacke_sgeqp3_work.o \ -+lapacke_sgeqpf.o \ -+lapacke_sgeqpf_work.o \ -+lapacke_sgeqr2.o \ -+lapacke_sgeqr2_work.o \ -+lapacke_sgeqrf.o \ -+lapacke_sgeqrfp.o \ -+lapacke_sgeqrfp_work.o \ -+lapacke_sgeqrf_work.o \ -+lapacke_sgeqrt2.o \ -+lapacke_sgeqrt2_work.o \ -+lapacke_sgeqrt3.o \ -+lapacke_sgeqrt3_work.o \ -+lapacke_sgeqrt.o \ -+lapacke_sgeqrt_work.o \ -+lapacke_sgerfs.o \ -+lapacke_sgerfs_work.o \ -+lapacke_sgerqf.o \ -+lapacke_sgerqf_work.o \ -+lapacke_sgesdd.o \ -+lapacke_sgesdd_work.o \ -+lapacke_sgesv.o \ -+lapacke_sgesvd.o \ -+lapacke_sgesvd_work.o \ -+lapacke_sgesvj.o \ -+lapacke_sgesvj_work.o \ -+lapacke_sgesv_work.o \ -+lapacke_sgesvx.o \ -+lapacke_sgesvx_work.o \ -+lapacke_sgetf2.o \ -+lapacke_sgetf2_work.o \ -+lapacke_sgetrf.o \ -+lapacke_sgetrf_work.o \ -+lapacke_sgetri.o \ -+lapacke_sgetri_work.o \ -+lapacke_sgetrs.o \ -+lapacke_sgetrs_work.o \ -+lapacke_sggbak.o \ -+lapacke_sggbak_work.o \ -+lapacke_sggbal.o \ -+lapacke_sggbal_work.o \ -+lapacke_sgges.o \ -+lapacke_sgges_work.o \ -+lapacke_sggesx.o \ -+lapacke_sggesx_work.o \ -+lapacke_sggev.o \ -+lapacke_sggev_work.o \ -+lapacke_sggevx.o \ -+lapacke_sggevx_work.o \ -+lapacke_sggglm.o \ -+lapacke_sggglm_work.o \ -+lapacke_sgghrd.o \ -+lapacke_sgghrd_work.o \ -+lapacke_sgglse.o \ -+lapacke_sgglse_work.o \ -+lapacke_sggqrf.o \ -+lapacke_sggqrf_work.o \ -+lapacke_sggrqf.o \ -+lapacke_sggrqf_work.o \ -+lapacke_sggsvd.o \ -+lapacke_sggsvd_work.o \ -+lapacke_sggsvp.o \ -+lapacke_sggsvp_work.o \ -+lapacke_sgtcon.o \ -+lapacke_sgtcon_work.o \ -+lapacke_sgtrfs.o \ -+lapacke_sgtrfs_work.o \ -+lapacke_sgtsv.o \ -+lapacke_sgtsv_work.o \ -+lapacke_sgtsvx.o \ -+lapacke_sgtsvx_work.o \ -+lapacke_sgttrf.o \ -+lapacke_sgttrf_work.o \ -+lapacke_sgttrs.o \ -+lapacke_sgttrs_work.o \ -+lapacke_shgeqz.o \ -+lapacke_shgeqz_work.o \ -+lapacke_shsein.o \ -+lapacke_shsein_work.o \ -+lapacke_shseqr.o \ -+lapacke_shseqr_work.o \ -+lapacke_slacpy.o \ -+lapacke_slacpy_work.o \ -+lapacke_slag2d.o \ -+lapacke_slag2d_work.o \ -+lapacke_slamch.o \ -+lapacke_slamch_work.o \ -+lapacke_slange.o \ -+lapacke_slange_work.o \ -+lapacke_slansy.o \ -+lapacke_slansy_work.o \ -+lapacke_slantr.o \ -+lapacke_slantr_work.o \ -+lapacke_slapmr.o \ -+lapacke_slapmr_work.o \ -+lapacke_slapy2.o \ -+lapacke_slapy2_work.o \ -+lapacke_slapy3.o \ -+lapacke_slapy3_work.o \ -+lapacke_slarfb.o \ -+lapacke_slarfb_work.o \ -+lapacke_slarfg.o \ -+lapacke_slarfg_work.o \ -+lapacke_slarft.o \ -+lapacke_slarft_work.o \ -+lapacke_slarfx.o \ -+lapacke_slarfx_work.o \ -+lapacke_slarnv.o \ -+lapacke_slarnv_work.o \ -+lapacke_slartgp.o \ -+lapacke_slartgp_work.o \ -+lapacke_slartgs.o \ -+lapacke_slartgs_work.o \ -+lapacke_slaset.o \ -+lapacke_slaset_work.o \ -+lapacke_slasrt.o \ -+lapacke_slasrt_work.o \ -+lapacke_slaswp.o \ -+lapacke_slaswp_work.o \ -+lapacke_slauum.o \ -+lapacke_slauum_work.o \ -+lapacke_sopgtr.o \ -+lapacke_sopgtr_work.o \ -+lapacke_sopmtr.o \ -+lapacke_sopmtr_work.o \ -+lapacke_sorbdb.o \ -+lapacke_sorbdb_work.o \ -+lapacke_sorcsd.o \ -+lapacke_sorcsd_work.o \ -+lapacke_sorgbr.o \ -+lapacke_sorgbr_work.o \ -+lapacke_sorghr.o \ -+lapacke_sorghr_work.o \ -+lapacke_sorglq.o \ -+lapacke_sorglq_work.o \ -+lapacke_sorgql.o \ -+lapacke_sorgql_work.o \ -+lapacke_sorgqr.o \ -+lapacke_sorgqr_work.o \ -+lapacke_sorgrq.o \ -+lapacke_sorgrq_work.o \ -+lapacke_sorgtr.o \ -+lapacke_sorgtr_work.o \ -+lapacke_sormbr.o \ -+lapacke_sormbr_work.o \ -+lapacke_sormhr.o \ -+lapacke_sormhr_work.o \ -+lapacke_sormlq.o \ -+lapacke_sormlq_work.o \ -+lapacke_sormql.o \ -+lapacke_sormql_work.o \ -+lapacke_sormqr.o \ -+lapacke_sormqr_work.o \ -+lapacke_sormrq.o \ -+lapacke_sormrq_work.o \ -+lapacke_sormrz.o \ -+lapacke_sormrz_work.o \ -+lapacke_sormtr.o \ -+lapacke_sormtr_work.o \ -+lapacke_spbcon.o \ -+lapacke_spbcon_work.o \ -+lapacke_spbequ.o \ -+lapacke_spbequ_work.o \ -+lapacke_spbrfs.o \ -+lapacke_spbrfs_work.o \ -+lapacke_spbstf.o \ -+lapacke_spbstf_work.o \ -+lapacke_spbsv.o \ -+lapacke_spbsv_work.o \ -+lapacke_spbsvx.o \ -+lapacke_spbsvx_work.o \ -+lapacke_spbtrf.o \ -+lapacke_spbtrf_work.o \ -+lapacke_spbtrs.o \ -+lapacke_spbtrs_work.o \ -+lapacke_spftrf.o \ -+lapacke_spftrf_work.o \ -+lapacke_spftri.o \ -+lapacke_spftri_work.o \ -+lapacke_spftrs.o \ -+lapacke_spftrs_work.o \ -+lapacke_spocon.o \ -+lapacke_spocon_work.o \ -+lapacke_spoequb.o \ -+lapacke_spoequb_work.o \ -+lapacke_spoequ.o \ -+lapacke_spoequ_work.o \ -+lapacke_sporfs.o \ -+lapacke_sporfs_work.o \ -+lapacke_sposv.o \ -+lapacke_sposv_work.o \ -+lapacke_sposvx.o \ -+lapacke_sposvx_work.o \ -+lapacke_spotrf.o \ -+lapacke_spotrf_work.o \ -+lapacke_spotri.o \ -+lapacke_spotri_work.o \ -+lapacke_spotrs.o \ -+lapacke_spotrs_work.o \ -+lapacke_sppcon.o \ -+lapacke_sppcon_work.o \ -+lapacke_sppequ.o \ -+lapacke_sppequ_work.o \ -+lapacke_spprfs.o \ -+lapacke_spprfs_work.o \ -+lapacke_sppsv.o \ -+lapacke_sppsv_work.o \ -+lapacke_sppsvx.o \ -+lapacke_sppsvx_work.o \ -+lapacke_spptrf.o \ -+lapacke_spptrf_work.o \ -+lapacke_spptri.o \ -+lapacke_spptri_work.o \ -+lapacke_spptrs.o \ -+lapacke_spptrs_work.o \ -+lapacke_spstrf.o \ -+lapacke_spstrf_work.o \ -+lapacke_sptcon.o \ -+lapacke_sptcon_work.o \ -+lapacke_spteqr.o \ -+lapacke_spteqr_work.o \ -+lapacke_sptrfs.o \ -+lapacke_sptrfs_work.o \ -+lapacke_sptsv.o \ -+lapacke_sptsv_work.o \ -+lapacke_sptsvx.o \ -+lapacke_sptsvx_work.o \ -+lapacke_spttrf.o \ -+lapacke_spttrf_work.o \ -+lapacke_spttrs.o \ -+lapacke_spttrs_work.o \ -+lapacke_ssbev.o \ -+lapacke_ssbevd.o \ -+lapacke_ssbevd_work.o \ -+lapacke_ssbev_work.o \ -+lapacke_ssbevx.o \ -+lapacke_ssbevx_work.o \ -+lapacke_ssbgst.o \ -+lapacke_ssbgst_work.o \ -+lapacke_ssbgv.o \ -+lapacke_ssbgvd.o \ -+lapacke_ssbgvd_work.o \ -+lapacke_ssbgv_work.o \ -+lapacke_ssbgvx.o \ -+lapacke_ssbgvx_work.o \ -+lapacke_ssbtrd.o \ -+lapacke_ssbtrd_work.o \ -+lapacke_ssfrk.o \ -+lapacke_ssfrk_work.o \ -+lapacke_sspcon.o \ -+lapacke_sspcon_work.o \ -+lapacke_sspev.o \ -+lapacke_sspevd.o \ -+lapacke_sspevd_work.o \ -+lapacke_sspev_work.o \ -+lapacke_sspevx.o \ -+lapacke_sspevx_work.o \ -+lapacke_sspgst.o \ -+lapacke_sspgst_work.o \ -+lapacke_sspgv.o \ -+lapacke_sspgvd.o \ -+lapacke_sspgvd_work.o \ -+lapacke_sspgv_work.o \ -+lapacke_sspgvx.o \ -+lapacke_sspgvx_work.o \ -+lapacke_ssprfs.o \ -+lapacke_ssprfs_work.o \ -+lapacke_sspsv.o \ -+lapacke_sspsv_work.o \ -+lapacke_sspsvx.o \ -+lapacke_sspsvx_work.o \ -+lapacke_ssptrd.o \ -+lapacke_ssptrd_work.o \ -+lapacke_ssptrf.o \ -+lapacke_ssptrf_work.o \ -+lapacke_ssptri.o \ -+lapacke_ssptri_work.o \ -+lapacke_ssptrs.o \ -+lapacke_ssptrs_work.o \ -+lapacke_sstebz.o \ -+lapacke_sstebz_work.o \ -+lapacke_sstedc.o \ -+lapacke_sstedc_work.o \ -+lapacke_sstegr.o \ -+lapacke_sstegr_work.o \ -+lapacke_sstein.o \ -+lapacke_sstein_work.o \ -+lapacke_sstemr.o \ -+lapacke_sstemr_work.o \ -+lapacke_ssteqr.o \ -+lapacke_ssteqr_work.o \ -+lapacke_ssterf.o \ -+lapacke_ssterf_work.o \ -+lapacke_sstev.o \ -+lapacke_sstevd.o \ -+lapacke_sstevd_work.o \ -+lapacke_sstevr.o \ -+lapacke_sstevr_work.o \ -+lapacke_sstev_work.o \ -+lapacke_sstevx.o \ -+lapacke_sstevx_work.o \ -+lapacke_ssycon.o \ -+lapacke_ssyconv.o \ -+lapacke_ssyconv_work.o \ -+lapacke_ssycon_work.o \ -+lapacke_ssyequb.o \ -+lapacke_ssyequb_work.o \ -+lapacke_ssyev.o \ -+lapacke_ssyevd.o \ -+lapacke_ssyevd_work.o \ -+lapacke_ssyevr.o \ -+lapacke_ssyevr_work.o \ -+lapacke_ssyev_work.o \ -+lapacke_ssyevx.o \ -+lapacke_ssyevx_work.o \ -+lapacke_ssygst.o \ -+lapacke_ssygst_work.o \ -+lapacke_ssygv.o \ -+lapacke_ssygvd.o \ -+lapacke_ssygvd_work.o \ -+lapacke_ssygv_work.o \ -+lapacke_ssygvx.o \ -+lapacke_ssygvx_work.o \ -+lapacke_ssyrfs.o \ -+lapacke_ssyrfs_work.o \ -+lapacke_ssysv.o \ -+lapacke_ssysv_work.o \ -+lapacke_ssysvx.o \ -+lapacke_ssysvx_work.o \ -+lapacke_ssyswapr.o \ -+lapacke_ssyswapr_work.o \ -+lapacke_ssytrd.o \ -+lapacke_ssytrd_work.o \ -+lapacke_ssytrf.o \ -+lapacke_ssytrf_work.o \ -+lapacke_ssytri2.o \ -+lapacke_ssytri2_work.o \ -+lapacke_ssytri2x.o \ -+lapacke_ssytri2x_work.o \ -+lapacke_ssytri.o \ -+lapacke_ssytri_work.o \ -+lapacke_ssytrs2.o \ -+lapacke_ssytrs2_work.o \ -+lapacke_ssytrs.o \ -+lapacke_ssytrs_work.o \ -+lapacke_stbcon.o \ -+lapacke_stbcon_work.o \ -+lapacke_stbrfs.o \ -+lapacke_stbrfs_work.o \ -+lapacke_stbtrs.o \ -+lapacke_stbtrs_work.o \ -+lapacke_stfsm.o \ -+lapacke_stfsm_work.o \ -+lapacke_stftri.o \ -+lapacke_stftri_work.o \ -+lapacke_stfttp.o \ -+lapacke_stfttp_work.o \ -+lapacke_stfttr.o \ -+lapacke_stfttr_work.o \ -+lapacke_stgevc.o \ -+lapacke_stgevc_work.o \ -+lapacke_stgexc.o \ -+lapacke_stgexc_work.o \ -+lapacke_stgsen.o \ -+lapacke_stgsen_work.o \ -+lapacke_stgsja.o \ -+lapacke_stgsja_work.o \ -+lapacke_stgsna.o \ -+lapacke_stgsna_work.o \ -+lapacke_stgsyl.o \ -+lapacke_stgsyl_work.o \ -+lapacke_stpcon.o \ -+lapacke_stpcon_work.o \ -+lapacke_stpmqrt.o \ -+lapacke_stpmqrt_work.o \ -+lapacke_stpqrt2.o \ -+lapacke_stpqrt2_work.o \ -+lapacke_stprfb.o \ -+lapacke_stprfb_work.o \ -+lapacke_stprfs.o \ -+lapacke_stprfs_work.o \ -+lapacke_stptri.o \ -+lapacke_stptri_work.o \ -+lapacke_stptrs.o \ -+lapacke_stptrs_work.o \ -+lapacke_stpttf.o \ -+lapacke_stpttf_work.o \ -+lapacke_stpttr.o \ -+lapacke_stpttr_work.o \ -+lapacke_strcon.o \ -+lapacke_strcon_work.o \ -+lapacke_strevc.o \ -+lapacke_strevc_work.o \ -+lapacke_strexc.o \ -+lapacke_strexc_work.o \ -+lapacke_strrfs.o \ -+lapacke_strrfs_work.o \ -+lapacke_strsen.o \ -+lapacke_strsen_work.o \ -+lapacke_strsna.o \ -+lapacke_strsna_work.o \ -+lapacke_strsyl.o \ -+lapacke_strsyl_work.o \ -+lapacke_strtri.o \ -+lapacke_strtri_work.o \ -+lapacke_strtrs.o \ -+lapacke_strtrs_work.o \ -+lapacke_strttf.o \ -+lapacke_strttf_work.o \ -+lapacke_strttp.o \ -+lapacke_strttp_work.o \ -+lapacke_stzrzf.o \ -+lapacke_stzrzf_work.o \ -+lapacke_zbbcsd.o \ -+lapacke_zbbcsd_work.o \ -+lapacke_zbdsqr.o \ -+lapacke_zbdsqr_work.o \ -+lapacke_zcgesv.o \ -+lapacke_zcgesv_work.o \ -+lapacke_zcposv.o \ -+lapacke_zcposv_work.o \ -+lapacke_zgbbrd.o \ -+lapacke_zgbbrd_work.o \ -+lapacke_zgbcon.o \ -+lapacke_zgbcon_work.o \ -+lapacke_zgbequb.o \ -+lapacke_zgbequb_work.o \ -+lapacke_zgbequ.o \ -+lapacke_zgbequ_work.o \ -+lapacke_zgbrfs.o \ -+lapacke_zgbrfs_work.o \ -+lapacke_zgbsv.o \ -+lapacke_zgbsv_work.o \ -+lapacke_zgbsvx.o \ -+lapacke_zgbsvx_work.o \ -+lapacke_zgbtrf.o \ -+lapacke_zgbtrf_work.o \ -+lapacke_zgbtrs.o \ -+lapacke_zgbtrs_work.o \ -+lapacke_zgebak.o \ -+lapacke_zgebak_work.o \ -+lapacke_zgebal.o \ -+lapacke_zgebal_work.o \ -+lapacke_zgebrd.o \ -+lapacke_zgebrd_work.o \ -+lapacke_zgecon.o \ -+lapacke_zgecon_work.o \ -+lapacke_zgeequb.o \ -+lapacke_zgeequb_work.o \ -+lapacke_zgeequ.o \ -+lapacke_zgeequ_work.o \ -+lapacke_zgees.o \ -+lapacke_zgees_work.o \ -+lapacke_zgeesx.o \ -+lapacke_zgeesx_work.o \ -+lapacke_zgeev.o \ -+lapacke_zgeev_work.o \ -+lapacke_zgeevx.o \ -+lapacke_zgeevx_work.o \ -+lapacke_zgehrd.o \ -+lapacke_zgehrd_work.o \ -+lapacke_zgelq2.o \ -+lapacke_zgelq2_work.o \ -+lapacke_zgelqf.o \ -+lapacke_zgelqf_work.o \ -+lapacke_zgels.o \ -+lapacke_zgelsd.o \ -+lapacke_zgelsd_work.o \ -+lapacke_zgelss.o \ -+lapacke_zgelss_work.o \ -+lapacke_zgels_work.o \ -+lapacke_zgelsy.o \ -+lapacke_zgelsy_work.o \ -+lapacke_zgemqrt.o \ -+lapacke_zgemqrt_work.o \ -+lapacke_zgeqlf.o \ -+lapacke_zgeqlf_work.o \ -+lapacke_zgeqp3.o \ -+lapacke_zgeqp3_work.o \ -+lapacke_zgeqpf.o \ -+lapacke_zgeqpf_work.o \ -+lapacke_zgeqr2.o \ -+lapacke_zgeqr2_work.o \ -+lapacke_zgeqrf.o \ -+lapacke_zgeqrfp.o \ -+lapacke_zgeqrfp_work.o \ -+lapacke_zgeqrf_work.o \ -+lapacke_zgeqrt2.o \ -+lapacke_zgeqrt2_work.o \ -+lapacke_zgeqrt3.o \ -+lapacke_zgeqrt3_work.o \ -+lapacke_zgeqrt.o \ -+lapacke_zgeqrt_work.o \ -+lapacke_zgerfs.o \ -+lapacke_zgerfs_work.o \ -+lapacke_zgerqf.o \ -+lapacke_zgerqf_work.o \ -+lapacke_zgesdd.o \ -+lapacke_zgesdd_work.o \ -+lapacke_zgesv.o \ -+lapacke_zgesvd.o \ -+lapacke_zgesvd_work.o \ -+lapacke_zgesv_work.o \ -+lapacke_zgesvx.o \ -+lapacke_zgesvx_work.o \ -+lapacke_zgetf2.o \ -+lapacke_zgetf2_work.o \ -+lapacke_zgetrf.o \ -+lapacke_zgetrf_work.o \ -+lapacke_zgetri.o \ -+lapacke_zgetri_work.o \ -+lapacke_zgetrs.o \ -+lapacke_zgetrs_work.o \ -+lapacke_zggbak.o \ -+lapacke_zggbak_work.o \ -+lapacke_zggbal.o \ -+lapacke_zggbal_work.o \ -+lapacke_zgges.o \ -+lapacke_zgges_work.o \ -+lapacke_zggesx.o \ -+lapacke_zggesx_work.o \ -+lapacke_zggev.o \ -+lapacke_zggev_work.o \ -+lapacke_zggevx.o \ -+lapacke_zggevx_work.o \ -+lapacke_zggglm.o \ -+lapacke_zggglm_work.o \ -+lapacke_zgghrd.o \ -+lapacke_zgghrd_work.o \ -+lapacke_zgglse.o \ -+lapacke_zgglse_work.o \ -+lapacke_zggqrf.o \ -+lapacke_zggqrf_work.o \ -+lapacke_zggrqf.o \ -+lapacke_zggrqf_work.o \ -+lapacke_zggsvd.o \ -+lapacke_zggsvd_work.o \ -+lapacke_zggsvp.o \ -+lapacke_zggsvp_work.o \ -+lapacke_zgtcon.o \ -+lapacke_zgtcon_work.o \ -+lapacke_zgtrfs.o \ -+lapacke_zgtrfs_work.o \ -+lapacke_zgtsv.o \ -+lapacke_zgtsv_work.o \ -+lapacke_zgtsvx.o \ -+lapacke_zgtsvx_work.o \ -+lapacke_zgttrf.o \ -+lapacke_zgttrf_work.o \ -+lapacke_zgttrs.o \ -+lapacke_zgttrs_work.o \ -+lapacke_zhbev.o \ -+lapacke_zhbevd.o \ -+lapacke_zhbevd_work.o \ -+lapacke_zhbev_work.o \ -+lapacke_zhbevx.o \ -+lapacke_zhbevx_work.o \ -+lapacke_zhbgst.o \ -+lapacke_zhbgst_work.o \ -+lapacke_zhbgv.o \ -+lapacke_zhbgvd.o \ -+lapacke_zhbgvd_work.o \ -+lapacke_zhbgv_work.o \ -+lapacke_zhbgvx.o \ -+lapacke_zhbgvx_work.o \ -+lapacke_zhbtrd.o \ -+lapacke_zhbtrd_work.o \ -+lapacke_zhecon.o \ -+lapacke_zhecon_work.o \ -+lapacke_zheequb.o \ -+lapacke_zheequb_work.o \ -+lapacke_zheev.o \ -+lapacke_zheevd.o \ -+lapacke_zheevd_work.o \ -+lapacke_zheevr.o \ -+lapacke_zheevr_work.o \ -+lapacke_zheev_work.o \ -+lapacke_zheevx.o \ -+lapacke_zheevx_work.o \ -+lapacke_zhegst.o \ -+lapacke_zhegst_work.o \ -+lapacke_zhegv.o \ -+lapacke_zhegvd.o \ -+lapacke_zhegvd_work.o \ -+lapacke_zhegv_work.o \ -+lapacke_zhegvx.o \ -+lapacke_zhegvx_work.o \ -+lapacke_zherfs.o \ -+lapacke_zherfs_work.o \ -+lapacke_zhesv.o \ -+lapacke_zhesv_work.o \ -+lapacke_zhesvx.o \ -+lapacke_zhesvx_work.o \ -+lapacke_zheswapr.o \ -+lapacke_zheswapr_work.o \ -+lapacke_zhetrd.o \ -+lapacke_zhetrd_work.o \ -+lapacke_zhetrf.o \ -+lapacke_zhetrf_work.o \ -+lapacke_zhetri2.o \ -+lapacke_zhetri2_work.o \ -+lapacke_zhetri2x.o \ -+lapacke_zhetri2x_work.o \ -+lapacke_zhetri.o \ -+lapacke_zhetri_work.o \ -+lapacke_zhetrs2.o \ -+lapacke_zhetrs2_work.o \ -+lapacke_zhetrs.o \ -+lapacke_zhetrs_work.o \ -+lapacke_zhfrk.o \ -+lapacke_zhfrk_work.o \ -+lapacke_zhgeqz.o \ -+lapacke_zhgeqz_work.o \ -+lapacke_zhpcon.o \ -+lapacke_zhpcon_work.o \ -+lapacke_zhpev.o \ -+lapacke_zhpevd.o \ -+lapacke_zhpevd_work.o \ -+lapacke_zhpev_work.o \ -+lapacke_zhpevx.o \ -+lapacke_zhpevx_work.o \ -+lapacke_zhpgst.o \ -+lapacke_zhpgst_work.o \ -+lapacke_zhpgv.o \ -+lapacke_zhpgvd.o \ -+lapacke_zhpgvd_work.o \ -+lapacke_zhpgv_work.o \ -+lapacke_zhpgvx.o \ -+lapacke_zhpgvx_work.o \ -+lapacke_zhprfs.o \ -+lapacke_zhprfs_work.o \ -+lapacke_zhpsv.o \ -+lapacke_zhpsv_work.o \ -+lapacke_zhpsvx.o \ -+lapacke_zhpsvx_work.o \ -+lapacke_zhptrd.o \ -+lapacke_zhptrd_work.o \ -+lapacke_zhptrf.o \ -+lapacke_zhptrf_work.o \ -+lapacke_zhptri.o \ -+lapacke_zhptri_work.o \ -+lapacke_zhptrs.o \ -+lapacke_zhptrs_work.o \ -+lapacke_zhsein.o \ -+lapacke_zhsein_work.o \ -+lapacke_zhseqr.o \ -+lapacke_zhseqr_work.o \ -+lapacke_zlacgv.o \ -+lapacke_zlacgv_work.o \ -+lapacke_zlacpy.o \ -+lapacke_zlacpy_work.o \ -+lapacke_zlag2c.o \ -+lapacke_zlag2c_work.o \ -+lapacke_zlange.o \ -+lapacke_zlange_work.o \ -+lapacke_zlanhe.o \ -+lapacke_zlanhe_work.o \ -+lapacke_zlansy.o \ -+lapacke_zlansy_work.o \ -+lapacke_zlantr.o \ -+lapacke_zlantr_work.o \ -+lapacke_zlapmr.o \ -+lapacke_zlapmr_work.o \ -+lapacke_zlarfb.o \ -+lapacke_zlarfb_work.o \ -+lapacke_zlarfg.o \ -+lapacke_zlarfg_work.o \ -+lapacke_zlarft.o \ -+lapacke_zlarft_work.o \ -+lapacke_zlarfx.o \ -+lapacke_zlarfx_work.o \ -+lapacke_zlarnv.o \ -+lapacke_zlarnv_work.o \ -+lapacke_zlaset.o \ -+lapacke_zlaset_work.o \ -+lapacke_zlaswp.o \ -+lapacke_zlaswp_work.o \ -+lapacke_zlauum.o \ -+lapacke_zlauum_work.o \ -+lapacke_zpbcon.o \ -+lapacke_zpbcon_work.o \ -+lapacke_zpbequ.o \ -+lapacke_zpbequ_work.o \ -+lapacke_zpbrfs.o \ -+lapacke_zpbrfs_work.o \ -+lapacke_zpbstf.o \ -+lapacke_zpbstf_work.o \ -+lapacke_zpbsv.o \ -+lapacke_zpbsv_work.o \ -+lapacke_zpbsvx.o \ -+lapacke_zpbsvx_work.o \ -+lapacke_zpbtrf.o \ -+lapacke_zpbtrf_work.o \ -+lapacke_zpbtrs.o \ -+lapacke_zpbtrs_work.o \ -+lapacke_zpftrf.o \ -+lapacke_zpftrf_work.o \ -+lapacke_zpftri.o \ -+lapacke_zpftri_work.o \ -+lapacke_zpftrs.o \ -+lapacke_zpftrs_work.o \ -+lapacke_zpocon.o \ -+lapacke_zpocon_work.o \ -+lapacke_zpoequb.o \ -+lapacke_zpoequb_work.o \ -+lapacke_zpoequ.o \ -+lapacke_zpoequ_work.o \ -+lapacke_zporfs.o \ -+lapacke_zporfs_work.o \ -+lapacke_zposv.o \ -+lapacke_zposv_work.o \ -+lapacke_zposvx.o \ -+lapacke_zposvx_work.o \ -+lapacke_zpotrf.o \ -+lapacke_zpotrf_work.o \ -+lapacke_zpotri.o \ -+lapacke_zpotri_work.o \ -+lapacke_zpotrs.o \ -+lapacke_zpotrs_work.o \ -+lapacke_zppcon.o \ -+lapacke_zppcon_work.o \ -+lapacke_zppequ.o \ -+lapacke_zppequ_work.o \ -+lapacke_zpprfs.o \ -+lapacke_zpprfs_work.o \ -+lapacke_zppsv.o \ -+lapacke_zppsv_work.o \ -+lapacke_zppsvx.o \ -+lapacke_zppsvx_work.o \ -+lapacke_zpptrf.o \ -+lapacke_zpptrf_work.o \ -+lapacke_zpptri.o \ -+lapacke_zpptri_work.o \ -+lapacke_zpptrs.o \ -+lapacke_zpptrs_work.o \ -+lapacke_zpstrf.o \ -+lapacke_zpstrf_work.o \ -+lapacke_zptcon.o \ -+lapacke_zptcon_work.o \ -+lapacke_zpteqr.o \ -+lapacke_zpteqr_work.o \ -+lapacke_zptrfs.o \ -+lapacke_zptrfs_work.o \ -+lapacke_zptsv.o \ -+lapacke_zptsv_work.o \ -+lapacke_zptsvx.o \ -+lapacke_zptsvx_work.o \ -+lapacke_zpttrf.o \ -+lapacke_zpttrf_work.o \ -+lapacke_zpttrs.o \ -+lapacke_zpttrs_work.o \ -+lapacke_zspcon.o \ -+lapacke_zspcon_work.o \ -+lapacke_zsprfs.o \ -+lapacke_zsprfs_work.o \ -+lapacke_zspsv.o \ -+lapacke_zspsv_work.o \ -+lapacke_zspsvx.o \ -+lapacke_zspsvx_work.o \ -+lapacke_zsptrf.o \ -+lapacke_zsptrf_work.o \ -+lapacke_zsptri.o \ -+lapacke_zsptri_work.o \ -+lapacke_zsptrs.o \ -+lapacke_zsptrs_work.o \ -+lapacke_zstedc.o \ -+lapacke_zstedc_work.o \ -+lapacke_zstegr.o \ -+lapacke_zstegr_work.o \ -+lapacke_zstein.o \ -+lapacke_zstein_work.o \ -+lapacke_zstemr.o \ -+lapacke_zstemr_work.o \ -+lapacke_zsteqr.o \ -+lapacke_zsteqr_work.o \ -+lapacke_zsycon.o \ -+lapacke_zsyconv.o \ -+lapacke_zsyconv_work.o \ -+lapacke_zsycon_work.o \ -+lapacke_zsyequb.o \ -+lapacke_zsyequb_work.o \ -+lapacke_zsyrfs.o \ -+lapacke_zsyrfs_work.o \ -+lapacke_zsysv.o \ -+lapacke_zsysv_work.o \ -+lapacke_zsysvx.o \ -+lapacke_zsysvx_work.o \ -+lapacke_zsyswapr.o \ -+lapacke_zsyswapr_work.o \ -+lapacke_zsytrf.o \ -+lapacke_zsytrf_work.o \ -+lapacke_zsytri2.o \ -+lapacke_zsytri2_work.o \ -+lapacke_zsytri2x.o \ -+lapacke_zsytri2x_work.o \ -+lapacke_zsytri.o \ -+lapacke_zsytri_work.o \ -+lapacke_zsytrs2.o \ -+lapacke_zsytrs2_work.o \ -+lapacke_zsytrs.o \ -+lapacke_zsytrs_work.o \ -+lapacke_ztbcon.o \ -+lapacke_ztbcon_work.o \ -+lapacke_ztbrfs.o \ -+lapacke_ztbrfs_work.o \ -+lapacke_ztbtrs.o \ -+lapacke_ztbtrs_work.o \ -+lapacke_ztfsm.o \ -+lapacke_ztfsm_work.o \ -+lapacke_ztftri.o \ -+lapacke_ztftri_work.o \ -+lapacke_ztfttp.o \ -+lapacke_ztfttp_work.o \ -+lapacke_ztfttr.o \ -+lapacke_ztfttr_work.o \ -+lapacke_ztgevc.o \ -+lapacke_ztgevc_work.o \ -+lapacke_ztgexc.o \ -+lapacke_ztgexc_work.o \ -+lapacke_ztgsen.o \ -+lapacke_ztgsen_work.o \ -+lapacke_ztgsja.o \ -+lapacke_ztgsja_work.o \ -+lapacke_ztgsna.o \ -+lapacke_ztgsna_work.o \ -+lapacke_ztgsyl.o \ -+lapacke_ztgsyl_work.o \ -+lapacke_ztpcon.o \ -+lapacke_ztpcon_work.o \ -+lapacke_ztpmqrt.o \ -+lapacke_ztpmqrt_work.o \ -+lapacke_ztpqrt2.o \ -+lapacke_ztpqrt2_work.o \ -+lapacke_ztpqrt.o \ -+lapacke_ztpqrt_work.o \ -+lapacke_ztprfb.o \ -+lapacke_ztprfb_work.o \ -+lapacke_ztprfs.o \ -+lapacke_ztprfs_work.o \ -+lapacke_ztptri.o \ -+lapacke_ztptri_work.o \ -+lapacke_ztptrs.o \ -+lapacke_ztptrs_work.o \ -+lapacke_ztpttf.o \ -+lapacke_ztpttf_work.o \ -+lapacke_ztpttr.o \ -+lapacke_ztpttr_work.o \ -+lapacke_ztrcon.o \ -+lapacke_ztrcon_work.o \ -+lapacke_ztrevc.o \ -+lapacke_ztrevc_work.o \ -+lapacke_ztrexc.o \ -+lapacke_ztrexc_work.o \ -+lapacke_ztrrfs.o \ -+lapacke_ztrrfs_work.o \ -+lapacke_ztrsen.o \ -+lapacke_ztrsen_work.o \ -+lapacke_ztrsna.o \ -+lapacke_ztrsna_work.o \ -+lapacke_ztrsyl.o \ -+lapacke_ztrsyl_work.o \ -+lapacke_ztrtri.o \ -+lapacke_ztrtri_work.o \ -+lapacke_ztrtrs.o \ -+lapacke_ztrtrs_work.o \ -+lapacke_ztrttf.o \ -+lapacke_ztrttf_work.o \ -+lapacke_ztrttp.o \ -+lapacke_ztrttp_work.o \ -+lapacke_ztzrzf.o \ -+lapacke_ztzrzf_work.o \ -+lapacke_zunbdb.o \ -+lapacke_zunbdb_work.o \ -+lapacke_zuncsd.o \ -+lapacke_zuncsd_work.o \ -+lapacke_zungbr.o \ -+lapacke_zungbr_work.o \ -+lapacke_zunghr.o \ -+lapacke_zunghr_work.o \ -+lapacke_zunglq.o \ -+lapacke_zunglq_work.o \ -+lapacke_zungql.o \ -+lapacke_zungql_work.o \ -+lapacke_zungqr.o \ -+lapacke_zungqr_work.o \ -+lapacke_zungrq.o \ -+lapacke_zungrq_work.o \ -+lapacke_zungtr.o \ -+lapacke_zungtr_work.o \ -+lapacke_zunmbr.o \ -+lapacke_zunmbr_work.o \ -+lapacke_zunmhr.o \ -+lapacke_zunmhr_work.o \ -+lapacke_zunmlq.o \ -+lapacke_zunmlq_work.o \ -+lapacke_zunmql.o \ -+lapacke_zunmql_work.o \ -+lapacke_zunmqr.o \ -+lapacke_zunmqr_work.o \ -+lapacke_zunmrq.o \ -+lapacke_zunmrq_work.o \ -+lapacke_zunmrz.o \ -+lapacke_zunmrz_work.o \ -+lapacke_zunmtr.o \ -+lapacke_zunmtr_work.o \ -+lapacke_zupgtr.o \ -+lapacke_zupgtr_work.o \ -+lapacke_zupmtr.o \ -+lapacke_zupmtr_work.o -+ -+ -+LAPACKE_EXTENDEDPRECSION_OBJS := \ -+ lapacke_dgbrfsx.o lapacke_dgbrfsx_work.o lapacke_zgbrfsx.o lapacke_zgbrfsx_work.o lapacke_zsyrfsx.o \ -+lapacke_zsyrfsx_work.o \ -+lapacke_zgerfsx.o \ -+lapacke_zgerfsx_work.o \ -+lapacke_zporfsx.o \ -+lapacke_zporfsx_work.o \ -+lapacke_sgerfsx.o \ -+lapacke_sgerfsx_work.o \ -+lapacke_zgesvxx.o \ -+lapacke_zgesvxx_work.o \ -+lapacke_sgbrfsx.o \ -+lapacke_sgbrfsx_work.o \ -+lapacke_ssysvxx.o \ -+lapacke_ssysvxx_work.o \ -+lapacke_sgesvxx.o \ -+lapacke_sgesvxx_work.o \ -+lapacke_cgbsvxx.o \ -+lapacke_cgbsvxx_work.o \ -+lapacke_cporfsx.o \ -+lapacke_cporfsx_work.o \ -+lapacke_cherfsx.o \ -+lapacke_cherfsx_work.o \ -+lapacke_dporfsx.o \ -+lapacke_dporfsx_work.o \ -+lapacke_sposvxx.o \ -+lapacke_sposvxx_work.o \ -+lapacke_sgbsvxx.o \ -+lapacke_sgbsvxx_work.o \ -+lapacke_zposvxx.o \ -+lapacke_zposvxx_work.o \ -+lapacke_chesvxx.o \ -+lapacke_chesvxx_work.o \ -+lapacke_cposvxx.o \ -+lapacke_cposvxx_work.o \ -+lapacke_cgesvxx.o \ -+lapacke_cgesvxx_work.o \ -+lapacke_ssyrfsx.o \ -+lapacke_ssyrfsx_work.o \ -+lapacke_csyrfsx.o \ -+lapacke_csyrfsx_work.o \ -+lapacke_dsysvxx.o \ -+lapacke_dsysvxx_work.o \ -+lapacke_sporfsx.o \ -+lapacke_sporfsx_work.o \ -+lapacke_zherfsx.o \ -+lapacke_zherfsx_work.o \ -+lapacke_csysvxx.o \ -+lapacke_csysvxx_work.o \ -+lapacke_dposvxx.o \ -+lapacke_dposvxx_work.o \ -+lapacke_cgerfsx.o \ -+lapacke_cgerfsx_work.o \ -+lapacke_zgbsvxx.o \ -+lapacke_zgbsvxx_work.o \ -+lapacke_zsysvxx.o \ -+lapacke_zsysvxx_work.o \ -+lapacke_dgesvxx.o \ -+lapacke_dgesvxx_work.o \ -+lapacke_dgerfsx.o \ -+lapacke_dgerfsx_work.o \ -+lapacke_dsyrfsx.o \ -+lapacke_dsyrfsx_work.o \ -+lapacke_claghe.o \ -+lapacke_claghe_work.o \ -+lapacke_zhesvxx.o \ -+lapacke_zhesvxx_work.o \ -+lapacke_cgbrfsx.o \ -+lapacke_cgbrfsx_work.o \ -+lapacke_dgbsvxx.o \ -+lapacke_dgbsvxx_work.o -+ -+LAPACKE_TESTING_OBJS := \ -+ lapacke_slagge.o lapacke_slagge_work.o lapacke_clagge.o lapacke_clagge_work.o \ -+ lapacke_clatms.o lapacke_clatms_work.o lapacke_slatms.o lapacke_slatms_work.o lapacke_zlatms.o lapacke_zlatms_work.o \ -+ lapacke_clagsy.o lapacke_clagsy_work.o lapacke_slagsy.o lapacke_slagsy_work.o \ -+ lapacke_zlagsy.o lapacke_zlagsy_work.o lapacke_zlagge.o lapacke_zlagge_work.o \ -+ lapacke_dlatms.o lapacke_dlatms_work.o lapacke_zlaghe.o lapacke_zlaghe_work.o \ -+ lapacke_dlagsy.o lapacke_dlagsy_work.o lapacke_dlagge.o lapacke_dlagge_work.o -+ -+ -+OBJ_FILES := $(LAPACKE_OBJS) -+ -+ifdef LAPACKE_EXTENDED -+OBJ_FILES += $(LAPACKE_EXTENDEDPRECSION_OBJS) -+endif -+ -+ifdef LAPACKE_TESTING -+OBJ_FILES += $(LAPACK_TESTING_OBJS) -+endif - - all: lib - - lib: $(OBJ_FILES) -- $(ARCH) $(ARCHFLAGS) ../$(LAPACKE) $(OBJ_FILES) -+# http://hackage.haskell.org/trac/gtk2hs/ticket/1146 -+ echo $(OBJ_FILES) | xargs --max-args=100 $(ARCH) $(ARCHFLAGS) ../$(LAPACKE) - $(RANLIB) ../$(LAPACKE) - - .c.o: diff --git a/patch.for_lapack-3.4.1 b/patch.for_lapack-3.4.1 deleted file mode 100644 index ff4954b09..000000000 --- a/patch.for_lapack-3.4.1 +++ /dev/null @@ -1,932 +0,0 @@ -diff -ruN lapack-3.4.1.old/INSTALL/Makefile lapack-3.4.1/INSTALL/Makefile ---- lapack-3.4.1.old/INSTALL/Makefile 2011-10-01 04:37:03 +0200 -+++ lapack-3.4.1/INSTALL/Makefile 2012-04-22 21:48:48 +0200 -@@ -27,7 +27,7 @@ - $(LOADER) $(LOADOPTS) -o testversion ilaver.o LAPACK_version.o - - clean: -- rm -f *.o -+ rm -f *.o test* - .f.o: - $(FORTRAN) $(OPTS) -c $< -o $@ - -diff -ruN lapack-3.4.1.old/Makefile lapack-3.4.1/Makefile ---- lapack-3.4.1.old/Makefile 2012-04-13 20:13:07 +0200 -+++ lapack-3.4.1/Makefile 2012-04-22 21:48:07 +0200 -@@ -20,9 +20,12 @@ - blaslib: - ( cd BLAS/SRC; $(MAKE) ) - --lapacklib: lapack_install -+lapacklib: - ( cd SRC; $(MAKE) ) - -+lapack_prof: -+ ( cd SRC; $(MAKE) lapack_prof) -+ - lapackelib: lapacklib - ( cd lapacke; $(MAKE) ) - -diff -ruN lapack-3.4.1.old/SRC/Makefile lapack-3.4.1/SRC/Makefile ---- lapack-3.4.1.old/SRC/Makefile 2012-04-02 21:06:36 +0200 -+++ lapack-3.4.1/SRC/Makefile 2012-04-22 21:40:21 +0200 -@@ -54,363 +54,371 @@ - # - ####################################################################### - --ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \ -- ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ -- ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o -+ALLAUX = ilaenv.$(SUFFIX) ieeeck.$(SUFFIX) lsamen.$(SUFFIX) xerbla_array.$(SUFFIX) iparmq.$(SUFFIX) \ -+ ilaprec.$(SUFFIX) ilatrans.$(SUFFIX) ilauplo.$(SUFFIX) iladiag.$(SUFFIX) chla_transtype.$(SUFFIX) \ -+ ../INSTALL/ilaver.$(SUFFIX) - - SCLAUX = \ -- sbdsdc.o \ -- sbdsqr.o sdisna.o slabad.o slacpy.o sladiv.o slae2.o slaebz.o \ -- slaed0.o slaed1.o slaed2.o slaed3.o slaed4.o slaed5.o slaed6.o \ -- slaed7.o slaed8.o slaed9.o slaeda.o slaev2.o slagtf.o \ -- slagts.o slamrg.o slanst.o \ -- slapy2.o slapy3.o slarnv.o \ -- slarra.o slarrb.o slarrc.o slarrd.o slarre.o slarrf.o slarrj.o \ -- slarrk.o slarrr.o slaneg.o \ -- slartg.o slaruv.o slas2.o slascl.o \ -- slasd0.o slasd1.o slasd2.o slasd3.o slasd4.o slasd5.o slasd6.o \ -- slasd7.o slasd8.o slasda.o slasdq.o slasdt.o \ -- slaset.o slasq1.o slasq2.o slasq3.o slasq4.o slasq5.o slasq6.o \ -- slasr.o slasrt.o slassq.o slasv2.o spttrf.o sstebz.o sstedc.o \ -- ssteqr.o ssterf.o slaisnan.o sisnan.o \ -- slartgp.o slartgs.o \ -- ../INSTALL/second_$(TIMER).o -+ sbdsdc.$(SUFFIX) \ -+ sbdsqr.$(SUFFIX) sdisna.$(SUFFIX) slabad.$(SUFFIX) slacpy.$(SUFFIX) sladiv.$(SUFFIX) slae2.$(SUFFIX) slaebz.$(SUFFIX) \ -+ slaed0.$(SUFFIX) slaed1.$(SUFFIX) slaed2.$(SUFFIX) slaed3.$(SUFFIX) slaed4.$(SUFFIX) slaed5.$(SUFFIX) slaed6.$(SUFFIX) \ -+ slaed7.$(SUFFIX) slaed8.$(SUFFIX) slaed9.$(SUFFIX) slaeda.$(SUFFIX) slaev2.$(SUFFIX) slagtf.$(SUFFIX) \ -+ slagts.$(SUFFIX) slamrg.$(SUFFIX) slanst.$(SUFFIX) \ -+ slapy2.$(SUFFIX) slapy3.$(SUFFIX) slarnv.$(SUFFIX) \ -+ slarra.$(SUFFIX) slarrb.$(SUFFIX) slarrc.$(SUFFIX) slarrd.$(SUFFIX) slarre.$(SUFFIX) slarrf.$(SUFFIX) slarrj.$(SUFFIX) \ -+ slarrk.$(SUFFIX) slarrr.$(SUFFIX) slaneg.$(SUFFIX) \ -+ slartg.$(SUFFIX) slaruv.$(SUFFIX) slas2.$(SUFFIX) slascl.$(SUFFIX) \ -+ slasd0.$(SUFFIX) slasd1.$(SUFFIX) slasd2.$(SUFFIX) slasd3.$(SUFFIX) slasd4.$(SUFFIX) slasd5.$(SUFFIX) slasd6.$(SUFFIX) \ -+ slasd7.$(SUFFIX) slasd8.$(SUFFIX) slasda.$(SUFFIX) slasdq.$(SUFFIX) slasdt.$(SUFFIX) \ -+ slaset.$(SUFFIX) slasq1.$(SUFFIX) slasq2.$(SUFFIX) slasq3.$(SUFFIX) slasq4.$(SUFFIX) slasq5.$(SUFFIX) slasq6.$(SUFFIX) \ -+ slasr.$(SUFFIX) slasrt.$(SUFFIX) slassq.$(SUFFIX) slasv2.$(SUFFIX) spttrf.$(SUFFIX) sstebz.$(SUFFIX) sstedc.$(SUFFIX) \ -+ ssteqr.$(SUFFIX) ssterf.$(SUFFIX) slaisnan.$(SUFFIX) sisnan.$(SUFFIX) \ -+ slartgp.$(SUFFIX) slartgs.$(SUFFIX) \ -+ ../INSTALL/second_$(TIMER).$(SUFFIX) - - DZLAUX = \ -- dbdsdc.o \ -- dbdsqr.o ddisna.o dlabad.o dlacpy.o dladiv.o dlae2.o dlaebz.o \ -- dlaed0.o dlaed1.o dlaed2.o dlaed3.o dlaed4.o dlaed5.o dlaed6.o \ -- dlaed7.o dlaed8.o dlaed9.o dlaeda.o dlaev2.o dlagtf.o \ -- dlagts.o dlamrg.o dlanst.o \ -- dlapy2.o dlapy3.o dlarnv.o \ -- dlarra.o dlarrb.o dlarrc.o dlarrd.o dlarre.o dlarrf.o dlarrj.o \ -- dlarrk.o dlarrr.o dlaneg.o \ -- dlartg.o dlaruv.o dlas2.o dlascl.o \ -- dlasd0.o dlasd1.o dlasd2.o dlasd3.o dlasd4.o dlasd5.o dlasd6.o \ -- dlasd7.o dlasd8.o dlasda.o dlasdq.o dlasdt.o \ -- dlaset.o dlasq1.o dlasq2.o dlasq3.o dlasq4.o dlasq5.o dlasq6.o \ -- dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \ -- dsteqr.o dsterf.o dlaisnan.o disnan.o \ -- dlartgp.o dlartgs.o \ -- ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o -+ dbdsdc.$(SUFFIX) \ -+ dbdsqr.$(SUFFIX) ddisna.$(SUFFIX) dlabad.$(SUFFIX) dlacpy.$(SUFFIX) dladiv.$(SUFFIX) dlae2.$(SUFFIX) dlaebz.$(SUFFIX) \ -+ dlaed0.$(SUFFIX) dlaed1.$(SUFFIX) dlaed2.$(SUFFIX) dlaed3.$(SUFFIX) dlaed4.$(SUFFIX) dlaed5.$(SUFFIX) dlaed6.$(SUFFIX) \ -+ dlaed7.$(SUFFIX) dlaed8.$(SUFFIX) dlaed9.$(SUFFIX) dlaeda.$(SUFFIX) dlaev2.$(SUFFIX) dlagtf.$(SUFFIX) \ -+ dlagts.$(SUFFIX) dlamrg.$(SUFFIX) dlanst.$(SUFFIX) \ -+ dlapy2.$(SUFFIX) dlapy3.$(SUFFIX) dlarnv.$(SUFFIX) \ -+ dlarra.$(SUFFIX) dlarrb.$(SUFFIX) dlarrc.$(SUFFIX) dlarrd.$(SUFFIX) dlarre.$(SUFFIX) dlarrf.$(SUFFIX) dlarrj.$(SUFFIX) \ -+ dlarrk.$(SUFFIX) dlarrr.$(SUFFIX) dlaneg.$(SUFFIX) \ -+ dlartg.$(SUFFIX) dlaruv.$(SUFFIX) dlas2.$(SUFFIX) dlascl.$(SUFFIX) \ -+ dlasd0.$(SUFFIX) dlasd1.$(SUFFIX) dlasd2.$(SUFFIX) dlasd3.$(SUFFIX) dlasd4.$(SUFFIX) dlasd5.$(SUFFIX) dlasd6.$(SUFFIX) \ -+ dlasd7.$(SUFFIX) dlasd8.$(SUFFIX) dlasda.$(SUFFIX) dlasdq.$(SUFFIX) dlasdt.$(SUFFIX) \ -+ dlaset.$(SUFFIX) dlasq1.$(SUFFIX) dlasq2.$(SUFFIX) dlasq3.$(SUFFIX) dlasq4.$(SUFFIX) dlasq5.$(SUFFIX) dlasq6.$(SUFFIX) \ -+ dlasr.$(SUFFIX) dlasrt.$(SUFFIX) dlassq.$(SUFFIX) dlasv2.$(SUFFIX) dpttrf.$(SUFFIX) dstebz.$(SUFFIX) dstedc.$(SUFFIX) \ -+ dsteqr.$(SUFFIX) dsterf.$(SUFFIX) dlaisnan.$(SUFFIX) disnan.$(SUFFIX) \ -+ dlartgp.$(SUFFIX) dlartgs.$(SUFFIX) \ -+ ../INSTALL/dsecnd_$(TIMER).$(SUFFIX) - - SLASRC = \ -- sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \ -- sgbsvx.o sgbtf2.o sgbtrf.o sgbtrs.o sgebak.o sgebal.o sgebd2.o \ -- sgebrd.o sgecon.o sgeequ.o sgees.o sgeesx.o sgeev.o sgeevx.o \ -- sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \ -- sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ -- sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ -- sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ -- sgetc2.o sgetf2.o sgetri.o \ -- sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ -- sggglm.o sgghrd.o sgglse.o sggqrf.o \ -- sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ -- sgtsvx.o sgttrf.o sgttrs.o sgtts2.o shgeqz.o \ -- shsein.o shseqr.o slabrd.o slacon.o slacn2.o \ -- slaein.o slaexc.o slag2.o slags2.o slagtm.o slagv2.o slahqr.o \ -- slahrd.o slahr2.o slaic1.o slaln2.o slals0.o slalsa.o slalsd.o \ -- slangb.o slange.o slangt.o slanhs.o slansb.o slansp.o \ -- slansy.o slantb.o slantp.o slantr.o slanv2.o \ -- slapll.o slapmt.o \ -- slaqgb.o slaqge.o slaqp2.o slaqps.o slaqsb.o slaqsp.o slaqsy.o \ -- slaqr0.o slaqr1.o slaqr2.o slaqr3.o slaqr4.o slaqr5.o \ -- slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \ -- slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \ -- slarrv.o slartv.o \ -- slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o \ -- slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ -- slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ -- sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ -- sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ -- sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ -- sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ -- spbstf.o spbsv.o spbsvx.o \ -- spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ -- sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \ -- sppcon.o sppequ.o \ -- spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ -- spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ -- ssbev.o ssbevd.o ssbevx.o ssbgst.o ssbgv.o ssbgvd.o ssbgvx.o \ -- ssbtrd.o sspcon.o sspev.o sspevd.o sspevx.o sspgst.o \ -- sspgv.o sspgvd.o sspgvx.o ssprfs.o sspsv.o sspsvx.o ssptrd.o \ -- ssptrf.o ssptri.o ssptrs.o sstegr.o sstein.o sstev.o sstevd.o sstevr.o \ -- sstevx.o \ -- ssycon.o ssyev.o ssyevd.o ssyevr.o ssyevx.o ssygs2.o \ -- ssygst.o ssygv.o ssygvd.o ssygvx.o ssyrfs.o ssysv.o ssysvx.o \ -- ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytri2.o ssytri2x.o \ -- ssyswapr.o ssytrs.o ssytrs2.o ssyconv.o \ -- stbcon.o \ -- stbrfs.o stbtrs.o stgevc.o stgex2.o stgexc.o stgsen.o \ -- stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ -- stptrs.o \ -- strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ -- strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ -- slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ -- stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ -- sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ -- sgeequb.o ssyequb.o spoequb.o sgbequb.o \ -- sbbcsd.o slapmr.o sorbdb.o sorcsd.o \ -- sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ -- stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -+ sgbbrd.$(SUFFIX) sgbcon.$(SUFFIX) sgbequ.$(SUFFIX) sgbrfs.$(SUFFIX) sgbsv.$(SUFFIX) \ -+ sgbsvx.$(SUFFIX) sgbtf2.$(SUFFIX) sgbtrf.$(SUFFIX) sgbtrs.$(SUFFIX) sgebak.$(SUFFIX) sgebal.$(SUFFIX) sgebd2.$(SUFFIX) \ -+ sgebrd.$(SUFFIX) sgecon.$(SUFFIX) sgeequ.$(SUFFIX) sgees.$(SUFFIX) sgeesx.$(SUFFIX) sgeev.$(SUFFIX) sgeevx.$(SUFFIX) \ -+ sgegs.$(SUFFIX) sgegv.$(SUFFIX) sgehd2.$(SUFFIX) sgehrd.$(SUFFIX) sgelq2.$(SUFFIX) sgelqf.$(SUFFIX) \ -+ sgels.$(SUFFIX) sgelsd.$(SUFFIX) sgelss.$(SUFFIX) sgelsx.$(SUFFIX) sgelsy.$(SUFFIX) sgeql2.$(SUFFIX) sgeqlf.$(SUFFIX) \ -+ sgeqp3.$(SUFFIX) sgeqpf.$(SUFFIX) sgeqr2.$(SUFFIX) sgeqr2p.$(SUFFIX) sgeqrf.$(SUFFIX) sgeqrfp.$(SUFFIX) sgerfs.$(SUFFIX) \ -+ sgerq2.$(SUFFIX) sgerqf.$(SUFFIX) sgesc2.$(SUFFIX) sgesdd.$(SUFFIX) sgesv.$(SUFFIX) sgesvd.$(SUFFIX) sgesvx.$(SUFFIX) \ -+ sgetc2.$(SUFFIX) sgetri.$(SUFFIX) \ -+ sggbak.$(SUFFIX) sggbal.$(SUFFIX) sgges.$(SUFFIX) sggesx.$(SUFFIX) sggev.$(SUFFIX) sggevx.$(SUFFIX) \ -+ sggglm.$(SUFFIX) sgghrd.$(SUFFIX) sgglse.$(SUFFIX) sggqrf.$(SUFFIX) \ -+ sggrqf.$(SUFFIX) sggsvd.$(SUFFIX) sggsvp.$(SUFFIX) sgtcon.$(SUFFIX) sgtrfs.$(SUFFIX) sgtsv.$(SUFFIX) \ -+ sgtsvx.$(SUFFIX) sgttrf.$(SUFFIX) sgttrs.$(SUFFIX) sgtts2.$(SUFFIX) shgeqz.$(SUFFIX) \ -+ shsein.$(SUFFIX) shseqr.$(SUFFIX) slabrd.$(SUFFIX) slacon.$(SUFFIX) slacn2.$(SUFFIX) \ -+ slaein.$(SUFFIX) slaexc.$(SUFFIX) slag2.$(SUFFIX) slags2.$(SUFFIX) slagtm.$(SUFFIX) slagv2.$(SUFFIX) slahqr.$(SUFFIX) \ -+ slahrd.$(SUFFIX) slahr2.$(SUFFIX) slaic1.$(SUFFIX) slaln2.$(SUFFIX) slals0.$(SUFFIX) slalsa.$(SUFFIX) slalsd.$(SUFFIX) \ -+ slangb.$(SUFFIX) slange.$(SUFFIX) slangt.$(SUFFIX) slanhs.$(SUFFIX) slansb.$(SUFFIX) slansp.$(SUFFIX) \ -+ slansy.$(SUFFIX) slantb.$(SUFFIX) slantp.$(SUFFIX) slantr.$(SUFFIX) slanv2.$(SUFFIX) \ -+ slapll.$(SUFFIX) slapmt.$(SUFFIX) \ -+ slaqgb.$(SUFFIX) slaqge.$(SUFFIX) slaqp2.$(SUFFIX) slaqps.$(SUFFIX) slaqsb.$(SUFFIX) slaqsp.$(SUFFIX) slaqsy.$(SUFFIX) \ -+ slaqr0.$(SUFFIX) slaqr1.$(SUFFIX) slaqr2.$(SUFFIX) slaqr3.$(SUFFIX) slaqr4.$(SUFFIX) slaqr5.$(SUFFIX) \ -+ slaqtr.$(SUFFIX) slar1v.$(SUFFIX) slar2v.$(SUFFIX) ilaslr.$(SUFFIX) ilaslc.$(SUFFIX) \ -+ slarf.$(SUFFIX) slarfb.$(SUFFIX) slarfg.$(SUFFIX) slarfgp.$(SUFFIX) slarft.$(SUFFIX) slarfx.$(SUFFIX) slargv.$(SUFFIX) \ -+ slarrv.$(SUFFIX) slartv.$(SUFFIX) \ -+ slarz.$(SUFFIX) slarzb.$(SUFFIX) slarzt.$(SUFFIX) slasy2.$(SUFFIX) slasyf.$(SUFFIX) \ -+ slatbs.$(SUFFIX) slatdf.$(SUFFIX) slatps.$(SUFFIX) slatrd.$(SUFFIX) slatrs.$(SUFFIX) slatrz.$(SUFFIX) slatzm.$(SUFFIX) \ -+ sopgtr.$(SUFFIX) sopmtr.$(SUFFIX) sorg2l.$(SUFFIX) sorg2r.$(SUFFIX) \ -+ sorgbr.$(SUFFIX) sorghr.$(SUFFIX) sorgl2.$(SUFFIX) sorglq.$(SUFFIX) sorgql.$(SUFFIX) sorgqr.$(SUFFIX) sorgr2.$(SUFFIX) \ -+ sorgrq.$(SUFFIX) sorgtr.$(SUFFIX) sorm2l.$(SUFFIX) sorm2r.$(SUFFIX) \ -+ sormbr.$(SUFFIX) sormhr.$(SUFFIX) sorml2.$(SUFFIX) sormlq.$(SUFFIX) sormql.$(SUFFIX) sormqr.$(SUFFIX) sormr2.$(SUFFIX) \ -+ sormr3.$(SUFFIX) sormrq.$(SUFFIX) sormrz.$(SUFFIX) sormtr.$(SUFFIX) spbcon.$(SUFFIX) spbequ.$(SUFFIX) spbrfs.$(SUFFIX) \ -+ spbstf.$(SUFFIX) spbsv.$(SUFFIX) spbsvx.$(SUFFIX) \ -+ spbtf2.$(SUFFIX) spbtrf.$(SUFFIX) spbtrs.$(SUFFIX) spocon.$(SUFFIX) spoequ.$(SUFFIX) sporfs.$(SUFFIX) sposv.$(SUFFIX) \ -+ sposvx.$(SUFFIX) spotri.$(SUFFIX) spstrf.$(SUFFIX) spstf2.$(SUFFIX) \ -+ sppcon.$(SUFFIX) sppequ.$(SUFFIX) \ -+ spprfs.$(SUFFIX) sppsv.$(SUFFIX) sppsvx.$(SUFFIX) spptrf.$(SUFFIX) spptri.$(SUFFIX) spptrs.$(SUFFIX) sptcon.$(SUFFIX) \ -+ spteqr.$(SUFFIX) sptrfs.$(SUFFIX) sptsv.$(SUFFIX) sptsvx.$(SUFFIX) spttrs.$(SUFFIX) sptts2.$(SUFFIX) srscl.$(SUFFIX) \ -+ ssbev.$(SUFFIX) ssbevd.$(SUFFIX) ssbevx.$(SUFFIX) ssbgst.$(SUFFIX) ssbgv.$(SUFFIX) ssbgvd.$(SUFFIX) ssbgvx.$(SUFFIX) \ -+ ssbtrd.$(SUFFIX) sspcon.$(SUFFIX) sspev.$(SUFFIX) sspevd.$(SUFFIX) sspevx.$(SUFFIX) sspgst.$(SUFFIX) \ -+ sspgv.$(SUFFIX) sspgvd.$(SUFFIX) sspgvx.$(SUFFIX) ssprfs.$(SUFFIX) sspsv.$(SUFFIX) sspsvx.$(SUFFIX) ssptrd.$(SUFFIX) \ -+ ssptrf.$(SUFFIX) ssptri.$(SUFFIX) ssptrs.$(SUFFIX) sstegr.$(SUFFIX) sstein.$(SUFFIX) sstev.$(SUFFIX) sstevd.$(SUFFIX) sstevr.$(SUFFIX) \ -+ sstevx.$(SUFFIX) \ -+ ssycon.$(SUFFIX) ssyev.$(SUFFIX) ssyevd.$(SUFFIX) ssyevr.$(SUFFIX) ssyevx.$(SUFFIX) ssygs2.$(SUFFIX) \ -+ ssygst.$(SUFFIX) ssygv.$(SUFFIX) ssygvd.$(SUFFIX) ssygvx.$(SUFFIX) ssyrfs.$(SUFFIX) ssysv.$(SUFFIX) ssysvx.$(SUFFIX) \ -+ ssytd2.$(SUFFIX) ssytf2.$(SUFFIX) ssytrd.$(SUFFIX) ssytrf.$(SUFFIX) ssytri.$(SUFFIX) ssytri2.$(SUFFIX) ssytri2x.$(SUFFIX) \ -+ ssyswapr.$(SUFFIX) ssytrs.$(SUFFIX) ssytrs2.$(SUFFIX) ssyconv.$(SUFFIX) \ -+ stbcon.$(SUFFIX) \ -+ stbrfs.$(SUFFIX) stbtrs.$(SUFFIX) stgevc.$(SUFFIX) stgex2.$(SUFFIX) stgexc.$(SUFFIX) stgsen.$(SUFFIX) \ -+ stgsja.$(SUFFIX) stgsna.$(SUFFIX) stgsy2.$(SUFFIX) stgsyl.$(SUFFIX) stpcon.$(SUFFIX) stprfs.$(SUFFIX) stptri.$(SUFFIX) \ -+ stptrs.$(SUFFIX) \ -+ strcon.$(SUFFIX) strevc.$(SUFFIX) strexc.$(SUFFIX) strrfs.$(SUFFIX) strsen.$(SUFFIX) strsna.$(SUFFIX) strsyl.$(SUFFIX) \ -+ strtrs.$(SUFFIX) stzrqf.$(SUFFIX) stzrzf.$(SUFFIX) sstemr.$(SUFFIX) \ -+ slansf.$(SUFFIX) spftrf.$(SUFFIX) spftri.$(SUFFIX) spftrs.$(SUFFIX) ssfrk.$(SUFFIX) stfsm.$(SUFFIX) stftri.$(SUFFIX) stfttp.$(SUFFIX) \ -+ stfttr.$(SUFFIX) stpttf.$(SUFFIX) stpttr.$(SUFFIX) strttf.$(SUFFIX) strttp.$(SUFFIX) \ -+ sgejsv.$(SUFFIX) sgesvj.$(SUFFIX) sgsvj0.$(SUFFIX) sgsvj1.$(SUFFIX) \ -+ sgeequb.$(SUFFIX) ssyequb.$(SUFFIX) spoequb.$(SUFFIX) sgbequb.$(SUFFIX) \ -+ sbbcsd.$(SUFFIX) slapmr.$(SUFFIX) sorbdb.$(SUFFIX) sorcsd.$(SUFFIX) \ -+ sgeqrt.$(SUFFIX) sgeqrt2.$(SUFFIX) sgeqrt3.$(SUFFIX) sgemqrt.$(SUFFIX) \ -+ stpqrt.$(SUFFIX) stpqrt2.$(SUFFIX) stpmqrt.$(SUFFIX) stprfb.$(SUFFIX) - --DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o -+DSLASRC = spotrs.$(SUFFIX) - - ifdef USEXBLAS --SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ -- sla_gercond.o sla_gerpvgrw.o ssysvxx.o ssyrfsx.o \ -- sla_syrfsx_extended.o sla_syamv.o sla_syrcond.o sla_syrpvgrw.o \ -- sposvxx.o sporfsx.o sla_porfsx_extended.o sla_porcond.o \ -- sla_porpvgrw.o sgbsvxx.o sgbrfsx.o sla_gbrfsx_extended.o \ -- sla_gbamv.o sla_gbrcond.o sla_gbrpvgrw.o sla_lin_berr.o slarscl2.o \ -- slascl2.o sla_wwaddw.o -+SXLASRC = sgesvxx.$(SUFFIX) sgerfsx.$(SUFFIX) sla_gerfsx_extended.$(SUFFIX) sla_geamv.$(SUFFIX) \ -+ sla_gercond.$(SUFFIX) sla_gerpvgrw.$(SUFFIX) ssysvxx.$(SUFFIX) ssyrfsx.$(SUFFIX) \ -+ sla_syrfsx_extended.$(SUFFIX) sla_syamv.$(SUFFIX) sla_syrcond.$(SUFFIX) sla_syrpvgrw.$(SUFFIX) \ -+ sposvxx.$(SUFFIX) sporfsx.$(SUFFIX) sla_porfsx_extended.$(SUFFIX) sla_porcond.$(SUFFIX) \ -+ sla_porpvgrw.$(SUFFIX) sgbsvxx.$(SUFFIX) sgbrfsx.$(SUFFIX) sla_gbrfsx_extended.$(SUFFIX) \ -+ sla_gbamv.$(SUFFIX) sla_gbrcond.$(SUFFIX) sla_gbrpvgrw.$(SUFFIX) sla_lin_berr.$(SUFFIX) slarscl2.$(SUFFIX) \ -+ slascl2.$(SUFFIX) sla_wwaddw.$(SUFFIX) - endif - - CLASRC = \ -- cbdsqr.o cgbbrd.o cgbcon.o cgbequ.o cgbrfs.o cgbsv.o cgbsvx.o \ -- cgbtf2.o cgbtrf.o cgbtrs.o cgebak.o cgebal.o cgebd2.o cgebrd.o \ -- cgecon.o cgeequ.o cgees.o cgeesx.o cgeev.o cgeevx.o \ -- cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \ -- cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ -- cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ -- cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ -- cgesvx.o cgetc2.o cgetf2.o cgetri.o \ -- cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ -- cgghrd.o cgglse.o cggqrf.o cggrqf.o \ -- cggsvd.o cggsvp.o \ -- cgtcon.o cgtrfs.o cgtsv.o cgtsvx.o cgttrf.o cgttrs.o cgtts2.o chbev.o \ -- chbevd.o chbevx.o chbgst.o chbgv.o chbgvd.o chbgvx.o chbtrd.o \ -- checon.o cheev.o cheevd.o cheevr.o cheevx.o chegs2.o chegst.o \ -- chegv.o chegvd.o chegvx.o cherfs.o chesv.o chesvx.o chetd2.o \ -- chetf2.o chetrd.o \ -- chetrf.o chetri.o chetri2.o chetri2x.o cheswapr.o \ -- chetrs.o chetrs2.o chgeqz.o chpcon.o chpev.o chpevd.o \ -- chpevx.o chpgst.o chpgv.o chpgvd.o chpgvx.o chprfs.o chpsv.o \ -- chpsvx.o \ -- chptrd.o chptrf.o chptri.o chptrs.o chsein.o chseqr.o clabrd.o \ -- clacgv.o clacon.o clacn2.o clacp2.o clacpy.o clacrm.o clacrt.o cladiv.o \ -- claed0.o claed7.o claed8.o \ -- claein.o claesy.o claev2.o clags2.o clagtm.o \ -- clahef.o clahqr.o \ -- clahrd.o clahr2.o claic1.o clals0.o clalsa.o clalsd.o clangb.o clange.o clangt.o \ -- clanhb.o clanhe.o \ -- clanhp.o clanhs.o clanht.o clansb.o clansp.o clansy.o clantb.o \ -- clantp.o clantr.o clapll.o clapmt.o clarcm.o claqgb.o claqge.o \ -- claqhb.o claqhe.o claqhp.o claqp2.o claqps.o claqsb.o \ -- claqr0.o claqr1.o claqr2.o claqr3.o claqr4.o claqr5.o \ -- claqsp.o claqsy.o clar1v.o clar2v.o ilaclr.o ilaclc.o \ -- clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \ -- clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ -- clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ -- claswp.o clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ -- clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ -- cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ -- cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \ -- cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ -- cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ -- crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ -- cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \ -- cstegr.o cstein.o csteqr.o \ -- csycon.o csymv.o \ -- csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \ -- csyswapr.o csytrs.o csytrs2.o csyconv.o \ -- ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \ -- ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ -- ctprfs.o ctptri.o \ -- ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ -- ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ -- cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ -- cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ -- cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ -- cunmtr.o cupgtr.o cupmtr.o icmax1.o scsum1.o cstemr.o \ -- chfrk.o ctfttp.o clanhf.o cpftrf.o cpftri.o cpftrs.o ctfsm.o ctftri.o \ -- ctfttr.o ctpttf.o ctpttr.o ctrttf.o ctrttp.o \ -- cgeequb.o cgbequb.o csyequb.o cpoequb.o cheequb.o \ -- cbbcsd.o clapmr.o cunbdb.o cuncsd.o \ -- cgeqrt.o cgeqrt2.o cgeqrt3.o cgemqrt.o \ -- ctpqrt.o ctpqrt2.o ctpmqrt.o ctprfb.o -+ cbdsqr.$(SUFFIX) cgbbrd.$(SUFFIX) cgbcon.$(SUFFIX) cgbequ.$(SUFFIX) cgbrfs.$(SUFFIX) cgbsv.$(SUFFIX) cgbsvx.$(SUFFIX) \ -+ cgbtf2.$(SUFFIX) cgbtrf.$(SUFFIX) cgbtrs.$(SUFFIX) cgebak.$(SUFFIX) cgebal.$(SUFFIX) cgebd2.$(SUFFIX) cgebrd.$(SUFFIX) \ -+ cgecon.$(SUFFIX) cgeequ.$(SUFFIX) cgees.$(SUFFIX) cgeesx.$(SUFFIX) cgeev.$(SUFFIX) cgeevx.$(SUFFIX) \ -+ cgegs.$(SUFFIX) cgegv.$(SUFFIX) cgehd2.$(SUFFIX) cgehrd.$(SUFFIX) cgelq2.$(SUFFIX) cgelqf.$(SUFFIX) \ -+ cgels.$(SUFFIX) cgelsd.$(SUFFIX) cgelss.$(SUFFIX) cgelsx.$(SUFFIX) cgelsy.$(SUFFIX) cgeql2.$(SUFFIX) cgeqlf.$(SUFFIX) cgeqp3.$(SUFFIX) \ -+ cgeqpf.$(SUFFIX) cgeqr2.$(SUFFIX) cgeqr2p.$(SUFFIX) cgeqrf.$(SUFFIX) cgeqrfp.$(SUFFIX) cgerfs.$(SUFFIX) \ -+ cgerq2.$(SUFFIX) cgerqf.$(SUFFIX) cgesc2.$(SUFFIX) cgesdd.$(SUFFIX) cgesv.$(SUFFIX) cgesvd.$(SUFFIX) \ -+ cgesvx.$(SUFFIX) cgetc2.$(SUFFIX) cgetri.$(SUFFIX) \ -+ cggbak.$(SUFFIX) cggbal.$(SUFFIX) cgges.$(SUFFIX) cggesx.$(SUFFIX) cggev.$(SUFFIX) cggevx.$(SUFFIX) cggglm.$(SUFFIX) \ -+ cgghrd.$(SUFFIX) cgglse.$(SUFFIX) cggqrf.$(SUFFIX) cggrqf.$(SUFFIX) \ -+ cggsvd.$(SUFFIX) cggsvp.$(SUFFIX) \ -+ cgtcon.$(SUFFIX) cgtrfs.$(SUFFIX) cgtsv.$(SUFFIX) cgtsvx.$(SUFFIX) cgttrf.$(SUFFIX) cgttrs.$(SUFFIX) cgtts2.$(SUFFIX) chbev.$(SUFFIX) \ -+ chbevd.$(SUFFIX) chbevx.$(SUFFIX) chbgst.$(SUFFIX) chbgv.$(SUFFIX) chbgvd.$(SUFFIX) chbgvx.$(SUFFIX) chbtrd.$(SUFFIX) \ -+ checon.$(SUFFIX) cheev.$(SUFFIX) cheevd.$(SUFFIX) cheevr.$(SUFFIX) cheevx.$(SUFFIX) chegs2.$(SUFFIX) chegst.$(SUFFIX) \ -+ chegv.$(SUFFIX) chegvd.$(SUFFIX) chegvx.$(SUFFIX) cherfs.$(SUFFIX) chesv.$(SUFFIX) chesvx.$(SUFFIX) chetd2.$(SUFFIX) \ -+ chetf2.$(SUFFIX) chetrd.$(SUFFIX) \ -+ chetrf.$(SUFFIX) chetri.$(SUFFIX) chetri2.$(SUFFIX) chetri2x.$(SUFFIX) cheswapr.$(SUFFIX) \ -+ chetrs.$(SUFFIX) chetrs2.$(SUFFIX) chgeqz.$(SUFFIX) chpcon.$(SUFFIX) chpev.$(SUFFIX) chpevd.$(SUFFIX) \ -+ chpevx.$(SUFFIX) chpgst.$(SUFFIX) chpgv.$(SUFFIX) chpgvd.$(SUFFIX) chpgvx.$(SUFFIX) chprfs.$(SUFFIX) chpsv.$(SUFFIX) \ -+ chpsvx.$(SUFFIX) \ -+ chptrd.$(SUFFIX) chptrf.$(SUFFIX) chptri.$(SUFFIX) chptrs.$(SUFFIX) chsein.$(SUFFIX) chseqr.$(SUFFIX) clabrd.$(SUFFIX) \ -+ clacgv.$(SUFFIX) clacon.$(SUFFIX) clacn2.$(SUFFIX) clacp2.$(SUFFIX) clacpy.$(SUFFIX) clacrm.$(SUFFIX) clacrt.$(SUFFIX) cladiv.$(SUFFIX) \ -+ claed0.$(SUFFIX) claed7.$(SUFFIX) claed8.$(SUFFIX) \ -+ claein.$(SUFFIX) claesy.$(SUFFIX) claev2.$(SUFFIX) clags2.$(SUFFIX) clagtm.$(SUFFIX) \ -+ clahef.$(SUFFIX) clahqr.$(SUFFIX) \ -+ clahrd.$(SUFFIX) clahr2.$(SUFFIX) claic1.$(SUFFIX) clals0.$(SUFFIX) clalsa.$(SUFFIX) clalsd.$(SUFFIX) clangb.$(SUFFIX) clange.$(SUFFIX) clangt.$(SUFFIX) \ -+ clanhb.$(SUFFIX) clanhe.$(SUFFIX) \ -+ clanhp.$(SUFFIX) clanhs.$(SUFFIX) clanht.$(SUFFIX) clansb.$(SUFFIX) clansp.$(SUFFIX) clansy.$(SUFFIX) clantb.$(SUFFIX) \ -+ clantp.$(SUFFIX) clantr.$(SUFFIX) clapll.$(SUFFIX) clapmt.$(SUFFIX) clarcm.$(SUFFIX) claqgb.$(SUFFIX) claqge.$(SUFFIX) \ -+ claqhb.$(SUFFIX) claqhe.$(SUFFIX) claqhp.$(SUFFIX) claqp2.$(SUFFIX) claqps.$(SUFFIX) claqsb.$(SUFFIX) \ -+ claqr0.$(SUFFIX) claqr1.$(SUFFIX) claqr2.$(SUFFIX) claqr3.$(SUFFIX) claqr4.$(SUFFIX) claqr5.$(SUFFIX) \ -+ claqsp.$(SUFFIX) claqsy.$(SUFFIX) clar1v.$(SUFFIX) clar2v.$(SUFFIX) ilaclr.$(SUFFIX) ilaclc.$(SUFFIX) \ -+ clarf.$(SUFFIX) clarfb.$(SUFFIX) clarfg.$(SUFFIX) clarft.$(SUFFIX) clarfgp.$(SUFFIX) \ -+ clarfx.$(SUFFIX) clargv.$(SUFFIX) clarnv.$(SUFFIX) clarrv.$(SUFFIX) clartg.$(SUFFIX) clartv.$(SUFFIX) \ -+ clarz.$(SUFFIX) clarzb.$(SUFFIX) clarzt.$(SUFFIX) clascl.$(SUFFIX) claset.$(SUFFIX) clasr.$(SUFFIX) classq.$(SUFFIX) \ -+ clasyf.$(SUFFIX) clatbs.$(SUFFIX) clatdf.$(SUFFIX) clatps.$(SUFFIX) clatrd.$(SUFFIX) clatrs.$(SUFFIX) clatrz.$(SUFFIX) \ -+ clatzm.$(SUFFIX) cpbcon.$(SUFFIX) cpbequ.$(SUFFIX) cpbrfs.$(SUFFIX) cpbstf.$(SUFFIX) cpbsv.$(SUFFIX) \ -+ cpbsvx.$(SUFFIX) cpbtf2.$(SUFFIX) cpbtrf.$(SUFFIX) cpbtrs.$(SUFFIX) cpocon.$(SUFFIX) cpoequ.$(SUFFIX) cporfs.$(SUFFIX) \ -+ cposv.$(SUFFIX) cposvx.$(SUFFIX) cpotri.$(SUFFIX) cpstrf.$(SUFFIX) cpstf2.$(SUFFIX) \ -+ cppcon.$(SUFFIX) cppequ.$(SUFFIX) cpprfs.$(SUFFIX) cppsv.$(SUFFIX) cppsvx.$(SUFFIX) cpptrf.$(SUFFIX) cpptri.$(SUFFIX) cpptrs.$(SUFFIX) \ -+ cptcon.$(SUFFIX) cpteqr.$(SUFFIX) cptrfs.$(SUFFIX) cptsv.$(SUFFIX) cptsvx.$(SUFFIX) cpttrf.$(SUFFIX) cpttrs.$(SUFFIX) cptts2.$(SUFFIX) \ -+ crot.$(SUFFIX) cspcon.$(SUFFIX) cspmv.$(SUFFIX) cspr.$(SUFFIX) csprfs.$(SUFFIX) cspsv.$(SUFFIX) \ -+ cspsvx.$(SUFFIX) csptrf.$(SUFFIX) csptri.$(SUFFIX) csptrs.$(SUFFIX) csrscl.$(SUFFIX) cstedc.$(SUFFIX) \ -+ cstegr.$(SUFFIX) cstein.$(SUFFIX) csteqr.$(SUFFIX) \ -+ csycon.$(SUFFIX) csymv.$(SUFFIX) \ -+ csyr.$(SUFFIX) csyrfs.$(SUFFIX) csysv.$(SUFFIX) csysvx.$(SUFFIX) csytf2.$(SUFFIX) csytrf.$(SUFFIX) csytri.$(SUFFIX) csytri2.$(SUFFIX) csytri2x.$(SUFFIX) \ -+ csyswapr.$(SUFFIX) csytrs.$(SUFFIX) csytrs2.$(SUFFIX) csyconv.$(SUFFIX) \ -+ ctbcon.$(SUFFIX) ctbrfs.$(SUFFIX) ctbtrs.$(SUFFIX) ctgevc.$(SUFFIX) ctgex2.$(SUFFIX) \ -+ ctgexc.$(SUFFIX) ctgsen.$(SUFFIX) ctgsja.$(SUFFIX) ctgsna.$(SUFFIX) ctgsy2.$(SUFFIX) ctgsyl.$(SUFFIX) ctpcon.$(SUFFIX) \ -+ ctprfs.$(SUFFIX) ctptri.$(SUFFIX) \ -+ ctptrs.$(SUFFIX) ctrcon.$(SUFFIX) ctrevc.$(SUFFIX) ctrexc.$(SUFFIX) ctrrfs.$(SUFFIX) ctrsen.$(SUFFIX) ctrsna.$(SUFFIX) \ -+ ctrsyl.$(SUFFIX) ctrtrs.$(SUFFIX) ctzrqf.$(SUFFIX) ctzrzf.$(SUFFIX) cung2l.$(SUFFIX) cung2r.$(SUFFIX) \ -+ cungbr.$(SUFFIX) cunghr.$(SUFFIX) cungl2.$(SUFFIX) cunglq.$(SUFFIX) cungql.$(SUFFIX) cungqr.$(SUFFIX) cungr2.$(SUFFIX) \ -+ cungrq.$(SUFFIX) cungtr.$(SUFFIX) cunm2l.$(SUFFIX) cunm2r.$(SUFFIX) cunmbr.$(SUFFIX) cunmhr.$(SUFFIX) cunml2.$(SUFFIX) \ -+ cunmlq.$(SUFFIX) cunmql.$(SUFFIX) cunmqr.$(SUFFIX) cunmr2.$(SUFFIX) cunmr3.$(SUFFIX) cunmrq.$(SUFFIX) cunmrz.$(SUFFIX) \ -+ cunmtr.$(SUFFIX) cupgtr.$(SUFFIX) cupmtr.$(SUFFIX) icmax1.$(SUFFIX) scsum1.$(SUFFIX) cstemr.$(SUFFIX) \ -+ chfrk.$(SUFFIX) ctfttp.$(SUFFIX) clanhf.$(SUFFIX) cpftrf.$(SUFFIX) cpftri.$(SUFFIX) cpftrs.$(SUFFIX) ctfsm.$(SUFFIX) ctftri.$(SUFFIX) \ -+ ctfttr.$(SUFFIX) ctpttf.$(SUFFIX) ctpttr.$(SUFFIX) ctrttf.$(SUFFIX) ctrttp.$(SUFFIX) \ -+ cgeequb.$(SUFFIX) cgbequb.$(SUFFIX) csyequb.$(SUFFIX) cpoequb.$(SUFFIX) cheequb.$(SUFFIX) \ -+ cbbcsd.$(SUFFIX) clapmr.$(SUFFIX) cunbdb.$(SUFFIX) cuncsd.$(SUFFIX) \ -+ cgeqrt.$(SUFFIX) cgeqrt2.$(SUFFIX) cgeqrt3.$(SUFFIX) cgemqrt.$(SUFFIX) \ -+ ctpqrt.$(SUFFIX) ctpqrt2.$(SUFFIX) ctpmqrt.$(SUFFIX) ctprfb.$(SUFFIX) - - ifdef USEXBLAS --CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ -- cla_gercond_c.o cla_gercond_x.o cla_gerpvgrw.o \ -- csysvxx.o csyrfsx.o cla_syrfsx_extended.o cla_syamv.o \ -- cla_syrcond_c.o cla_syrcond_x.o cla_syrpvgrw.o \ -- cposvxx.o cporfsx.o cla_porfsx_extended.o \ -- cla_porcond_c.o cla_porcond_x.o cla_porpvgrw.o \ -- cgbsvxx.o cgbrfsx.o cla_gbrfsx_extended.o cla_gbamv.o \ -- cla_gbrcond_c.o cla_gbrcond_x.o cla_gbrpvgrw.o \ -- chesvxx.o cherfsx.o cla_herfsx_extended.o cla_heamv.o \ -- cla_hercond_c.o cla_hercond_x.o cla_herpvgrw.o \ -- cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o -+CXLASRC = cgesvxx.$(SUFFIX) cgerfsx.$(SUFFIX) cla_gerfsx_extended.$(SUFFIX) cla_geamv.$(SUFFIX) \ -+ cla_gercond_c.$(SUFFIX) cla_gercond_x.$(SUFFIX) cla_gerpvgrw.$(SUFFIX) \ -+ csysvxx.$(SUFFIX) csyrfsx.$(SUFFIX) cla_syrfsx_extended.$(SUFFIX) cla_syamv.$(SUFFIX) \ -+ cla_syrcond_c.$(SUFFIX) cla_syrcond_x.$(SUFFIX) cla_syrpvgrw.$(SUFFIX) \ -+ cposvxx.$(SUFFIX) cporfsx.$(SUFFIX) cla_porfsx_extended.$(SUFFIX) \ -+ cla_porcond_c.$(SUFFIX) cla_porcond_x.$(SUFFIX) cla_porpvgrw.$(SUFFIX) \ -+ cgbsvxx.$(SUFFIX) cgbrfsx.$(SUFFIX) cla_gbrfsx_extended.$(SUFFIX) cla_gbamv.$(SUFFIX) \ -+ cla_gbrcond_c.$(SUFFIX) cla_gbrcond_x.$(SUFFIX) cla_gbrpvgrw.$(SUFFIX) \ -+ chesvxx.$(SUFFIX) cherfsx.$(SUFFIX) cla_herfsx_extended.$(SUFFIX) cla_heamv.$(SUFFIX) \ -+ cla_hercond_c.$(SUFFIX) cla_hercond_x.$(SUFFIX) cla_herpvgrw.$(SUFFIX) \ -+ cla_lin_berr.$(SUFFIX) clarscl2.$(SUFFIX) clascl2.$(SUFFIX) cla_wwaddw.$(SUFFIX) - endif - --ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o -+ZCLASRC = cpotrs.$(SUFFIX) - - DLASRC = \ -- dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ -- dgbsvx.o dgbtf2.o dgbtrf.o dgbtrs.o dgebak.o dgebal.o dgebd2.o \ -- dgebrd.o dgecon.o dgeequ.o dgees.o dgeesx.o dgeev.o dgeevx.o \ -- dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \ -- dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ -- dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ -- dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ -- dgetc2.o dgetf2.o dgetrf.o dgetri.o \ -- dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ -- dggglm.o dgghrd.o dgglse.o dggqrf.o \ -- dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ -- dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ -- dhsein.o dhseqr.o dlabrd.o dlacon.o dlacn2.o \ -- dlaein.o dlaexc.o dlag2.o dlags2.o dlagtm.o dlagv2.o dlahqr.o \ -- dlahrd.o dlahr2.o dlaic1.o dlaln2.o dlals0.o dlalsa.o dlalsd.o \ -- dlangb.o dlange.o dlangt.o dlanhs.o dlansb.o dlansp.o \ -- dlansy.o dlantb.o dlantp.o dlantr.o dlanv2.o \ -- dlapll.o dlapmt.o \ -- dlaqgb.o dlaqge.o dlaqp2.o dlaqps.o dlaqsb.o dlaqsp.o dlaqsy.o \ -- dlaqr0.o dlaqr1.o dlaqr2.o dlaqr3.o dlaqr4.o dlaqr5.o \ -- dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \ -- dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ -- dlargv.o dlarrv.o dlartv.o \ -- dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o \ -- dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ -- dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ -- dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ -- dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ -- dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ -- dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ -- dpbstf.o dpbsv.o dpbsvx.o \ -- dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ -- dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ -- dppcon.o dppequ.o \ -- dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ -- dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ -- dsbev.o dsbevd.o dsbevx.o dsbgst.o dsbgv.o dsbgvd.o dsbgvx.o \ -- dsbtrd.o dspcon.o dspev.o dspevd.o dspevx.o dspgst.o \ -- dspgv.o dspgvd.o dspgvx.o dsprfs.o dspsv.o dspsvx.o dsptrd.o \ -- dsptrf.o dsptri.o dsptrs.o dstegr.o dstein.o dstev.o dstevd.o dstevr.o \ -- dstevx.o \ -- dsycon.o dsyev.o dsyevd.o dsyevr.o \ -- dsyevx.o dsygs2.o dsygst.o dsygv.o dsygvd.o dsygvx.o dsyrfs.o \ -- dsysv.o dsysvx.o \ -- dsytd2.o dsytf2.o dsytrd.o dsytrf.o dsytri.o dsytri2.o dsytri2x.o \ -- dsyswapr.o dsytrs.o dsytrs2.o dsyconv.o \ -- dtbcon.o dtbrfs.o dtbtrs.o dtgevc.o dtgex2.o dtgexc.o dtgsen.o \ -- dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ -- dtptrs.o \ -- dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ -- dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ -- dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ -- dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ -- dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ -- dgejsv.o dgesvj.o dgsvj0.o dgsvj1.o \ -- dgeequb.o dsyequb.o dpoequb.o dgbequb.o \ -- dbbcsd.o dlapmr.o dorbdb.o dorcsd.o \ -- dgeqrt.o dgeqrt2.o dgeqrt3.o dgemqrt.o \ -- dtpqrt.o dtpqrt2.o dtpmqrt.o dtprfb.o -+ dgbbrd.$(SUFFIX) dgbcon.$(SUFFIX) dgbequ.$(SUFFIX) dgbrfs.$(SUFFIX) dgbsv.$(SUFFIX) \ -+ dgbsvx.$(SUFFIX) dgbtf2.$(SUFFIX) dgbtrf.$(SUFFIX) dgbtrs.$(SUFFIX) dgebak.$(SUFFIX) dgebal.$(SUFFIX) dgebd2.$(SUFFIX) \ -+ dgebrd.$(SUFFIX) dgecon.$(SUFFIX) dgeequ.$(SUFFIX) dgees.$(SUFFIX) dgeesx.$(SUFFIX) dgeev.$(SUFFIX) dgeevx.$(SUFFIX) \ -+ dgegs.$(SUFFIX) dgegv.$(SUFFIX) dgehd2.$(SUFFIX) dgehrd.$(SUFFIX) dgelq2.$(SUFFIX) dgelqf.$(SUFFIX) \ -+ dgels.$(SUFFIX) dgelsd.$(SUFFIX) dgelss.$(SUFFIX) dgelsx.$(SUFFIX) dgelsy.$(SUFFIX) dgeql2.$(SUFFIX) dgeqlf.$(SUFFIX) \ -+ dgeqp3.$(SUFFIX) dgeqpf.$(SUFFIX) dgeqr2.$(SUFFIX) dgeqr2p.$(SUFFIX) dgeqrf.$(SUFFIX) dgeqrfp.$(SUFFIX) dgerfs.$(SUFFIX) \ -+ dgerq2.$(SUFFIX) dgerqf.$(SUFFIX) dgesc2.$(SUFFIX) dgesdd.$(SUFFIX) dgesv.$(SUFFIX) dgesvd.$(SUFFIX) dgesvx.$(SUFFIX) \ -+ dgetc2.$(SUFFIX) dgetri.$(SUFFIX) \ -+ dggbak.$(SUFFIX) dggbal.$(SUFFIX) dgges.$(SUFFIX) dggesx.$(SUFFIX) dggev.$(SUFFIX) dggevx.$(SUFFIX) \ -+ dggglm.$(SUFFIX) dgghrd.$(SUFFIX) dgglse.$(SUFFIX) dggqrf.$(SUFFIX) \ -+ dggrqf.$(SUFFIX) dggsvd.$(SUFFIX) dggsvp.$(SUFFIX) dgtcon.$(SUFFIX) dgtrfs.$(SUFFIX) dgtsv.$(SUFFIX) \ -+ dgtsvx.$(SUFFIX) dgttrf.$(SUFFIX) dgttrs.$(SUFFIX) dgtts2.$(SUFFIX) dhgeqz.$(SUFFIX) \ -+ dhsein.$(SUFFIX) dhseqr.$(SUFFIX) dlabrd.$(SUFFIX) dlacon.$(SUFFIX) dlacn2.$(SUFFIX) \ -+ dlaein.$(SUFFIX) dlaexc.$(SUFFIX) dlag2.$(SUFFIX) dlags2.$(SUFFIX) dlagtm.$(SUFFIX) dlagv2.$(SUFFIX) dlahqr.$(SUFFIX) \ -+ dlahrd.$(SUFFIX) dlahr2.$(SUFFIX) dlaic1.$(SUFFIX) dlaln2.$(SUFFIX) dlals0.$(SUFFIX) dlalsa.$(SUFFIX) dlalsd.$(SUFFIX) \ -+ dlangb.$(SUFFIX) dlange.$(SUFFIX) dlangt.$(SUFFIX) dlanhs.$(SUFFIX) dlansb.$(SUFFIX) dlansp.$(SUFFIX) \ -+ dlansy.$(SUFFIX) dlantb.$(SUFFIX) dlantp.$(SUFFIX) dlantr.$(SUFFIX) dlanv2.$(SUFFIX) \ -+ dlapll.$(SUFFIX) dlapmt.$(SUFFIX) \ -+ dlaqgb.$(SUFFIX) dlaqge.$(SUFFIX) dlaqp2.$(SUFFIX) dlaqps.$(SUFFIX) dlaqsb.$(SUFFIX) dlaqsp.$(SUFFIX) dlaqsy.$(SUFFIX) \ -+ dlaqr0.$(SUFFIX) dlaqr1.$(SUFFIX) dlaqr2.$(SUFFIX) dlaqr3.$(SUFFIX) dlaqr4.$(SUFFIX) dlaqr5.$(SUFFIX) \ -+ dlaqtr.$(SUFFIX) dlar1v.$(SUFFIX) dlar2v.$(SUFFIX) iladlr.$(SUFFIX) iladlc.$(SUFFIX) \ -+ dlarf.$(SUFFIX) dlarfb.$(SUFFIX) dlarfg.$(SUFFIX) dlarfgp.$(SUFFIX) dlarft.$(SUFFIX) dlarfx.$(SUFFIX) \ -+ dlargv.$(SUFFIX) dlarrv.$(SUFFIX) dlartv.$(SUFFIX) \ -+ dlarz.$(SUFFIX) dlarzb.$(SUFFIX) dlarzt.$(SUFFIX) dlasy2.$(SUFFIX) dlasyf.$(SUFFIX) \ -+ dlatbs.$(SUFFIX) dlatdf.$(SUFFIX) dlatps.$(SUFFIX) dlatrd.$(SUFFIX) dlatrs.$(SUFFIX) dlatrz.$(SUFFIX) dlatzm.$(SUFFIX) \ -+ dopgtr.$(SUFFIX) dopmtr.$(SUFFIX) dorg2l.$(SUFFIX) dorg2r.$(SUFFIX) \ -+ dorgbr.$(SUFFIX) dorghr.$(SUFFIX) dorgl2.$(SUFFIX) dorglq.$(SUFFIX) dorgql.$(SUFFIX) dorgqr.$(SUFFIX) dorgr2.$(SUFFIX) \ -+ dorgrq.$(SUFFIX) dorgtr.$(SUFFIX) dorm2l.$(SUFFIX) dorm2r.$(SUFFIX) \ -+ dormbr.$(SUFFIX) dormhr.$(SUFFIX) dorml2.$(SUFFIX) dormlq.$(SUFFIX) dormql.$(SUFFIX) dormqr.$(SUFFIX) dormr2.$(SUFFIX) \ -+ dormr3.$(SUFFIX) dormrq.$(SUFFIX) dormrz.$(SUFFIX) dormtr.$(SUFFIX) dpbcon.$(SUFFIX) dpbequ.$(SUFFIX) dpbrfs.$(SUFFIX) \ -+ dpbstf.$(SUFFIX) dpbsv.$(SUFFIX) dpbsvx.$(SUFFIX) \ -+ dpbtf2.$(SUFFIX) dpbtrf.$(SUFFIX) dpbtrs.$(SUFFIX) dpocon.$(SUFFIX) dpoequ.$(SUFFIX) dporfs.$(SUFFIX) dposv.$(SUFFIX) \ -+ dposvx.$(SUFFIX) dpotri.$(SUFFIX) dpotrs.$(SUFFIX) dpstrf.$(SUFFIX) dpstf2.$(SUFFIX) \ -+ dppcon.$(SUFFIX) dppequ.$(SUFFIX) \ -+ dpprfs.$(SUFFIX) dppsv.$(SUFFIX) dppsvx.$(SUFFIX) dpptrf.$(SUFFIX) dpptri.$(SUFFIX) dpptrs.$(SUFFIX) dptcon.$(SUFFIX) \ -+ dpteqr.$(SUFFIX) dptrfs.$(SUFFIX) dptsv.$(SUFFIX) dptsvx.$(SUFFIX) dpttrs.$(SUFFIX) dptts2.$(SUFFIX) drscl.$(SUFFIX) \ -+ dsbev.$(SUFFIX) dsbevd.$(SUFFIX) dsbevx.$(SUFFIX) dsbgst.$(SUFFIX) dsbgv.$(SUFFIX) dsbgvd.$(SUFFIX) dsbgvx.$(SUFFIX) \ -+ dsbtrd.$(SUFFIX) dspcon.$(SUFFIX) dspev.$(SUFFIX) dspevd.$(SUFFIX) dspevx.$(SUFFIX) dspgst.$(SUFFIX) \ -+ dspgv.$(SUFFIX) dspgvd.$(SUFFIX) dspgvx.$(SUFFIX) dsprfs.$(SUFFIX) dspsv.$(SUFFIX) dspsvx.$(SUFFIX) dsptrd.$(SUFFIX) \ -+ dsptrf.$(SUFFIX) dsptri.$(SUFFIX) dsptrs.$(SUFFIX) dstegr.$(SUFFIX) dstein.$(SUFFIX) dstev.$(SUFFIX) dstevd.$(SUFFIX) dstevr.$(SUFFIX) \ -+ dstevx.$(SUFFIX) \ -+ dsycon.$(SUFFIX) dsyev.$(SUFFIX) dsyevd.$(SUFFIX) dsyevr.$(SUFFIX) \ -+ dsyevx.$(SUFFIX) dsygs2.$(SUFFIX) dsygst.$(SUFFIX) dsygv.$(SUFFIX) dsygvd.$(SUFFIX) dsygvx.$(SUFFIX) dsyrfs.$(SUFFIX) \ -+ dsysv.$(SUFFIX) dsysvx.$(SUFFIX) \ -+ dsytd2.$(SUFFIX) dsytf2.$(SUFFIX) dsytrd.$(SUFFIX) dsytrf.$(SUFFIX) dsytri.$(SUFFIX) dsytri2.$(SUFFIX) dsytri2x.$(SUFFIX) \ -+ dsyswapr.$(SUFFIX) dsytrs.$(SUFFIX) dsytrs2.$(SUFFIX) dsyconv.$(SUFFIX) \ -+ dtbcon.$(SUFFIX) dtbrfs.$(SUFFIX) dtbtrs.$(SUFFIX) dtgevc.$(SUFFIX) dtgex2.$(SUFFIX) dtgexc.$(SUFFIX) dtgsen.$(SUFFIX) \ -+ dtgsja.$(SUFFIX) dtgsna.$(SUFFIX) dtgsy2.$(SUFFIX) dtgsyl.$(SUFFIX) dtpcon.$(SUFFIX) dtprfs.$(SUFFIX) dtptri.$(SUFFIX) \ -+ dtptrs.$(SUFFIX) \ -+ dtrcon.$(SUFFIX) dtrevc.$(SUFFIX) dtrexc.$(SUFFIX) dtrrfs.$(SUFFIX) dtrsen.$(SUFFIX) dtrsna.$(SUFFIX) dtrsyl.$(SUFFIX) \ -+ dtrtrs.$(SUFFIX) dtzrqf.$(SUFFIX) dtzrzf.$(SUFFIX) dstemr.$(SUFFIX) \ -+ dsgesv.$(SUFFIX) dsposv.$(SUFFIX) dlag2s.$(SUFFIX) slag2d.$(SUFFIX) dlat2s.$(SUFFIX) \ -+ dlansf.$(SUFFIX) dpftrf.$(SUFFIX) dpftri.$(SUFFIX) dpftrs.$(SUFFIX) dsfrk.$(SUFFIX) dtfsm.$(SUFFIX) dtftri.$(SUFFIX) dtfttp.$(SUFFIX) \ -+ dtfttr.$(SUFFIX) dtpttf.$(SUFFIX) dtpttr.$(SUFFIX) dtrttf.$(SUFFIX) dtrttp.$(SUFFIX) \ -+ dgejsv.$(SUFFIX) dgesvj.$(SUFFIX) dgsvj0.$(SUFFIX) dgsvj1.$(SUFFIX) \ -+ dgeequb.$(SUFFIX) dsyequb.$(SUFFIX) dpoequb.$(SUFFIX) dgbequb.$(SUFFIX) \ -+ dbbcsd.$(SUFFIX) dlapmr.$(SUFFIX) dorbdb.$(SUFFIX) dorcsd.$(SUFFIX) \ -+ dgeqrt.$(SUFFIX) dgeqrt2.$(SUFFIX) dgeqrt3.$(SUFFIX) dgemqrt.$(SUFFIX) \ -+ dtpqrt.$(SUFFIX) dtpqrt2.$(SUFFIX) dtpmqrt.$(SUFFIX) dtprfb.$(SUFFIX) - - ifdef USEXBLAS --DXLASRC = dgesvxx.o dgerfsx.o dla_gerfsx_extended.o dla_geamv.o \ -- dla_gercond.o dla_gerpvgrw.o dsysvxx.o dsyrfsx.o \ -- dla_syrfsx_extended.o dla_syamv.o dla_syrcond.o dla_syrpvgrw.o \ -- dposvxx.o dporfsx.o dla_porfsx_extended.o dla_porcond.o \ -- dla_porpvgrw.o dgbsvxx.o dgbrfsx.o dla_gbrfsx_extended.o \ -- dla_gbamv.o dla_gbrcond.o dla_gbrpvgrw.o dla_lin_berr.o dlarscl2.o \ -- dlascl2.o dla_wwaddw.o -+DXLASRC = dgesvxx.$(SUFFIX) dgerfsx.$(SUFFIX) dla_gerfsx_extended.$(SUFFIX) dla_geamv.$(SUFFIX) \ -+ dla_gercond.$(SUFFIX) dla_gerpvgrw.$(SUFFIX) dsysvxx.$(SUFFIX) dsyrfsx.$(SUFFIX) \ -+ dla_syrfsx_extended.$(SUFFIX) dla_syamv.$(SUFFIX) dla_syrcond.$(SUFFIX) dla_syrpvgrw.$(SUFFIX) \ -+ dposvxx.$(SUFFIX) dporfsx.$(SUFFIX) dla_porfsx_extended.$(SUFFIX) dla_porcond.$(SUFFIX) \ -+ dla_porpvgrw.$(SUFFIX) dgbsvxx.$(SUFFIX) dgbrfsx.$(SUFFIX) dla_gbrfsx_extended.$(SUFFIX) \ -+ dla_gbamv.$(SUFFIX) dla_gbrcond.$(SUFFIX) dla_gbrpvgrw.$(SUFFIX) dla_lin_berr.$(SUFFIX) dlarscl2.$(SUFFIX) \ -+ dlascl2.$(SUFFIX) dla_wwaddw.$(SUFFIX) - endif - - ZLASRC = \ -- zbdsqr.o zgbbrd.o zgbcon.o zgbequ.o zgbrfs.o zgbsv.o zgbsvx.o \ -- zgbtf2.o zgbtrf.o zgbtrs.o zgebak.o zgebal.o zgebd2.o zgebrd.o \ -- zgecon.o zgeequ.o zgees.o zgeesx.o zgeev.o zgeevx.o \ -- zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ -- zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ -- zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ -- zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ -- zgetri.o zgetrs.o \ -- zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ -- zgghrd.o zgglse.o zggqrf.o zggrqf.o \ -- zggsvd.o zggsvp.o \ -- zgtcon.o zgtrfs.o zgtsv.o zgtsvx.o zgttrf.o zgttrs.o zgtts2.o zhbev.o \ -- zhbevd.o zhbevx.o zhbgst.o zhbgv.o zhbgvd.o zhbgvx.o zhbtrd.o \ -- zhecon.o zheev.o zheevd.o zheevr.o zheevx.o zhegs2.o zhegst.o \ -- zhegv.o zhegvd.o zhegvx.o zherfs.o zhesv.o zhesvx.o zhetd2.o \ -- zhetf2.o zhetrd.o \ -- zhetrf.o zhetri.o zhetri2.o zhetri2x.o zheswapr.o \ -- zhetrs.o zhetrs2.o zhgeqz.o zhpcon.o zhpev.o zhpevd.o \ -- zhpevx.o zhpgst.o zhpgv.o zhpgvd.o zhpgvx.o zhprfs.o zhpsv.o \ -- zhpsvx.o \ -- zhptrd.o zhptrf.o zhptri.o zhptrs.o zhsein.o zhseqr.o zlabrd.o \ -- zlacgv.o zlacon.o zlacn2.o zlacp2.o zlacpy.o zlacrm.o zlacrt.o zladiv.o \ -- zlaed0.o zlaed7.o zlaed8.o \ -- zlaein.o zlaesy.o zlaev2.o zlags2.o zlagtm.o \ -- zlahef.o zlahqr.o \ -- zlahrd.o zlahr2.o zlaic1.o zlals0.o zlalsa.o zlalsd.o zlangb.o zlange.o \ -- zlangt.o zlanhb.o \ -- zlanhe.o \ -- zlanhp.o zlanhs.o zlanht.o zlansb.o zlansp.o zlansy.o zlantb.o \ -- zlantp.o zlantr.o zlapll.o zlapmt.o zlaqgb.o zlaqge.o \ -- zlaqhb.o zlaqhe.o zlaqhp.o zlaqp2.o zlaqps.o zlaqsb.o \ -- zlaqr0.o zlaqr1.o zlaqr2.o zlaqr3.o zlaqr4.o zlaqr5.o \ -- zlaqsp.o zlaqsy.o zlar1v.o zlar2v.o ilazlr.o ilazlc.o \ -- zlarcm.o zlarf.o zlarfb.o \ -- zlarfg.o zlarft.o zlarfgp.o \ -- zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ -- zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ -- zlassq.o zlaswp.o zlasyf.o \ -- zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ -- zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ -- zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ -- zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ -- zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ -- zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ -- zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ -- zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \ -- zstegr.o zstein.o zsteqr.o \ -- zsycon.o zsymv.o \ -- zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \ -- zsyswapr.o zsytrs.o zsytrs2.o zsyconv.o \ -- ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \ -- ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ -- ztprfs.o ztptri.o \ -- ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ -- ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ -- zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ -- zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ -- zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ -- zunmtr.o zupgtr.o \ -- zupmtr.o izmax1.o dzsum1.o zstemr.o \ -- zcgesv.o zcposv.o zlag2c.o clag2z.o zlat2c.o \ -- zhfrk.o ztfttp.o zlanhf.o zpftrf.o zpftri.o zpftrs.o ztfsm.o ztftri.o \ -- ztfttr.o ztpttf.o ztpttr.o ztrttf.o ztrttp.o \ -- zgeequb.o zgbequb.o zsyequb.o zpoequb.o zheequb.o \ -- zbbcsd.o zlapmr.o zunbdb.o zuncsd.o \ -- zgeqrt.o zgeqrt2.o zgeqrt3.o zgemqrt.o \ -- ztpqrt.o ztpqrt2.o ztpmqrt.o ztprfb.o -+ zbdsqr.$(SUFFIX) zgbbrd.$(SUFFIX) zgbcon.$(SUFFIX) zgbequ.$(SUFFIX) zgbrfs.$(SUFFIX) zgbsv.$(SUFFIX) zgbsvx.$(SUFFIX) \ -+ zgbtf2.$(SUFFIX) zgbtrf.$(SUFFIX) zgbtrs.$(SUFFIX) zgebak.$(SUFFIX) zgebal.$(SUFFIX) zgebd2.$(SUFFIX) zgebrd.$(SUFFIX) \ -+ zgecon.$(SUFFIX) zgeequ.$(SUFFIX) zgees.$(SUFFIX) zgeesx.$(SUFFIX) zgeev.$(SUFFIX) zgeevx.$(SUFFIX) \ -+ zgegs.$(SUFFIX) zgegv.$(SUFFIX) zgehd2.$(SUFFIX) zgehrd.$(SUFFIX) zgelq2.$(SUFFIX) zgelqf.$(SUFFIX) \ -+ zgels.$(SUFFIX) zgelsd.$(SUFFIX) zgelss.$(SUFFIX) zgelsx.$(SUFFIX) zgelsy.$(SUFFIX) zgeql2.$(SUFFIX) zgeqlf.$(SUFFIX) zgeqp3.$(SUFFIX) \ -+ zgeqpf.$(SUFFIX) zgeqr2.$(SUFFIX) zgeqr2p.$(SUFFIX) zgeqrf.$(SUFFIX) zgeqrfp.$(SUFFIX) zgerfs.$(SUFFIX) zgerq2.$(SUFFIX) zgerqf.$(SUFFIX) \ -+ zgesc2.$(SUFFIX) zgesdd.$(SUFFIX) zgesv.$(SUFFIX) zgesvd.$(SUFFIX) zgesvx.$(SUFFIX) zgetc2.$(SUFFIX) \ -+ zgetri.$(SUFFIX) \ -+ zggbak.$(SUFFIX) zggbal.$(SUFFIX) zgges.$(SUFFIX) zggesx.$(SUFFIX) zggev.$(SUFFIX) zggevx.$(SUFFIX) zggglm.$(SUFFIX) \ -+ zgghrd.$(SUFFIX) zgglse.$(SUFFIX) zggqrf.$(SUFFIX) zggrqf.$(SUFFIX) \ -+ zggsvd.$(SUFFIX) zggsvp.$(SUFFIX) \ -+ zgtcon.$(SUFFIX) zgtrfs.$(SUFFIX) zgtsv.$(SUFFIX) zgtsvx.$(SUFFIX) zgttrf.$(SUFFIX) zgttrs.$(SUFFIX) zgtts2.$(SUFFIX) zhbev.$(SUFFIX) \ -+ zhbevd.$(SUFFIX) zhbevx.$(SUFFIX) zhbgst.$(SUFFIX) zhbgv.$(SUFFIX) zhbgvd.$(SUFFIX) zhbgvx.$(SUFFIX) zhbtrd.$(SUFFIX) \ -+ zhecon.$(SUFFIX) zheev.$(SUFFIX) zheevd.$(SUFFIX) zheevr.$(SUFFIX) zheevx.$(SUFFIX) zhegs2.$(SUFFIX) zhegst.$(SUFFIX) \ -+ zhegv.$(SUFFIX) zhegvd.$(SUFFIX) zhegvx.$(SUFFIX) zherfs.$(SUFFIX) zhesv.$(SUFFIX) zhesvx.$(SUFFIX) zhetd2.$(SUFFIX) \ -+ zhetf2.$(SUFFIX) zhetrd.$(SUFFIX) \ -+ zhetrf.$(SUFFIX) zhetri.$(SUFFIX) zhetri2.$(SUFFIX) zhetri2x.$(SUFFIX) zheswapr.$(SUFFIX) \ -+ zhetrs.$(SUFFIX) zhetrs2.$(SUFFIX) zhgeqz.$(SUFFIX) zhpcon.$(SUFFIX) zhpev.$(SUFFIX) zhpevd.$(SUFFIX) \ -+ zhpevx.$(SUFFIX) zhpgst.$(SUFFIX) zhpgv.$(SUFFIX) zhpgvd.$(SUFFIX) zhpgvx.$(SUFFIX) zhprfs.$(SUFFIX) zhpsv.$(SUFFIX) \ -+ zhpsvx.$(SUFFIX) \ -+ zhptrd.$(SUFFIX) zhptrf.$(SUFFIX) zhptri.$(SUFFIX) zhptrs.$(SUFFIX) zhsein.$(SUFFIX) zhseqr.$(SUFFIX) zlabrd.$(SUFFIX) \ -+ zlacgv.$(SUFFIX) zlacon.$(SUFFIX) zlacn2.$(SUFFIX) zlacp2.$(SUFFIX) zlacpy.$(SUFFIX) zlacrm.$(SUFFIX) zlacrt.$(SUFFIX) zladiv.$(SUFFIX) \ -+ zlaed0.$(SUFFIX) zlaed7.$(SUFFIX) zlaed8.$(SUFFIX) \ -+ zlaein.$(SUFFIX) zlaesy.$(SUFFIX) zlaev2.$(SUFFIX) zlags2.$(SUFFIX) zlagtm.$(SUFFIX) \ -+ zlahef.$(SUFFIX) zlahqr.$(SUFFIX) \ -+ zlahrd.$(SUFFIX) zlahr2.$(SUFFIX) zlaic1.$(SUFFIX) zlals0.$(SUFFIX) zlalsa.$(SUFFIX) zlalsd.$(SUFFIX) zlangb.$(SUFFIX) zlange.$(SUFFIX) \ -+ zlangt.$(SUFFIX) zlanhb.$(SUFFIX) \ -+ zlanhe.$(SUFFIX) \ -+ zlanhp.$(SUFFIX) zlanhs.$(SUFFIX) zlanht.$(SUFFIX) zlansb.$(SUFFIX) zlansp.$(SUFFIX) zlansy.$(SUFFIX) zlantb.$(SUFFIX) \ -+ zlantp.$(SUFFIX) zlantr.$(SUFFIX) zlapll.$(SUFFIX) zlapmt.$(SUFFIX) zlaqgb.$(SUFFIX) zlaqge.$(SUFFIX) \ -+ zlaqhb.$(SUFFIX) zlaqhe.$(SUFFIX) zlaqhp.$(SUFFIX) zlaqp2.$(SUFFIX) zlaqps.$(SUFFIX) zlaqsb.$(SUFFIX) \ -+ zlaqr0.$(SUFFIX) zlaqr1.$(SUFFIX) zlaqr2.$(SUFFIX) zlaqr3.$(SUFFIX) zlaqr4.$(SUFFIX) zlaqr5.$(SUFFIX) \ -+ zlaqsp.$(SUFFIX) zlaqsy.$(SUFFIX) zlar1v.$(SUFFIX) zlar2v.$(SUFFIX) ilazlr.$(SUFFIX) ilazlc.$(SUFFIX) \ -+ zlarcm.$(SUFFIX) zlarf.$(SUFFIX) zlarfb.$(SUFFIX) \ -+ zlarfg.$(SUFFIX) zlarft.$(SUFFIX) zlarfgp.$(SUFFIX) \ -+ zlarfx.$(SUFFIX) zlargv.$(SUFFIX) zlarnv.$(SUFFIX) zlarrv.$(SUFFIX) zlartg.$(SUFFIX) zlartv.$(SUFFIX) \ -+ zlarz.$(SUFFIX) zlarzb.$(SUFFIX) zlarzt.$(SUFFIX) zlascl.$(SUFFIX) zlaset.$(SUFFIX) zlasr.$(SUFFIX) \ -+ zlassq.$(SUFFIX) zlasyf.$(SUFFIX) \ -+ zlatbs.$(SUFFIX) zlatdf.$(SUFFIX) zlatps.$(SUFFIX) zlatrd.$(SUFFIX) zlatrs.$(SUFFIX) zlatrz.$(SUFFIX) zlatzm.$(SUFFIX) zlauu2.$(SUFFIX) \ -+ zpbcon.$(SUFFIX) zpbequ.$(SUFFIX) zpbrfs.$(SUFFIX) zpbstf.$(SUFFIX) zpbsv.$(SUFFIX) \ -+ zpbsvx.$(SUFFIX) zpbtf2.$(SUFFIX) zpbtrf.$(SUFFIX) zpbtrs.$(SUFFIX) zpocon.$(SUFFIX) zpoequ.$(SUFFIX) zporfs.$(SUFFIX) \ -+ zposv.$(SUFFIX) zposvx.$(SUFFIX) zpotri.$(SUFFIX) zpotrs.$(SUFFIX) zpstrf.$(SUFFIX) zpstf2.$(SUFFIX) \ -+ zppcon.$(SUFFIX) zppequ.$(SUFFIX) zpprfs.$(SUFFIX) zppsv.$(SUFFIX) zppsvx.$(SUFFIX) zpptrf.$(SUFFIX) zpptri.$(SUFFIX) zpptrs.$(SUFFIX) \ -+ zptcon.$(SUFFIX) zpteqr.$(SUFFIX) zptrfs.$(SUFFIX) zptsv.$(SUFFIX) zptsvx.$(SUFFIX) zpttrf.$(SUFFIX) zpttrs.$(SUFFIX) zptts2.$(SUFFIX) \ -+ zrot.$(SUFFIX) zspcon.$(SUFFIX) zspmv.$(SUFFIX) zspr.$(SUFFIX) zsprfs.$(SUFFIX) zspsv.$(SUFFIX) \ -+ zspsvx.$(SUFFIX) zsptrf.$(SUFFIX) zsptri.$(SUFFIX) zsptrs.$(SUFFIX) zdrscl.$(SUFFIX) zstedc.$(SUFFIX) \ -+ zstegr.$(SUFFIX) zstein.$(SUFFIX) zsteqr.$(SUFFIX) \ -+ zsycon.$(SUFFIX) zsymv.$(SUFFIX) \ -+ zsyr.$(SUFFIX) zsyrfs.$(SUFFIX) zsysv.$(SUFFIX) zsysvx.$(SUFFIX) zsytf2.$(SUFFIX) zsytrf.$(SUFFIX) zsytri.$(SUFFIX) zsytri2.$(SUFFIX) zsytri2x.$(SUFFIX) \ -+ zsyswapr.$(SUFFIX) zsytrs.$(SUFFIX) zsytrs2.$(SUFFIX) zsyconv.$(SUFFIX) \ -+ ztbcon.$(SUFFIX) ztbrfs.$(SUFFIX) ztbtrs.$(SUFFIX) ztgevc.$(SUFFIX) ztgex2.$(SUFFIX) \ -+ ztgexc.$(SUFFIX) ztgsen.$(SUFFIX) ztgsja.$(SUFFIX) ztgsna.$(SUFFIX) ztgsy2.$(SUFFIX) ztgsyl.$(SUFFIX) ztpcon.$(SUFFIX) \ -+ ztprfs.$(SUFFIX) ztptri.$(SUFFIX) \ -+ ztptrs.$(SUFFIX) ztrcon.$(SUFFIX) ztrevc.$(SUFFIX) ztrexc.$(SUFFIX) ztrrfs.$(SUFFIX) ztrsen.$(SUFFIX) ztrsna.$(SUFFIX) \ -+ ztrsyl.$(SUFFIX) ztrtrs.$(SUFFIX) ztzrqf.$(SUFFIX) ztzrzf.$(SUFFIX) zung2l.$(SUFFIX) \ -+ zung2r.$(SUFFIX) zungbr.$(SUFFIX) zunghr.$(SUFFIX) zungl2.$(SUFFIX) zunglq.$(SUFFIX) zungql.$(SUFFIX) zungqr.$(SUFFIX) zungr2.$(SUFFIX) \ -+ zungrq.$(SUFFIX) zungtr.$(SUFFIX) zunm2l.$(SUFFIX) zunm2r.$(SUFFIX) zunmbr.$(SUFFIX) zunmhr.$(SUFFIX) zunml2.$(SUFFIX) \ -+ zunmlq.$(SUFFIX) zunmql.$(SUFFIX) zunmqr.$(SUFFIX) zunmr2.$(SUFFIX) zunmr3.$(SUFFIX) zunmrq.$(SUFFIX) zunmrz.$(SUFFIX) \ -+ zunmtr.$(SUFFIX) zupgtr.$(SUFFIX) \ -+ zupmtr.$(SUFFIX) izmax1.$(SUFFIX) dzsum1.$(SUFFIX) zstemr.$(SUFFIX) \ -+ zcgesv.$(SUFFIX) zcposv.$(SUFFIX) zlag2c.$(SUFFIX) clag2z.$(SUFFIX) zlat2c.$(SUFFIX) \ -+ zhfrk.$(SUFFIX) ztfttp.$(SUFFIX) zlanhf.$(SUFFIX) zpftrf.$(SUFFIX) zpftri.$(SUFFIX) zpftrs.$(SUFFIX) ztfsm.$(SUFFIX) ztftri.$(SUFFIX) \ -+ ztfttr.$(SUFFIX) ztpttf.$(SUFFIX) ztpttr.$(SUFFIX) ztrttf.$(SUFFIX) ztrttp.$(SUFFIX) \ -+ zgeequb.$(SUFFIX) zgbequb.$(SUFFIX) zsyequb.$(SUFFIX) zpoequb.$(SUFFIX) zheequb.$(SUFFIX) \ -+ zbbcsd.$(SUFFIX) zlapmr.$(SUFFIX) zunbdb.$(SUFFIX) zuncsd.$(SUFFIX) \ -+ zgeqrt.$(SUFFIX) zgeqrt2.$(SUFFIX) zgeqrt3.$(SUFFIX) zgemqrt.$(SUFFIX) \ -+ ztpqrt.$(SUFFIX) ztpqrt2.$(SUFFIX) ztpmqrt.$(SUFFIX) ztprfb.$(SUFFIX) - - ifdef USEXBLAS --ZXLASRC = zgesvxx.o zgerfsx.o zla_gerfsx_extended.o zla_geamv.o \ -- zla_gercond_c.o zla_gercond_x.o zla_gerpvgrw.o zsysvxx.o zsyrfsx.o \ -- zla_syrfsx_extended.o zla_syamv.o zla_syrcond_c.o zla_syrcond_x.o \ -- zla_syrpvgrw.o zposvxx.o zporfsx.o zla_porfsx_extended.o \ -- zla_porcond_c.o zla_porcond_x.o zla_porpvgrw.o zgbsvxx.o zgbrfsx.o \ -- zla_gbrfsx_extended.o zla_gbamv.o zla_gbrcond_c.o zla_gbrcond_x.o \ -- zla_gbrpvgrw.o zhesvxx.o zherfsx.o zla_herfsx_extended.o \ -- zla_heamv.o zla_hercond_c.o zla_hercond_x.o zla_herpvgrw.o \ -- zla_lin_berr.o zlarscl2.o zlascl2.o zla_wwaddw.o -+ZXLASRC = zgesvxx.$(SUFFIX) zgerfsx.$(SUFFIX) zla_gerfsx_extended.$(SUFFIX) zla_geamv.$(SUFFIX) \ -+ zla_gercond_c.$(SUFFIX) zla_gercond_x.$(SUFFIX) zla_gerpvgrw.$(SUFFIX) zsysvxx.$(SUFFIX) zsyrfsx.$(SUFFIX) \ -+ zla_syrfsx_extended.$(SUFFIX) zla_syamv.$(SUFFIX) zla_syrcond_c.$(SUFFIX) zla_syrcond_x.$(SUFFIX) \ -+ zla_syrpvgrw.$(SUFFIX) zposvxx.$(SUFFIX) zporfsx.$(SUFFIX) zla_porfsx_extended.$(SUFFIX) \ -+ zla_porcond_c.$(SUFFIX) zla_porcond_x.$(SUFFIX) zla_porpvgrw.$(SUFFIX) zgbsvxx.$(SUFFIX) zgbrfsx.$(SUFFIX) \ -+ zla_gbrfsx_extended.$(SUFFIX) zla_gbamv.$(SUFFIX) zla_gbrcond_c.$(SUFFIX) zla_gbrcond_x.$(SUFFIX) \ -+ zla_gbrpvgrw.$(SUFFIX) zhesvxx.$(SUFFIX) zherfsx.$(SUFFIX) zla_herfsx_extended.$(SUFFIX) \ -+ zla_heamv.$(SUFFIX) zla_hercond_c.$(SUFFIX) zla_hercond_x.$(SUFFIX) zla_herpvgrw.$(SUFFIX) \ -+ zla_lin_berr.$(SUFFIX) zlarscl2.$(SUFFIX) zlascl2.$(SUFFIX) zla_wwaddw.$(SUFFIX) - endif - - ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \ - $(SCLAUX) $(DZLAUX) $(ALLAUX) - -+ALLOBJ_P = $(ALLOBJ:.$(SUFFIX)=.$(PSUFFIX)) -+ - ifdef USEXBLAS - ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) - endif - - all: ../$(LAPACKLIB) - -+lapack_prof: ../$(LAPACKLIB_P) -+ - ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) - $(RANLIB) $@ - -+../$(LAPACKLIB_P): $(ALLOBJ_P) -+ $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ_P) -+ $(RANLIB) $@ -+ - single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \ - $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX) -@@ -451,15 +459,24 @@ - @FRC=$(FRC) - - clean: -- rm -f *.o -+ rm -f *.$(SUFFIX) *.$(PSUFFIX) - --.f.o: -+%.$(SUFFIX): %.f - $(FORTRAN) $(OPTS) -c $< -o $@ - --slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --zla_wwaddw.o: zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ -+%.$(PSUFFIX): %.f -+ $(FORTRAN) $(POPTS) -c $< -o $@ - -+slaruv.$(SUFFIX): slaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dlaruv.$(SUFFIX): dlaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(SUFFIX): sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(SUFFIX): dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(SUFFIX): cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(SUFFIX): zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+ -+slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(PSUFFIX): sla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(PSUFFIX): dla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(PSUFFIX): cla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(PSUFFIX): zla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -diff -ruN lapack-3.4.1.old/TESTING/EIG/Makefile lapack-3.4.1/TESTING/EIG/Makefile ---- lapack-3.4.1.old/TESTING/EIG/Makefile 2011-09-26 23:52:31 +0200 -+++ lapack-3.4.1/TESTING/EIG/Makefile 2012-04-22 21:41:45 +0200 -@@ -78,7 +78,7 @@ - cget35.o cget36.o cget37.o cget38.o cget51.o cget52.o \ - cget54.o cglmts.o cgqrts.o cgrqts.o cgsvts.o \ - chbt21.o chet21.o chet22.o chpt21.o chst01.o \ -- clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o csbmv.o \ -+ clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o \ - csgt01.o cslect.o \ - cstt21.o cstt22.o cunt01.o cunt03.o - -@@ -115,7 +115,7 @@ - zget35.o zget36.o zget37.o zget38.o zget51.o zget52.o \ - zget54.o zglmts.o zgqrts.o zgrqts.o zgsvts.o \ - zhbt21.o zhet21.o zhet22.o zhpt21.o zhst01.o \ -- zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o zsbmv.o \ -+ zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o \ - zsgt01.o zslect.o \ - zstt21.o zstt22.o zunt01.o zunt03.o - -@@ -129,22 +129,22 @@ - ../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtsts \ - $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtsts $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtsts $@ - - ../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstc \ - $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstc $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstc $@ - - ../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstd \ - $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstd $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstd $@ - - ../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstz \ - $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstz $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstz $@ - - $(AEIGTST): $(FRC) - $(SCIGTST): $(FRC) -diff -ruN lapack-3.4.1.old/TESTING/LIN/Makefile lapack-3.4.1/TESTING/LIN/Makefile ---- lapack-3.4.1.old/TESTING/LIN/Makefile 2012-04-02 21:06:36 +0200 -+++ lapack-3.4.1/TESTING/LIN/Makefile 2012-04-22 21:43:30 +0200 -@@ -109,7 +109,7 @@ - cqpt01.o cqrt01.o cqrt01p.o cqrt02.o cqrt03.o cqrt11.o \ - cqrt12.o cqrt13.o cqrt14.o cqrt15.o cqrt16.o \ - cqrt17.o crqt01.o crqt02.o crqt03.o crzt01.o crzt02.o \ -- csbmv.o cspt01.o \ -+ cspt01.o \ - cspt02.o cspt03.o csyt01.o csyt02.o csyt03.o \ - ctbt02.o ctbt03.o ctbt05.o ctbt06.o ctpt01.o \ - ctpt02.o ctpt03.o ctpt05.o ctpt06.o ctrt01.o \ -@@ -188,7 +188,7 @@ - zqpt01.o zqrt01.o zqrt01p.o zqrt02.o zqrt03.o zqrt11.o \ - zqrt12.o zqrt13.o zqrt14.o zqrt15.o zqrt16.o \ - zqrt17.o zrqt01.o zrqt02.o zrqt03.o zrzt01.o zrzt02.o \ -- zsbmv.o zspt01.o \ -+ zspt01.o \ - zspt02.o zspt03.o zsyt01.o zsyt02.o zsyt03.o \ - ztbt02.o ztbt03.o ztbt05.o ztbt06.o ztpt01.o \ - ztpt02.o ztpt03.o ztpt05.o ztpt06.o ztrt01.o \ -@@ -214,7 +214,7 @@ - zdrvab.o zdrvac.o zerrab.o zerrac.o zget08.o \ - alaerh.o alahd.o aladhd.o alareq.o \ - chkxer.o zget02.o zlarhs.o zlatb4.o \ -- zsbmv.o xerbla.o zpot06.o zlaipd.o -+ xerbla.o zpot06.o zlaipd.o - - SLINTSTRFP = schkrfp.o sdrvrfp.o sdrvrf1.o sdrvrf2.o sdrvrf3.o sdrvrf4.o serrrfp.o \ - slatb4.o slarhs.o sget04.o spot01.o spot03.o spot02.o \ -@@ -225,11 +225,11 @@ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - CLINTSTRFP = cchkrfp.o cdrvrfp.o cdrvrf1.o cdrvrf2.o cdrvrf3.o cdrvrf4.o cerrrfp.o \ -- claipd.o clatb4.o clarhs.o csbmv.o cget04.o cpot01.o cpot03.o cpot02.o \ -+ claipd.o clatb4.o clarhs.o cget04.o cpot01.o cpot03.o cpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - ZLINTSTRFP = zchkrfp.o zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp.o \ -- zlatb4.o zlaipd.o zlarhs.o zsbmv.o zget04.o zpot01.o zpot03.o zpot02.o \ -+ zlatb4.o zlaipd.o zlarhs.o zget04.o zpot01.o zpot03.o zpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - all: single double complex complex16 proto-single proto-double proto-complex proto-complex16 -@@ -246,43 +246,43 @@ - - xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $^ \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstds : $(DSLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DSLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstzc : $(ZCLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZCLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfs : $(SLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(SLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfd : $(DLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfc : $(CLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(CLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfz : $(ZLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintsts: xlintsts - mv xlintsts $@ -diff -ruN lapack-3.4.1.old/lapacke/src/Makefile lapack-3.4.1/lapacke/src/Makefile ---- lapack-3.4.1.old/lapacke/src/Makefile 2012-04-02 22:16:32 +0200 -+++ lapack-3.4.1/lapacke/src/Makefile 2012-04-22 21:38:38 +0200 -@@ -2040,19 +2040,21 @@ - lapacke_zlagsy.o \ - lapacke_zlagsy_work.o - --ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ) -+OBJ_FILES := $(SRC_OBJ) - --ifdef USEXBLAS --ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) -+ifdef LAPACKE_EXTENDED -+OBJ_FILES += $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) - endif - -- --OBJ_FILES := $(C_FILES:.o=.o) -+ifdef LAPACKE_TESTING -+OBJ_FILES += $(MATGEN_OBJ) -+endif - - all: ../../$(LAPACKELIB) - --../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) -- $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) -+../../$(LAPACKELIB): $(OBJ_FILES) -+# http://hackage.haskell.org/trac/gtk2hs/ticket/1146 -+ echo $(OBJ_FILES) | xargs -n 100 $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) - $(RANLIB) ../../$(LAPACKELIB) - - .c.o: diff --git a/patch.for_lapack-3.4.2 b/patch.for_lapack-3.4.2 deleted file mode 100644 index 3f7d72ed3..000000000 --- a/patch.for_lapack-3.4.2 +++ /dev/null @@ -1,1000 +0,0 @@ -diff -ruN lapack-3.4.2.old/INSTALL/Makefile lapack-3.4.2/INSTALL/Makefile ---- lapack-3.4.2.old/INSTALL/Makefile 2011-10-01 04:37:03 +0200 -+++ lapack-3.4.2/INSTALL/Makefile 2012-04-22 21:48:48 +0200 -@@ -27,7 +27,7 @@ - $(LOADER) $(LOADOPTS) -o testversion ilaver.o LAPACK_version.o - - clean: -- rm -f *.o -+ rm -f *.o test* - .f.o: - $(FORTRAN) $(OPTS) -c $< -o $@ - -diff -ruN lapack-3.4.2.old/Makefile lapack-3.4.2/Makefile ---- lapack-3.4.2.old/Makefile 2012-04-13 20:13:07 +0200 -+++ lapack-3.4.2/Makefile 2012-04-22 21:48:07 +0200 -@@ -20,9 +20,12 @@ - blaslib: - ( cd BLAS/SRC; $(MAKE) ) - --lapacklib: lapack_install -+lapacklib: - ( cd SRC; $(MAKE) ) - -+lapack_prof: -+ ( cd SRC; $(MAKE) lapack_prof) -+ - lapackelib: lapacklib - ( cd lapacke; $(MAKE) ) - -diff -ruN lapack-3.4.2.old/SRC/Makefile lapack-3.4.2/SRC/Makefile ---- lapack-3.4.2.old/SRC/Makefile 2012-04-02 21:06:36 +0200 -+++ lapack-3.4.2/SRC/Makefile 2012-04-22 21:40:21 +0200 -@@ -54,363 +54,371 @@ - # - ####################################################################### - --ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \ -- ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ -- ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o -+ALLAUX = ilaenv.$(SUFFIX) ieeeck.$(SUFFIX) lsamen.$(SUFFIX) xerbla_array.$(SUFFIX) iparmq.$(SUFFIX) \ -+ ilaprec.$(SUFFIX) ilatrans.$(SUFFIX) ilauplo.$(SUFFIX) iladiag.$(SUFFIX) chla_transtype.$(SUFFIX) \ -+ ../INSTALL/ilaver.$(SUFFIX) - - SCLAUX = \ -- sbdsdc.o \ -- sbdsqr.o sdisna.o slabad.o slacpy.o sladiv.o slae2.o slaebz.o \ -- slaed0.o slaed1.o slaed2.o slaed3.o slaed4.o slaed5.o slaed6.o \ -- slaed7.o slaed8.o slaed9.o slaeda.o slaev2.o slagtf.o \ -- slagts.o slamrg.o slanst.o \ -- slapy2.o slapy3.o slarnv.o \ -- slarra.o slarrb.o slarrc.o slarrd.o slarre.o slarrf.o slarrj.o \ -- slarrk.o slarrr.o slaneg.o \ -- slartg.o slaruv.o slas2.o slascl.o \ -- slasd0.o slasd1.o slasd2.o slasd3.o slasd4.o slasd5.o slasd6.o \ -- slasd7.o slasd8.o slasda.o slasdq.o slasdt.o \ -- slaset.o slasq1.o slasq2.o slasq3.o slasq4.o slasq5.o slasq6.o \ -- slasr.o slasrt.o slassq.o slasv2.o spttrf.o sstebz.o sstedc.o \ -- ssteqr.o ssterf.o slaisnan.o sisnan.o \ -- slartgp.o slartgs.o \ -- ../INSTALL/second_$(TIMER).o -+ sbdsdc.$(SUFFIX) \ -+ sbdsqr.$(SUFFIX) sdisna.$(SUFFIX) slabad.$(SUFFIX) slacpy.$(SUFFIX) sladiv.$(SUFFIX) slae2.$(SUFFIX) slaebz.$(SUFFIX) \ -+ slaed0.$(SUFFIX) slaed1.$(SUFFIX) slaed2.$(SUFFIX) slaed3.$(SUFFIX) slaed4.$(SUFFIX) slaed5.$(SUFFIX) slaed6.$(SUFFIX) \ -+ slaed7.$(SUFFIX) slaed8.$(SUFFIX) slaed9.$(SUFFIX) slaeda.$(SUFFIX) slaev2.$(SUFFIX) slagtf.$(SUFFIX) \ -+ slagts.$(SUFFIX) slamrg.$(SUFFIX) slanst.$(SUFFIX) \ -+ slapy2.$(SUFFIX) slapy3.$(SUFFIX) slarnv.$(SUFFIX) \ -+ slarra.$(SUFFIX) slarrb.$(SUFFIX) slarrc.$(SUFFIX) slarrd.$(SUFFIX) slarre.$(SUFFIX) slarrf.$(SUFFIX) slarrj.$(SUFFIX) \ -+ slarrk.$(SUFFIX) slarrr.$(SUFFIX) slaneg.$(SUFFIX) \ -+ slartg.$(SUFFIX) slaruv.$(SUFFIX) slas2.$(SUFFIX) slascl.$(SUFFIX) \ -+ slasd0.$(SUFFIX) slasd1.$(SUFFIX) slasd2.$(SUFFIX) slasd3.$(SUFFIX) slasd4.$(SUFFIX) slasd5.$(SUFFIX) slasd6.$(SUFFIX) \ -+ slasd7.$(SUFFIX) slasd8.$(SUFFIX) slasda.$(SUFFIX) slasdq.$(SUFFIX) slasdt.$(SUFFIX) \ -+ slaset.$(SUFFIX) slasq1.$(SUFFIX) slasq2.$(SUFFIX) slasq3.$(SUFFIX) slasq4.$(SUFFIX) slasq5.$(SUFFIX) slasq6.$(SUFFIX) \ -+ slasr.$(SUFFIX) slasrt.$(SUFFIX) slassq.$(SUFFIX) slasv2.$(SUFFIX) spttrf.$(SUFFIX) sstebz.$(SUFFIX) sstedc.$(SUFFIX) \ -+ ssteqr.$(SUFFIX) ssterf.$(SUFFIX) slaisnan.$(SUFFIX) sisnan.$(SUFFIX) \ -+ slartgp.$(SUFFIX) slartgs.$(SUFFIX) \ -+ ../INSTALL/second_$(TIMER).$(SUFFIX) - - DZLAUX = \ -- dbdsdc.o \ -- dbdsqr.o ddisna.o dlabad.o dlacpy.o dladiv.o dlae2.o dlaebz.o \ -- dlaed0.o dlaed1.o dlaed2.o dlaed3.o dlaed4.o dlaed5.o dlaed6.o \ -- dlaed7.o dlaed8.o dlaed9.o dlaeda.o dlaev2.o dlagtf.o \ -- dlagts.o dlamrg.o dlanst.o \ -- dlapy2.o dlapy3.o dlarnv.o \ -- dlarra.o dlarrb.o dlarrc.o dlarrd.o dlarre.o dlarrf.o dlarrj.o \ -- dlarrk.o dlarrr.o dlaneg.o \ -- dlartg.o dlaruv.o dlas2.o dlascl.o \ -- dlasd0.o dlasd1.o dlasd2.o dlasd3.o dlasd4.o dlasd5.o dlasd6.o \ -- dlasd7.o dlasd8.o dlasda.o dlasdq.o dlasdt.o \ -- dlaset.o dlasq1.o dlasq2.o dlasq3.o dlasq4.o dlasq5.o dlasq6.o \ -- dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \ -- dsteqr.o dsterf.o dlaisnan.o disnan.o \ -- dlartgp.o dlartgs.o \ -- ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o -+ dbdsdc.$(SUFFIX) \ -+ dbdsqr.$(SUFFIX) ddisna.$(SUFFIX) dlabad.$(SUFFIX) dlacpy.$(SUFFIX) dladiv.$(SUFFIX) dlae2.$(SUFFIX) dlaebz.$(SUFFIX) \ -+ dlaed0.$(SUFFIX) dlaed1.$(SUFFIX) dlaed2.$(SUFFIX) dlaed3.$(SUFFIX) dlaed4.$(SUFFIX) dlaed5.$(SUFFIX) dlaed6.$(SUFFIX) \ -+ dlaed7.$(SUFFIX) dlaed8.$(SUFFIX) dlaed9.$(SUFFIX) dlaeda.$(SUFFIX) dlaev2.$(SUFFIX) dlagtf.$(SUFFIX) \ -+ dlagts.$(SUFFIX) dlamrg.$(SUFFIX) dlanst.$(SUFFIX) \ -+ dlapy2.$(SUFFIX) dlapy3.$(SUFFIX) dlarnv.$(SUFFIX) \ -+ dlarra.$(SUFFIX) dlarrb.$(SUFFIX) dlarrc.$(SUFFIX) dlarrd.$(SUFFIX) dlarre.$(SUFFIX) dlarrf.$(SUFFIX) dlarrj.$(SUFFIX) \ -+ dlarrk.$(SUFFIX) dlarrr.$(SUFFIX) dlaneg.$(SUFFIX) \ -+ dlartg.$(SUFFIX) dlaruv.$(SUFFIX) dlas2.$(SUFFIX) dlascl.$(SUFFIX) \ -+ dlasd0.$(SUFFIX) dlasd1.$(SUFFIX) dlasd2.$(SUFFIX) dlasd3.$(SUFFIX) dlasd4.$(SUFFIX) dlasd5.$(SUFFIX) dlasd6.$(SUFFIX) \ -+ dlasd7.$(SUFFIX) dlasd8.$(SUFFIX) dlasda.$(SUFFIX) dlasdq.$(SUFFIX) dlasdt.$(SUFFIX) \ -+ dlaset.$(SUFFIX) dlasq1.$(SUFFIX) dlasq2.$(SUFFIX) dlasq3.$(SUFFIX) dlasq4.$(SUFFIX) dlasq5.$(SUFFIX) dlasq6.$(SUFFIX) \ -+ dlasr.$(SUFFIX) dlasrt.$(SUFFIX) dlassq.$(SUFFIX) dlasv2.$(SUFFIX) dpttrf.$(SUFFIX) dstebz.$(SUFFIX) dstedc.$(SUFFIX) \ -+ dsteqr.$(SUFFIX) dsterf.$(SUFFIX) dlaisnan.$(SUFFIX) disnan.$(SUFFIX) \ -+ dlartgp.$(SUFFIX) dlartgs.$(SUFFIX) \ -+ ../INSTALL/dsecnd_$(TIMER).$(SUFFIX) - - SLASRC = \ -- sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \ -- sgbsvx.o sgbtf2.o sgbtrf.o sgbtrs.o sgebak.o sgebal.o sgebd2.o \ -- sgebrd.o sgecon.o sgeequ.o sgees.o sgeesx.o sgeev.o sgeevx.o \ -- sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \ -- sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ -- sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ -- sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ -- sgetc2.o sgetf2.o sgetri.o \ -- sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ -- sggglm.o sgghrd.o sgglse.o sggqrf.o \ -- sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \ -- sgtsvx.o sgttrf.o sgttrs.o sgtts2.o shgeqz.o \ -- shsein.o shseqr.o slabrd.o slacon.o slacn2.o \ -- slaein.o slaexc.o slag2.o slags2.o slagtm.o slagv2.o slahqr.o \ -- slahrd.o slahr2.o slaic1.o slaln2.o slals0.o slalsa.o slalsd.o \ -- slangb.o slange.o slangt.o slanhs.o slansb.o slansp.o \ -- slansy.o slantb.o slantp.o slantr.o slanv2.o \ -- slapll.o slapmt.o \ -- slaqgb.o slaqge.o slaqp2.o slaqps.o slaqsb.o slaqsp.o slaqsy.o \ -- slaqr0.o slaqr1.o slaqr2.o slaqr3.o slaqr4.o slaqr5.o \ -- slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \ -- slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \ -- slarrv.o slartv.o \ -- slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o \ -- slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ -- slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ -- sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ -- sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ -- sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ -- sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ -- spbstf.o spbsv.o spbsvx.o \ -- spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ -- sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \ -- sppcon.o sppequ.o \ -- spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ -- spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ -- ssbev.o ssbevd.o ssbevx.o ssbgst.o ssbgv.o ssbgvd.o ssbgvx.o \ -- ssbtrd.o sspcon.o sspev.o sspevd.o sspevx.o sspgst.o \ -- sspgv.o sspgvd.o sspgvx.o ssprfs.o sspsv.o sspsvx.o ssptrd.o \ -- ssptrf.o ssptri.o ssptrs.o sstegr.o sstein.o sstev.o sstevd.o sstevr.o \ -- sstevx.o \ -- ssycon.o ssyev.o ssyevd.o ssyevr.o ssyevx.o ssygs2.o \ -- ssygst.o ssygv.o ssygvd.o ssygvx.o ssyrfs.o ssysv.o ssysvx.o \ -- ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytri2.o ssytri2x.o \ -- ssyswapr.o ssytrs.o ssytrs2.o ssyconv.o \ -- stbcon.o \ -- stbrfs.o stbtrs.o stgevc.o stgex2.o stgexc.o stgsen.o \ -- stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ -- stptrs.o \ -- strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ -- strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ -- slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ -- stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ -- sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ -- sgeequb.o ssyequb.o spoequb.o sgbequb.o \ -- sbbcsd.o slapmr.o sorbdb.o sorcsd.o \ -- sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \ -- stpqrt.o stpqrt2.o stpmqrt.o stprfb.o -+ sgbbrd.$(SUFFIX) sgbcon.$(SUFFIX) sgbequ.$(SUFFIX) sgbrfs.$(SUFFIX) sgbsv.$(SUFFIX) \ -+ sgbsvx.$(SUFFIX) sgbtf2.$(SUFFIX) sgbtrf.$(SUFFIX) sgbtrs.$(SUFFIX) sgebak.$(SUFFIX) sgebal.$(SUFFIX) sgebd2.$(SUFFIX) \ -+ sgebrd.$(SUFFIX) sgecon.$(SUFFIX) sgeequ.$(SUFFIX) sgees.$(SUFFIX) sgeesx.$(SUFFIX) sgeev.$(SUFFIX) sgeevx.$(SUFFIX) \ -+ sgegs.$(SUFFIX) sgegv.$(SUFFIX) sgehd2.$(SUFFIX) sgehrd.$(SUFFIX) sgelq2.$(SUFFIX) sgelqf.$(SUFFIX) \ -+ sgels.$(SUFFIX) sgelsd.$(SUFFIX) sgelss.$(SUFFIX) sgelsx.$(SUFFIX) sgelsy.$(SUFFIX) sgeql2.$(SUFFIX) sgeqlf.$(SUFFIX) \ -+ sgeqp3.$(SUFFIX) sgeqpf.$(SUFFIX) sgeqr2.$(SUFFIX) sgeqr2p.$(SUFFIX) sgeqrf.$(SUFFIX) sgeqrfp.$(SUFFIX) sgerfs.$(SUFFIX) \ -+ sgerq2.$(SUFFIX) sgerqf.$(SUFFIX) sgesc2.$(SUFFIX) sgesdd.$(SUFFIX) sgesv.$(SUFFIX) sgesvd.$(SUFFIX) sgesvx.$(SUFFIX) \ -+ sgetc2.$(SUFFIX) sgetri.$(SUFFIX) \ -+ sggbak.$(SUFFIX) sggbal.$(SUFFIX) sgges.$(SUFFIX) sggesx.$(SUFFIX) sggev.$(SUFFIX) sggevx.$(SUFFIX) \ -+ sggglm.$(SUFFIX) sgghrd.$(SUFFIX) sgglse.$(SUFFIX) sggqrf.$(SUFFIX) \ -+ sggrqf.$(SUFFIX) sggsvd.$(SUFFIX) sggsvp.$(SUFFIX) sgtcon.$(SUFFIX) sgtrfs.$(SUFFIX) sgtsv.$(SUFFIX) \ -+ sgtsvx.$(SUFFIX) sgttrf.$(SUFFIX) sgttrs.$(SUFFIX) sgtts2.$(SUFFIX) shgeqz.$(SUFFIX) \ -+ shsein.$(SUFFIX) shseqr.$(SUFFIX) slabrd.$(SUFFIX) slacon.$(SUFFIX) slacn2.$(SUFFIX) \ -+ slaein.$(SUFFIX) slaexc.$(SUFFIX) slag2.$(SUFFIX) slags2.$(SUFFIX) slagtm.$(SUFFIX) slagv2.$(SUFFIX) slahqr.$(SUFFIX) \ -+ slahrd.$(SUFFIX) slahr2.$(SUFFIX) slaic1.$(SUFFIX) slaln2.$(SUFFIX) slals0.$(SUFFIX) slalsa.$(SUFFIX) slalsd.$(SUFFIX) \ -+ slangb.$(SUFFIX) slange.$(SUFFIX) slangt.$(SUFFIX) slanhs.$(SUFFIX) slansb.$(SUFFIX) slansp.$(SUFFIX) \ -+ slansy.$(SUFFIX) slantb.$(SUFFIX) slantp.$(SUFFIX) slantr.$(SUFFIX) slanv2.$(SUFFIX) \ -+ slapll.$(SUFFIX) slapmt.$(SUFFIX) \ -+ slaqgb.$(SUFFIX) slaqge.$(SUFFIX) slaqp2.$(SUFFIX) slaqps.$(SUFFIX) slaqsb.$(SUFFIX) slaqsp.$(SUFFIX) slaqsy.$(SUFFIX) \ -+ slaqr0.$(SUFFIX) slaqr1.$(SUFFIX) slaqr2.$(SUFFIX) slaqr3.$(SUFFIX) slaqr4.$(SUFFIX) slaqr5.$(SUFFIX) \ -+ slaqtr.$(SUFFIX) slar1v.$(SUFFIX) slar2v.$(SUFFIX) ilaslr.$(SUFFIX) ilaslc.$(SUFFIX) \ -+ slarf.$(SUFFIX) slarfb.$(SUFFIX) slarfg.$(SUFFIX) slarfgp.$(SUFFIX) slarft.$(SUFFIX) slarfx.$(SUFFIX) slargv.$(SUFFIX) \ -+ slarrv.$(SUFFIX) slartv.$(SUFFIX) \ -+ slarz.$(SUFFIX) slarzb.$(SUFFIX) slarzt.$(SUFFIX) slasy2.$(SUFFIX) slasyf.$(SUFFIX) \ -+ slatbs.$(SUFFIX) slatdf.$(SUFFIX) slatps.$(SUFFIX) slatrd.$(SUFFIX) slatrs.$(SUFFIX) slatrz.$(SUFFIX) slatzm.$(SUFFIX) \ -+ sopgtr.$(SUFFIX) sopmtr.$(SUFFIX) sorg2l.$(SUFFIX) sorg2r.$(SUFFIX) \ -+ sorgbr.$(SUFFIX) sorghr.$(SUFFIX) sorgl2.$(SUFFIX) sorglq.$(SUFFIX) sorgql.$(SUFFIX) sorgqr.$(SUFFIX) sorgr2.$(SUFFIX) \ -+ sorgrq.$(SUFFIX) sorgtr.$(SUFFIX) sorm2l.$(SUFFIX) sorm2r.$(SUFFIX) \ -+ sormbr.$(SUFFIX) sormhr.$(SUFFIX) sorml2.$(SUFFIX) sormlq.$(SUFFIX) sormql.$(SUFFIX) sormqr.$(SUFFIX) sormr2.$(SUFFIX) \ -+ sormr3.$(SUFFIX) sormrq.$(SUFFIX) sormrz.$(SUFFIX) sormtr.$(SUFFIX) spbcon.$(SUFFIX) spbequ.$(SUFFIX) spbrfs.$(SUFFIX) \ -+ spbstf.$(SUFFIX) spbsv.$(SUFFIX) spbsvx.$(SUFFIX) \ -+ spbtf2.$(SUFFIX) spbtrf.$(SUFFIX) spbtrs.$(SUFFIX) spocon.$(SUFFIX) spoequ.$(SUFFIX) sporfs.$(SUFFIX) sposv.$(SUFFIX) \ -+ sposvx.$(SUFFIX) spotri.$(SUFFIX) spstrf.$(SUFFIX) spstf2.$(SUFFIX) \ -+ sppcon.$(SUFFIX) sppequ.$(SUFFIX) \ -+ spprfs.$(SUFFIX) sppsv.$(SUFFIX) sppsvx.$(SUFFIX) spptrf.$(SUFFIX) spptri.$(SUFFIX) spptrs.$(SUFFIX) sptcon.$(SUFFIX) \ -+ spteqr.$(SUFFIX) sptrfs.$(SUFFIX) sptsv.$(SUFFIX) sptsvx.$(SUFFIX) spttrs.$(SUFFIX) sptts2.$(SUFFIX) srscl.$(SUFFIX) \ -+ ssbev.$(SUFFIX) ssbevd.$(SUFFIX) ssbevx.$(SUFFIX) ssbgst.$(SUFFIX) ssbgv.$(SUFFIX) ssbgvd.$(SUFFIX) ssbgvx.$(SUFFIX) \ -+ ssbtrd.$(SUFFIX) sspcon.$(SUFFIX) sspev.$(SUFFIX) sspevd.$(SUFFIX) sspevx.$(SUFFIX) sspgst.$(SUFFIX) \ -+ sspgv.$(SUFFIX) sspgvd.$(SUFFIX) sspgvx.$(SUFFIX) ssprfs.$(SUFFIX) sspsv.$(SUFFIX) sspsvx.$(SUFFIX) ssptrd.$(SUFFIX) \ -+ ssptrf.$(SUFFIX) ssptri.$(SUFFIX) ssptrs.$(SUFFIX) sstegr.$(SUFFIX) sstein.$(SUFFIX) sstev.$(SUFFIX) sstevd.$(SUFFIX) sstevr.$(SUFFIX) \ -+ sstevx.$(SUFFIX) \ -+ ssycon.$(SUFFIX) ssyev.$(SUFFIX) ssyevd.$(SUFFIX) ssyevr.$(SUFFIX) ssyevx.$(SUFFIX) ssygs2.$(SUFFIX) \ -+ ssygst.$(SUFFIX) ssygv.$(SUFFIX) ssygvd.$(SUFFIX) ssygvx.$(SUFFIX) ssyrfs.$(SUFFIX) ssysv.$(SUFFIX) ssysvx.$(SUFFIX) \ -+ ssytd2.$(SUFFIX) ssytf2.$(SUFFIX) ssytrd.$(SUFFIX) ssytrf.$(SUFFIX) ssytri.$(SUFFIX) ssytri2.$(SUFFIX) ssytri2x.$(SUFFIX) \ -+ ssyswapr.$(SUFFIX) ssytrs.$(SUFFIX) ssytrs2.$(SUFFIX) ssyconv.$(SUFFIX) \ -+ stbcon.$(SUFFIX) \ -+ stbrfs.$(SUFFIX) stbtrs.$(SUFFIX) stgevc.$(SUFFIX) stgex2.$(SUFFIX) stgexc.$(SUFFIX) stgsen.$(SUFFIX) \ -+ stgsja.$(SUFFIX) stgsna.$(SUFFIX) stgsy2.$(SUFFIX) stgsyl.$(SUFFIX) stpcon.$(SUFFIX) stprfs.$(SUFFIX) stptri.$(SUFFIX) \ -+ stptrs.$(SUFFIX) \ -+ strcon.$(SUFFIX) strevc.$(SUFFIX) strexc.$(SUFFIX) strrfs.$(SUFFIX) strsen.$(SUFFIX) strsna.$(SUFFIX) strsyl.$(SUFFIX) \ -+ strtrs.$(SUFFIX) stzrqf.$(SUFFIX) stzrzf.$(SUFFIX) sstemr.$(SUFFIX) \ -+ slansf.$(SUFFIX) spftrf.$(SUFFIX) spftri.$(SUFFIX) spftrs.$(SUFFIX) ssfrk.$(SUFFIX) stfsm.$(SUFFIX) stftri.$(SUFFIX) stfttp.$(SUFFIX) \ -+ stfttr.$(SUFFIX) stpttf.$(SUFFIX) stpttr.$(SUFFIX) strttf.$(SUFFIX) strttp.$(SUFFIX) \ -+ sgejsv.$(SUFFIX) sgesvj.$(SUFFIX) sgsvj0.$(SUFFIX) sgsvj1.$(SUFFIX) \ -+ sgeequb.$(SUFFIX) ssyequb.$(SUFFIX) spoequb.$(SUFFIX) sgbequb.$(SUFFIX) \ -+ sbbcsd.$(SUFFIX) slapmr.$(SUFFIX) sorbdb.$(SUFFIX) sorcsd.$(SUFFIX) \ -+ sgeqrt.$(SUFFIX) sgeqrt2.$(SUFFIX) sgeqrt3.$(SUFFIX) sgemqrt.$(SUFFIX) \ -+ stpqrt.$(SUFFIX) stpqrt2.$(SUFFIX) stpmqrt.$(SUFFIX) stprfb.$(SUFFIX) - --DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o -+DSLASRC = spotrs.$(SUFFIX) - - ifdef USEXBLAS --SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \ -- sla_gercond.o sla_gerpvgrw.o ssysvxx.o ssyrfsx.o \ -- sla_syrfsx_extended.o sla_syamv.o sla_syrcond.o sla_syrpvgrw.o \ -- sposvxx.o sporfsx.o sla_porfsx_extended.o sla_porcond.o \ -- sla_porpvgrw.o sgbsvxx.o sgbrfsx.o sla_gbrfsx_extended.o \ -- sla_gbamv.o sla_gbrcond.o sla_gbrpvgrw.o sla_lin_berr.o slarscl2.o \ -- slascl2.o sla_wwaddw.o -+SXLASRC = sgesvxx.$(SUFFIX) sgerfsx.$(SUFFIX) sla_gerfsx_extended.$(SUFFIX) sla_geamv.$(SUFFIX) \ -+ sla_gercond.$(SUFFIX) sla_gerpvgrw.$(SUFFIX) ssysvxx.$(SUFFIX) ssyrfsx.$(SUFFIX) \ -+ sla_syrfsx_extended.$(SUFFIX) sla_syamv.$(SUFFIX) sla_syrcond.$(SUFFIX) sla_syrpvgrw.$(SUFFIX) \ -+ sposvxx.$(SUFFIX) sporfsx.$(SUFFIX) sla_porfsx_extended.$(SUFFIX) sla_porcond.$(SUFFIX) \ -+ sla_porpvgrw.$(SUFFIX) sgbsvxx.$(SUFFIX) sgbrfsx.$(SUFFIX) sla_gbrfsx_extended.$(SUFFIX) \ -+ sla_gbamv.$(SUFFIX) sla_gbrcond.$(SUFFIX) sla_gbrpvgrw.$(SUFFIX) sla_lin_berr.$(SUFFIX) slarscl2.$(SUFFIX) \ -+ slascl2.$(SUFFIX) sla_wwaddw.$(SUFFIX) - endif - - CLASRC = \ -- cbdsqr.o cgbbrd.o cgbcon.o cgbequ.o cgbrfs.o cgbsv.o cgbsvx.o \ -- cgbtf2.o cgbtrf.o cgbtrs.o cgebak.o cgebal.o cgebd2.o cgebrd.o \ -- cgecon.o cgeequ.o cgees.o cgeesx.o cgeev.o cgeevx.o \ -- cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \ -- cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ -- cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ -- cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ -- cgesvx.o cgetc2.o cgetf2.o cgetri.o \ -- cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ -- cgghrd.o cgglse.o cggqrf.o cggrqf.o \ -- cggsvd.o cggsvp.o \ -- cgtcon.o cgtrfs.o cgtsv.o cgtsvx.o cgttrf.o cgttrs.o cgtts2.o chbev.o \ -- chbevd.o chbevx.o chbgst.o chbgv.o chbgvd.o chbgvx.o chbtrd.o \ -- checon.o cheev.o cheevd.o cheevr.o cheevx.o chegs2.o chegst.o \ -- chegv.o chegvd.o chegvx.o cherfs.o chesv.o chesvx.o chetd2.o \ -- chetf2.o chetrd.o \ -- chetrf.o chetri.o chetri2.o chetri2x.o cheswapr.o \ -- chetrs.o chetrs2.o chgeqz.o chpcon.o chpev.o chpevd.o \ -- chpevx.o chpgst.o chpgv.o chpgvd.o chpgvx.o chprfs.o chpsv.o \ -- chpsvx.o \ -- chptrd.o chptrf.o chptri.o chptrs.o chsein.o chseqr.o clabrd.o \ -- clacgv.o clacon.o clacn2.o clacp2.o clacpy.o clacrm.o clacrt.o cladiv.o \ -- claed0.o claed7.o claed8.o \ -- claein.o claesy.o claev2.o clags2.o clagtm.o \ -- clahef.o clahqr.o \ -- clahrd.o clahr2.o claic1.o clals0.o clalsa.o clalsd.o clangb.o clange.o clangt.o \ -- clanhb.o clanhe.o \ -- clanhp.o clanhs.o clanht.o clansb.o clansp.o clansy.o clantb.o \ -- clantp.o clantr.o clapll.o clapmt.o clarcm.o claqgb.o claqge.o \ -- claqhb.o claqhe.o claqhp.o claqp2.o claqps.o claqsb.o \ -- claqr0.o claqr1.o claqr2.o claqr3.o claqr4.o claqr5.o \ -- claqsp.o claqsy.o clar1v.o clar2v.o ilaclr.o ilaclc.o \ -- clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \ -- clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ -- clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ -- claswp.o clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ -- clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ -- cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ -- cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \ -- cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ -- cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ -- crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ -- cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \ -- cstegr.o cstein.o csteqr.o \ -- csycon.o csymv.o \ -- csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \ -- csyswapr.o csytrs.o csytrs2.o csyconv.o \ -- ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \ -- ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ -- ctprfs.o ctptri.o \ -- ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ -- ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ -- cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ -- cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ -- cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ -- cunmtr.o cupgtr.o cupmtr.o icmax1.o scsum1.o cstemr.o \ -- chfrk.o ctfttp.o clanhf.o cpftrf.o cpftri.o cpftrs.o ctfsm.o ctftri.o \ -- ctfttr.o ctpttf.o ctpttr.o ctrttf.o ctrttp.o \ -- cgeequb.o cgbequb.o csyequb.o cpoequb.o cheequb.o \ -- cbbcsd.o clapmr.o cunbdb.o cuncsd.o \ -- cgeqrt.o cgeqrt2.o cgeqrt3.o cgemqrt.o \ -- ctpqrt.o ctpqrt2.o ctpmqrt.o ctprfb.o -+ cbdsqr.$(SUFFIX) cgbbrd.$(SUFFIX) cgbcon.$(SUFFIX) cgbequ.$(SUFFIX) cgbrfs.$(SUFFIX) cgbsv.$(SUFFIX) cgbsvx.$(SUFFIX) \ -+ cgbtf2.$(SUFFIX) cgbtrf.$(SUFFIX) cgbtrs.$(SUFFIX) cgebak.$(SUFFIX) cgebal.$(SUFFIX) cgebd2.$(SUFFIX) cgebrd.$(SUFFIX) \ -+ cgecon.$(SUFFIX) cgeequ.$(SUFFIX) cgees.$(SUFFIX) cgeesx.$(SUFFIX) cgeev.$(SUFFIX) cgeevx.$(SUFFIX) \ -+ cgegs.$(SUFFIX) cgegv.$(SUFFIX) cgehd2.$(SUFFIX) cgehrd.$(SUFFIX) cgelq2.$(SUFFIX) cgelqf.$(SUFFIX) \ -+ cgels.$(SUFFIX) cgelsd.$(SUFFIX) cgelss.$(SUFFIX) cgelsx.$(SUFFIX) cgelsy.$(SUFFIX) cgeql2.$(SUFFIX) cgeqlf.$(SUFFIX) cgeqp3.$(SUFFIX) \ -+ cgeqpf.$(SUFFIX) cgeqr2.$(SUFFIX) cgeqr2p.$(SUFFIX) cgeqrf.$(SUFFIX) cgeqrfp.$(SUFFIX) cgerfs.$(SUFFIX) \ -+ cgerq2.$(SUFFIX) cgerqf.$(SUFFIX) cgesc2.$(SUFFIX) cgesdd.$(SUFFIX) cgesv.$(SUFFIX) cgesvd.$(SUFFIX) \ -+ cgesvx.$(SUFFIX) cgetc2.$(SUFFIX) cgetri.$(SUFFIX) \ -+ cggbak.$(SUFFIX) cggbal.$(SUFFIX) cgges.$(SUFFIX) cggesx.$(SUFFIX) cggev.$(SUFFIX) cggevx.$(SUFFIX) cggglm.$(SUFFIX) \ -+ cgghrd.$(SUFFIX) cgglse.$(SUFFIX) cggqrf.$(SUFFIX) cggrqf.$(SUFFIX) \ -+ cggsvd.$(SUFFIX) cggsvp.$(SUFFIX) \ -+ cgtcon.$(SUFFIX) cgtrfs.$(SUFFIX) cgtsv.$(SUFFIX) cgtsvx.$(SUFFIX) cgttrf.$(SUFFIX) cgttrs.$(SUFFIX) cgtts2.$(SUFFIX) chbev.$(SUFFIX) \ -+ chbevd.$(SUFFIX) chbevx.$(SUFFIX) chbgst.$(SUFFIX) chbgv.$(SUFFIX) chbgvd.$(SUFFIX) chbgvx.$(SUFFIX) chbtrd.$(SUFFIX) \ -+ checon.$(SUFFIX) cheev.$(SUFFIX) cheevd.$(SUFFIX) cheevr.$(SUFFIX) cheevx.$(SUFFIX) chegs2.$(SUFFIX) chegst.$(SUFFIX) \ -+ chegv.$(SUFFIX) chegvd.$(SUFFIX) chegvx.$(SUFFIX) cherfs.$(SUFFIX) chesv.$(SUFFIX) chesvx.$(SUFFIX) chetd2.$(SUFFIX) \ -+ chetf2.$(SUFFIX) chetrd.$(SUFFIX) \ -+ chetrf.$(SUFFIX) chetri.$(SUFFIX) chetri2.$(SUFFIX) chetri2x.$(SUFFIX) cheswapr.$(SUFFIX) \ -+ chetrs.$(SUFFIX) chetrs2.$(SUFFIX) chgeqz.$(SUFFIX) chpcon.$(SUFFIX) chpev.$(SUFFIX) chpevd.$(SUFFIX) \ -+ chpevx.$(SUFFIX) chpgst.$(SUFFIX) chpgv.$(SUFFIX) chpgvd.$(SUFFIX) chpgvx.$(SUFFIX) chprfs.$(SUFFIX) chpsv.$(SUFFIX) \ -+ chpsvx.$(SUFFIX) \ -+ chptrd.$(SUFFIX) chptrf.$(SUFFIX) chptri.$(SUFFIX) chptrs.$(SUFFIX) chsein.$(SUFFIX) chseqr.$(SUFFIX) clabrd.$(SUFFIX) \ -+ clacgv.$(SUFFIX) clacon.$(SUFFIX) clacn2.$(SUFFIX) clacp2.$(SUFFIX) clacpy.$(SUFFIX) clacrm.$(SUFFIX) clacrt.$(SUFFIX) cladiv.$(SUFFIX) \ -+ claed0.$(SUFFIX) claed7.$(SUFFIX) claed8.$(SUFFIX) \ -+ claein.$(SUFFIX) claesy.$(SUFFIX) claev2.$(SUFFIX) clags2.$(SUFFIX) clagtm.$(SUFFIX) \ -+ clahef.$(SUFFIX) clahqr.$(SUFFIX) \ -+ clahrd.$(SUFFIX) clahr2.$(SUFFIX) claic1.$(SUFFIX) clals0.$(SUFFIX) clalsa.$(SUFFIX) clalsd.$(SUFFIX) clangb.$(SUFFIX) clange.$(SUFFIX) clangt.$(SUFFIX) \ -+ clanhb.$(SUFFIX) clanhe.$(SUFFIX) \ -+ clanhp.$(SUFFIX) clanhs.$(SUFFIX) clanht.$(SUFFIX) clansb.$(SUFFIX) clansp.$(SUFFIX) clansy.$(SUFFIX) clantb.$(SUFFIX) \ -+ clantp.$(SUFFIX) clantr.$(SUFFIX) clapll.$(SUFFIX) clapmt.$(SUFFIX) clarcm.$(SUFFIX) claqgb.$(SUFFIX) claqge.$(SUFFIX) \ -+ claqhb.$(SUFFIX) claqhe.$(SUFFIX) claqhp.$(SUFFIX) claqp2.$(SUFFIX) claqps.$(SUFFIX) claqsb.$(SUFFIX) \ -+ claqr0.$(SUFFIX) claqr1.$(SUFFIX) claqr2.$(SUFFIX) claqr3.$(SUFFIX) claqr4.$(SUFFIX) claqr5.$(SUFFIX) \ -+ claqsp.$(SUFFIX) claqsy.$(SUFFIX) clar1v.$(SUFFIX) clar2v.$(SUFFIX) ilaclr.$(SUFFIX) ilaclc.$(SUFFIX) \ -+ clarf.$(SUFFIX) clarfb.$(SUFFIX) clarfg.$(SUFFIX) clarft.$(SUFFIX) clarfgp.$(SUFFIX) \ -+ clarfx.$(SUFFIX) clargv.$(SUFFIX) clarnv.$(SUFFIX) clarrv.$(SUFFIX) clartg.$(SUFFIX) clartv.$(SUFFIX) \ -+ clarz.$(SUFFIX) clarzb.$(SUFFIX) clarzt.$(SUFFIX) clascl.$(SUFFIX) claset.$(SUFFIX) clasr.$(SUFFIX) classq.$(SUFFIX) \ -+ clasyf.$(SUFFIX) clatbs.$(SUFFIX) clatdf.$(SUFFIX) clatps.$(SUFFIX) clatrd.$(SUFFIX) clatrs.$(SUFFIX) clatrz.$(SUFFIX) \ -+ clatzm.$(SUFFIX) cpbcon.$(SUFFIX) cpbequ.$(SUFFIX) cpbrfs.$(SUFFIX) cpbstf.$(SUFFIX) cpbsv.$(SUFFIX) \ -+ cpbsvx.$(SUFFIX) cpbtf2.$(SUFFIX) cpbtrf.$(SUFFIX) cpbtrs.$(SUFFIX) cpocon.$(SUFFIX) cpoequ.$(SUFFIX) cporfs.$(SUFFIX) \ -+ cposv.$(SUFFIX) cposvx.$(SUFFIX) cpotri.$(SUFFIX) cpstrf.$(SUFFIX) cpstf2.$(SUFFIX) \ -+ cppcon.$(SUFFIX) cppequ.$(SUFFIX) cpprfs.$(SUFFIX) cppsv.$(SUFFIX) cppsvx.$(SUFFIX) cpptrf.$(SUFFIX) cpptri.$(SUFFIX) cpptrs.$(SUFFIX) \ -+ cptcon.$(SUFFIX) cpteqr.$(SUFFIX) cptrfs.$(SUFFIX) cptsv.$(SUFFIX) cptsvx.$(SUFFIX) cpttrf.$(SUFFIX) cpttrs.$(SUFFIX) cptts2.$(SUFFIX) \ -+ crot.$(SUFFIX) cspcon.$(SUFFIX) cspmv.$(SUFFIX) cspr.$(SUFFIX) csprfs.$(SUFFIX) cspsv.$(SUFFIX) \ -+ cspsvx.$(SUFFIX) csptrf.$(SUFFIX) csptri.$(SUFFIX) csptrs.$(SUFFIX) csrscl.$(SUFFIX) cstedc.$(SUFFIX) \ -+ cstegr.$(SUFFIX) cstein.$(SUFFIX) csteqr.$(SUFFIX) \ -+ csycon.$(SUFFIX) csymv.$(SUFFIX) \ -+ csyr.$(SUFFIX) csyrfs.$(SUFFIX) csysv.$(SUFFIX) csysvx.$(SUFFIX) csytf2.$(SUFFIX) csytrf.$(SUFFIX) csytri.$(SUFFIX) csytri2.$(SUFFIX) csytri2x.$(SUFFIX) \ -+ csyswapr.$(SUFFIX) csytrs.$(SUFFIX) csytrs2.$(SUFFIX) csyconv.$(SUFFIX) \ -+ ctbcon.$(SUFFIX) ctbrfs.$(SUFFIX) ctbtrs.$(SUFFIX) ctgevc.$(SUFFIX) ctgex2.$(SUFFIX) \ -+ ctgexc.$(SUFFIX) ctgsen.$(SUFFIX) ctgsja.$(SUFFIX) ctgsna.$(SUFFIX) ctgsy2.$(SUFFIX) ctgsyl.$(SUFFIX) ctpcon.$(SUFFIX) \ -+ ctprfs.$(SUFFIX) ctptri.$(SUFFIX) \ -+ ctptrs.$(SUFFIX) ctrcon.$(SUFFIX) ctrevc.$(SUFFIX) ctrexc.$(SUFFIX) ctrrfs.$(SUFFIX) ctrsen.$(SUFFIX) ctrsna.$(SUFFIX) \ -+ ctrsyl.$(SUFFIX) ctrtrs.$(SUFFIX) ctzrqf.$(SUFFIX) ctzrzf.$(SUFFIX) cung2l.$(SUFFIX) cung2r.$(SUFFIX) \ -+ cungbr.$(SUFFIX) cunghr.$(SUFFIX) cungl2.$(SUFFIX) cunglq.$(SUFFIX) cungql.$(SUFFIX) cungqr.$(SUFFIX) cungr2.$(SUFFIX) \ -+ cungrq.$(SUFFIX) cungtr.$(SUFFIX) cunm2l.$(SUFFIX) cunm2r.$(SUFFIX) cunmbr.$(SUFFIX) cunmhr.$(SUFFIX) cunml2.$(SUFFIX) \ -+ cunmlq.$(SUFFIX) cunmql.$(SUFFIX) cunmqr.$(SUFFIX) cunmr2.$(SUFFIX) cunmr3.$(SUFFIX) cunmrq.$(SUFFIX) cunmrz.$(SUFFIX) \ -+ cunmtr.$(SUFFIX) cupgtr.$(SUFFIX) cupmtr.$(SUFFIX) icmax1.$(SUFFIX) scsum1.$(SUFFIX) cstemr.$(SUFFIX) \ -+ chfrk.$(SUFFIX) ctfttp.$(SUFFIX) clanhf.$(SUFFIX) cpftrf.$(SUFFIX) cpftri.$(SUFFIX) cpftrs.$(SUFFIX) ctfsm.$(SUFFIX) ctftri.$(SUFFIX) \ -+ ctfttr.$(SUFFIX) ctpttf.$(SUFFIX) ctpttr.$(SUFFIX) ctrttf.$(SUFFIX) ctrttp.$(SUFFIX) \ -+ cgeequb.$(SUFFIX) cgbequb.$(SUFFIX) csyequb.$(SUFFIX) cpoequb.$(SUFFIX) cheequb.$(SUFFIX) \ -+ cbbcsd.$(SUFFIX) clapmr.$(SUFFIX) cunbdb.$(SUFFIX) cuncsd.$(SUFFIX) \ -+ cgeqrt.$(SUFFIX) cgeqrt2.$(SUFFIX) cgeqrt3.$(SUFFIX) cgemqrt.$(SUFFIX) \ -+ ctpqrt.$(SUFFIX) ctpqrt2.$(SUFFIX) ctpmqrt.$(SUFFIX) ctprfb.$(SUFFIX) - - ifdef USEXBLAS --CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \ -- cla_gercond_c.o cla_gercond_x.o cla_gerpvgrw.o \ -- csysvxx.o csyrfsx.o cla_syrfsx_extended.o cla_syamv.o \ -- cla_syrcond_c.o cla_syrcond_x.o cla_syrpvgrw.o \ -- cposvxx.o cporfsx.o cla_porfsx_extended.o \ -- cla_porcond_c.o cla_porcond_x.o cla_porpvgrw.o \ -- cgbsvxx.o cgbrfsx.o cla_gbrfsx_extended.o cla_gbamv.o \ -- cla_gbrcond_c.o cla_gbrcond_x.o cla_gbrpvgrw.o \ -- chesvxx.o cherfsx.o cla_herfsx_extended.o cla_heamv.o \ -- cla_hercond_c.o cla_hercond_x.o cla_herpvgrw.o \ -- cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o -+CXLASRC = cgesvxx.$(SUFFIX) cgerfsx.$(SUFFIX) cla_gerfsx_extended.$(SUFFIX) cla_geamv.$(SUFFIX) \ -+ cla_gercond_c.$(SUFFIX) cla_gercond_x.$(SUFFIX) cla_gerpvgrw.$(SUFFIX) \ -+ csysvxx.$(SUFFIX) csyrfsx.$(SUFFIX) cla_syrfsx_extended.$(SUFFIX) cla_syamv.$(SUFFIX) \ -+ cla_syrcond_c.$(SUFFIX) cla_syrcond_x.$(SUFFIX) cla_syrpvgrw.$(SUFFIX) \ -+ cposvxx.$(SUFFIX) cporfsx.$(SUFFIX) cla_porfsx_extended.$(SUFFIX) \ -+ cla_porcond_c.$(SUFFIX) cla_porcond_x.$(SUFFIX) cla_porpvgrw.$(SUFFIX) \ -+ cgbsvxx.$(SUFFIX) cgbrfsx.$(SUFFIX) cla_gbrfsx_extended.$(SUFFIX) cla_gbamv.$(SUFFIX) \ -+ cla_gbrcond_c.$(SUFFIX) cla_gbrcond_x.$(SUFFIX) cla_gbrpvgrw.$(SUFFIX) \ -+ chesvxx.$(SUFFIX) cherfsx.$(SUFFIX) cla_herfsx_extended.$(SUFFIX) cla_heamv.$(SUFFIX) \ -+ cla_hercond_c.$(SUFFIX) cla_hercond_x.$(SUFFIX) cla_herpvgrw.$(SUFFIX) \ -+ cla_lin_berr.$(SUFFIX) clarscl2.$(SUFFIX) clascl2.$(SUFFIX) cla_wwaddw.$(SUFFIX) - endif - --ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o -+ZCLASRC = cpotrs.$(SUFFIX) - - DLASRC = \ -- dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \ -- dgbsvx.o dgbtf2.o dgbtrf.o dgbtrs.o dgebak.o dgebal.o dgebd2.o \ -- dgebrd.o dgecon.o dgeequ.o dgees.o dgeesx.o dgeev.o dgeevx.o \ -- dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \ -- dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ -- dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ -- dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ -- dgetc2.o dgetf2.o dgetrf.o dgetri.o \ -- dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ -- dggglm.o dgghrd.o dgglse.o dggqrf.o \ -- dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \ -- dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \ -- dhsein.o dhseqr.o dlabrd.o dlacon.o dlacn2.o \ -- dlaein.o dlaexc.o dlag2.o dlags2.o dlagtm.o dlagv2.o dlahqr.o \ -- dlahrd.o dlahr2.o dlaic1.o dlaln2.o dlals0.o dlalsa.o dlalsd.o \ -- dlangb.o dlange.o dlangt.o dlanhs.o dlansb.o dlansp.o \ -- dlansy.o dlantb.o dlantp.o dlantr.o dlanv2.o \ -- dlapll.o dlapmt.o \ -- dlaqgb.o dlaqge.o dlaqp2.o dlaqps.o dlaqsb.o dlaqsp.o dlaqsy.o \ -- dlaqr0.o dlaqr1.o dlaqr2.o dlaqr3.o dlaqr4.o dlaqr5.o \ -- dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \ -- dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ -- dlargv.o dlarrv.o dlartv.o \ -- dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o \ -- dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ -- dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ -- dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ -- dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ -- dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ -- dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ -- dpbstf.o dpbsv.o dpbsvx.o \ -- dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ -- dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ -- dppcon.o dppequ.o \ -- dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ -- dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ -- dsbev.o dsbevd.o dsbevx.o dsbgst.o dsbgv.o dsbgvd.o dsbgvx.o \ -- dsbtrd.o dspcon.o dspev.o dspevd.o dspevx.o dspgst.o \ -- dspgv.o dspgvd.o dspgvx.o dsprfs.o dspsv.o dspsvx.o dsptrd.o \ -- dsptrf.o dsptri.o dsptrs.o dstegr.o dstein.o dstev.o dstevd.o dstevr.o \ -- dstevx.o \ -- dsycon.o dsyev.o dsyevd.o dsyevr.o \ -- dsyevx.o dsygs2.o dsygst.o dsygv.o dsygvd.o dsygvx.o dsyrfs.o \ -- dsysv.o dsysvx.o \ -- dsytd2.o dsytf2.o dsytrd.o dsytrf.o dsytri.o dsytri2.o dsytri2x.o \ -- dsyswapr.o dsytrs.o dsytrs2.o dsyconv.o \ -- dtbcon.o dtbrfs.o dtbtrs.o dtgevc.o dtgex2.o dtgexc.o dtgsen.o \ -- dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ -- dtptrs.o \ -- dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ -- dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ -- dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ -- dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ -- dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ -- dgejsv.o dgesvj.o dgsvj0.o dgsvj1.o \ -- dgeequb.o dsyequb.o dpoequb.o dgbequb.o \ -- dbbcsd.o dlapmr.o dorbdb.o dorcsd.o \ -- dgeqrt.o dgeqrt2.o dgeqrt3.o dgemqrt.o \ -- dtpqrt.o dtpqrt2.o dtpmqrt.o dtprfb.o -+ dgbbrd.$(SUFFIX) dgbcon.$(SUFFIX) dgbequ.$(SUFFIX) dgbrfs.$(SUFFIX) dgbsv.$(SUFFIX) \ -+ dgbsvx.$(SUFFIX) dgbtf2.$(SUFFIX) dgbtrf.$(SUFFIX) dgbtrs.$(SUFFIX) dgebak.$(SUFFIX) dgebal.$(SUFFIX) dgebd2.$(SUFFIX) \ -+ dgebrd.$(SUFFIX) dgecon.$(SUFFIX) dgeequ.$(SUFFIX) dgees.$(SUFFIX) dgeesx.$(SUFFIX) dgeev.$(SUFFIX) dgeevx.$(SUFFIX) \ -+ dgegs.$(SUFFIX) dgegv.$(SUFFIX) dgehd2.$(SUFFIX) dgehrd.$(SUFFIX) dgelq2.$(SUFFIX) dgelqf.$(SUFFIX) \ -+ dgels.$(SUFFIX) dgelsd.$(SUFFIX) dgelss.$(SUFFIX) dgelsx.$(SUFFIX) dgelsy.$(SUFFIX) dgeql2.$(SUFFIX) dgeqlf.$(SUFFIX) \ -+ dgeqp3.$(SUFFIX) dgeqpf.$(SUFFIX) dgeqr2.$(SUFFIX) dgeqr2p.$(SUFFIX) dgeqrf.$(SUFFIX) dgeqrfp.$(SUFFIX) dgerfs.$(SUFFIX) \ -+ dgerq2.$(SUFFIX) dgerqf.$(SUFFIX) dgesc2.$(SUFFIX) dgesdd.$(SUFFIX) dgesv.$(SUFFIX) dgesvd.$(SUFFIX) dgesvx.$(SUFFIX) \ -+ dgetc2.$(SUFFIX) dgetri.$(SUFFIX) \ -+ dggbak.$(SUFFIX) dggbal.$(SUFFIX) dgges.$(SUFFIX) dggesx.$(SUFFIX) dggev.$(SUFFIX) dggevx.$(SUFFIX) \ -+ dggglm.$(SUFFIX) dgghrd.$(SUFFIX) dgglse.$(SUFFIX) dggqrf.$(SUFFIX) \ -+ dggrqf.$(SUFFIX) dggsvd.$(SUFFIX) dggsvp.$(SUFFIX) dgtcon.$(SUFFIX) dgtrfs.$(SUFFIX) dgtsv.$(SUFFIX) \ -+ dgtsvx.$(SUFFIX) dgttrf.$(SUFFIX) dgttrs.$(SUFFIX) dgtts2.$(SUFFIX) dhgeqz.$(SUFFIX) \ -+ dhsein.$(SUFFIX) dhseqr.$(SUFFIX) dlabrd.$(SUFFIX) dlacon.$(SUFFIX) dlacn2.$(SUFFIX) \ -+ dlaein.$(SUFFIX) dlaexc.$(SUFFIX) dlag2.$(SUFFIX) dlags2.$(SUFFIX) dlagtm.$(SUFFIX) dlagv2.$(SUFFIX) dlahqr.$(SUFFIX) \ -+ dlahrd.$(SUFFIX) dlahr2.$(SUFFIX) dlaic1.$(SUFFIX) dlaln2.$(SUFFIX) dlals0.$(SUFFIX) dlalsa.$(SUFFIX) dlalsd.$(SUFFIX) \ -+ dlangb.$(SUFFIX) dlange.$(SUFFIX) dlangt.$(SUFFIX) dlanhs.$(SUFFIX) dlansb.$(SUFFIX) dlansp.$(SUFFIX) \ -+ dlansy.$(SUFFIX) dlantb.$(SUFFIX) dlantp.$(SUFFIX) dlantr.$(SUFFIX) dlanv2.$(SUFFIX) \ -+ dlapll.$(SUFFIX) dlapmt.$(SUFFIX) \ -+ dlaqgb.$(SUFFIX) dlaqge.$(SUFFIX) dlaqp2.$(SUFFIX) dlaqps.$(SUFFIX) dlaqsb.$(SUFFIX) dlaqsp.$(SUFFIX) dlaqsy.$(SUFFIX) \ -+ dlaqr0.$(SUFFIX) dlaqr1.$(SUFFIX) dlaqr2.$(SUFFIX) dlaqr3.$(SUFFIX) dlaqr4.$(SUFFIX) dlaqr5.$(SUFFIX) \ -+ dlaqtr.$(SUFFIX) dlar1v.$(SUFFIX) dlar2v.$(SUFFIX) iladlr.$(SUFFIX) iladlc.$(SUFFIX) \ -+ dlarf.$(SUFFIX) dlarfb.$(SUFFIX) dlarfg.$(SUFFIX) dlarfgp.$(SUFFIX) dlarft.$(SUFFIX) dlarfx.$(SUFFIX) \ -+ dlargv.$(SUFFIX) dlarrv.$(SUFFIX) dlartv.$(SUFFIX) \ -+ dlarz.$(SUFFIX) dlarzb.$(SUFFIX) dlarzt.$(SUFFIX) dlasy2.$(SUFFIX) dlasyf.$(SUFFIX) \ -+ dlatbs.$(SUFFIX) dlatdf.$(SUFFIX) dlatps.$(SUFFIX) dlatrd.$(SUFFIX) dlatrs.$(SUFFIX) dlatrz.$(SUFFIX) dlatzm.$(SUFFIX) \ -+ dopgtr.$(SUFFIX) dopmtr.$(SUFFIX) dorg2l.$(SUFFIX) dorg2r.$(SUFFIX) \ -+ dorgbr.$(SUFFIX) dorghr.$(SUFFIX) dorgl2.$(SUFFIX) dorglq.$(SUFFIX) dorgql.$(SUFFIX) dorgqr.$(SUFFIX) dorgr2.$(SUFFIX) \ -+ dorgrq.$(SUFFIX) dorgtr.$(SUFFIX) dorm2l.$(SUFFIX) dorm2r.$(SUFFIX) \ -+ dormbr.$(SUFFIX) dormhr.$(SUFFIX) dorml2.$(SUFFIX) dormlq.$(SUFFIX) dormql.$(SUFFIX) dormqr.$(SUFFIX) dormr2.$(SUFFIX) \ -+ dormr3.$(SUFFIX) dormrq.$(SUFFIX) dormrz.$(SUFFIX) dormtr.$(SUFFIX) dpbcon.$(SUFFIX) dpbequ.$(SUFFIX) dpbrfs.$(SUFFIX) \ -+ dpbstf.$(SUFFIX) dpbsv.$(SUFFIX) dpbsvx.$(SUFFIX) \ -+ dpbtf2.$(SUFFIX) dpbtrf.$(SUFFIX) dpbtrs.$(SUFFIX) dpocon.$(SUFFIX) dpoequ.$(SUFFIX) dporfs.$(SUFFIX) dposv.$(SUFFIX) \ -+ dposvx.$(SUFFIX) dpotri.$(SUFFIX) dpotrs.$(SUFFIX) dpstrf.$(SUFFIX) dpstf2.$(SUFFIX) \ -+ dppcon.$(SUFFIX) dppequ.$(SUFFIX) \ -+ dpprfs.$(SUFFIX) dppsv.$(SUFFIX) dppsvx.$(SUFFIX) dpptrf.$(SUFFIX) dpptri.$(SUFFIX) dpptrs.$(SUFFIX) dptcon.$(SUFFIX) \ -+ dpteqr.$(SUFFIX) dptrfs.$(SUFFIX) dptsv.$(SUFFIX) dptsvx.$(SUFFIX) dpttrs.$(SUFFIX) dptts2.$(SUFFIX) drscl.$(SUFFIX) \ -+ dsbev.$(SUFFIX) dsbevd.$(SUFFIX) dsbevx.$(SUFFIX) dsbgst.$(SUFFIX) dsbgv.$(SUFFIX) dsbgvd.$(SUFFIX) dsbgvx.$(SUFFIX) \ -+ dsbtrd.$(SUFFIX) dspcon.$(SUFFIX) dspev.$(SUFFIX) dspevd.$(SUFFIX) dspevx.$(SUFFIX) dspgst.$(SUFFIX) \ -+ dspgv.$(SUFFIX) dspgvd.$(SUFFIX) dspgvx.$(SUFFIX) dsprfs.$(SUFFIX) dspsv.$(SUFFIX) dspsvx.$(SUFFIX) dsptrd.$(SUFFIX) \ -+ dsptrf.$(SUFFIX) dsptri.$(SUFFIX) dsptrs.$(SUFFIX) dstegr.$(SUFFIX) dstein.$(SUFFIX) dstev.$(SUFFIX) dstevd.$(SUFFIX) dstevr.$(SUFFIX) \ -+ dstevx.$(SUFFIX) \ -+ dsycon.$(SUFFIX) dsyev.$(SUFFIX) dsyevd.$(SUFFIX) dsyevr.$(SUFFIX) \ -+ dsyevx.$(SUFFIX) dsygs2.$(SUFFIX) dsygst.$(SUFFIX) dsygv.$(SUFFIX) dsygvd.$(SUFFIX) dsygvx.$(SUFFIX) dsyrfs.$(SUFFIX) \ -+ dsysv.$(SUFFIX) dsysvx.$(SUFFIX) \ -+ dsytd2.$(SUFFIX) dsytf2.$(SUFFIX) dsytrd.$(SUFFIX) dsytrf.$(SUFFIX) dsytri.$(SUFFIX) dsytri2.$(SUFFIX) dsytri2x.$(SUFFIX) \ -+ dsyswapr.$(SUFFIX) dsytrs.$(SUFFIX) dsytrs2.$(SUFFIX) dsyconv.$(SUFFIX) \ -+ dtbcon.$(SUFFIX) dtbrfs.$(SUFFIX) dtbtrs.$(SUFFIX) dtgevc.$(SUFFIX) dtgex2.$(SUFFIX) dtgexc.$(SUFFIX) dtgsen.$(SUFFIX) \ -+ dtgsja.$(SUFFIX) dtgsna.$(SUFFIX) dtgsy2.$(SUFFIX) dtgsyl.$(SUFFIX) dtpcon.$(SUFFIX) dtprfs.$(SUFFIX) dtptri.$(SUFFIX) \ -+ dtptrs.$(SUFFIX) \ -+ dtrcon.$(SUFFIX) dtrevc.$(SUFFIX) dtrexc.$(SUFFIX) dtrrfs.$(SUFFIX) dtrsen.$(SUFFIX) dtrsna.$(SUFFIX) dtrsyl.$(SUFFIX) \ -+ dtrtrs.$(SUFFIX) dtzrqf.$(SUFFIX) dtzrzf.$(SUFFIX) dstemr.$(SUFFIX) \ -+ dsgesv.$(SUFFIX) dsposv.$(SUFFIX) dlag2s.$(SUFFIX) slag2d.$(SUFFIX) dlat2s.$(SUFFIX) \ -+ dlansf.$(SUFFIX) dpftrf.$(SUFFIX) dpftri.$(SUFFIX) dpftrs.$(SUFFIX) dsfrk.$(SUFFIX) dtfsm.$(SUFFIX) dtftri.$(SUFFIX) dtfttp.$(SUFFIX) \ -+ dtfttr.$(SUFFIX) dtpttf.$(SUFFIX) dtpttr.$(SUFFIX) dtrttf.$(SUFFIX) dtrttp.$(SUFFIX) \ -+ dgejsv.$(SUFFIX) dgesvj.$(SUFFIX) dgsvj0.$(SUFFIX) dgsvj1.$(SUFFIX) \ -+ dgeequb.$(SUFFIX) dsyequb.$(SUFFIX) dpoequb.$(SUFFIX) dgbequb.$(SUFFIX) \ -+ dbbcsd.$(SUFFIX) dlapmr.$(SUFFIX) dorbdb.$(SUFFIX) dorcsd.$(SUFFIX) \ -+ dgeqrt.$(SUFFIX) dgeqrt2.$(SUFFIX) dgeqrt3.$(SUFFIX) dgemqrt.$(SUFFIX) \ -+ dtpqrt.$(SUFFIX) dtpqrt2.$(SUFFIX) dtpmqrt.$(SUFFIX) dtprfb.$(SUFFIX) - - ifdef USEXBLAS --DXLASRC = dgesvxx.o dgerfsx.o dla_gerfsx_extended.o dla_geamv.o \ -- dla_gercond.o dla_gerpvgrw.o dsysvxx.o dsyrfsx.o \ -- dla_syrfsx_extended.o dla_syamv.o dla_syrcond.o dla_syrpvgrw.o \ -- dposvxx.o dporfsx.o dla_porfsx_extended.o dla_porcond.o \ -- dla_porpvgrw.o dgbsvxx.o dgbrfsx.o dla_gbrfsx_extended.o \ -- dla_gbamv.o dla_gbrcond.o dla_gbrpvgrw.o dla_lin_berr.o dlarscl2.o \ -- dlascl2.o dla_wwaddw.o -+DXLASRC = dgesvxx.$(SUFFIX) dgerfsx.$(SUFFIX) dla_gerfsx_extended.$(SUFFIX) dla_geamv.$(SUFFIX) \ -+ dla_gercond.$(SUFFIX) dla_gerpvgrw.$(SUFFIX) dsysvxx.$(SUFFIX) dsyrfsx.$(SUFFIX) \ -+ dla_syrfsx_extended.$(SUFFIX) dla_syamv.$(SUFFIX) dla_syrcond.$(SUFFIX) dla_syrpvgrw.$(SUFFIX) \ -+ dposvxx.$(SUFFIX) dporfsx.$(SUFFIX) dla_porfsx_extended.$(SUFFIX) dla_porcond.$(SUFFIX) \ -+ dla_porpvgrw.$(SUFFIX) dgbsvxx.$(SUFFIX) dgbrfsx.$(SUFFIX) dla_gbrfsx_extended.$(SUFFIX) \ -+ dla_gbamv.$(SUFFIX) dla_gbrcond.$(SUFFIX) dla_gbrpvgrw.$(SUFFIX) dla_lin_berr.$(SUFFIX) dlarscl2.$(SUFFIX) \ -+ dlascl2.$(SUFFIX) dla_wwaddw.$(SUFFIX) - endif - - ZLASRC = \ -- zbdsqr.o zgbbrd.o zgbcon.o zgbequ.o zgbrfs.o zgbsv.o zgbsvx.o \ -- zgbtf2.o zgbtrf.o zgbtrs.o zgebak.o zgebal.o zgebd2.o zgebrd.o \ -- zgecon.o zgeequ.o zgees.o zgeesx.o zgeev.o zgeevx.o \ -- zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ -- zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ -- zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ -- zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \ -- zgetri.o zgetrs.o \ -- zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ -- zgghrd.o zgglse.o zggqrf.o zggrqf.o \ -- zggsvd.o zggsvp.o \ -- zgtcon.o zgtrfs.o zgtsv.o zgtsvx.o zgttrf.o zgttrs.o zgtts2.o zhbev.o \ -- zhbevd.o zhbevx.o zhbgst.o zhbgv.o zhbgvd.o zhbgvx.o zhbtrd.o \ -- zhecon.o zheev.o zheevd.o zheevr.o zheevx.o zhegs2.o zhegst.o \ -- zhegv.o zhegvd.o zhegvx.o zherfs.o zhesv.o zhesvx.o zhetd2.o \ -- zhetf2.o zhetrd.o \ -- zhetrf.o zhetri.o zhetri2.o zhetri2x.o zheswapr.o \ -- zhetrs.o zhetrs2.o zhgeqz.o zhpcon.o zhpev.o zhpevd.o \ -- zhpevx.o zhpgst.o zhpgv.o zhpgvd.o zhpgvx.o zhprfs.o zhpsv.o \ -- zhpsvx.o \ -- zhptrd.o zhptrf.o zhptri.o zhptrs.o zhsein.o zhseqr.o zlabrd.o \ -- zlacgv.o zlacon.o zlacn2.o zlacp2.o zlacpy.o zlacrm.o zlacrt.o zladiv.o \ -- zlaed0.o zlaed7.o zlaed8.o \ -- zlaein.o zlaesy.o zlaev2.o zlags2.o zlagtm.o \ -- zlahef.o zlahqr.o \ -- zlahrd.o zlahr2.o zlaic1.o zlals0.o zlalsa.o zlalsd.o zlangb.o zlange.o \ -- zlangt.o zlanhb.o \ -- zlanhe.o \ -- zlanhp.o zlanhs.o zlanht.o zlansb.o zlansp.o zlansy.o zlantb.o \ -- zlantp.o zlantr.o zlapll.o zlapmt.o zlaqgb.o zlaqge.o \ -- zlaqhb.o zlaqhe.o zlaqhp.o zlaqp2.o zlaqps.o zlaqsb.o \ -- zlaqr0.o zlaqr1.o zlaqr2.o zlaqr3.o zlaqr4.o zlaqr5.o \ -- zlaqsp.o zlaqsy.o zlar1v.o zlar2v.o ilazlr.o ilazlc.o \ -- zlarcm.o zlarf.o zlarfb.o \ -- zlarfg.o zlarft.o zlarfgp.o \ -- zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ -- zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ -- zlassq.o zlaswp.o zlasyf.o \ -- zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ -- zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ -- zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ -- zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ -- zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ -- zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ -- zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ -- zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \ -- zstegr.o zstein.o zsteqr.o \ -- zsycon.o zsymv.o \ -- zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \ -- zsyswapr.o zsytrs.o zsytrs2.o zsyconv.o \ -- ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \ -- ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ -- ztprfs.o ztptri.o \ -- ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ -- ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ -- zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ -- zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ -- zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ -- zunmtr.o zupgtr.o \ -- zupmtr.o izmax1.o dzsum1.o zstemr.o \ -- zcgesv.o zcposv.o zlag2c.o clag2z.o zlat2c.o \ -- zhfrk.o ztfttp.o zlanhf.o zpftrf.o zpftri.o zpftrs.o ztfsm.o ztftri.o \ -- ztfttr.o ztpttf.o ztpttr.o ztrttf.o ztrttp.o \ -- zgeequb.o zgbequb.o zsyequb.o zpoequb.o zheequb.o \ -- zbbcsd.o zlapmr.o zunbdb.o zuncsd.o \ -- zgeqrt.o zgeqrt2.o zgeqrt3.o zgemqrt.o \ -- ztpqrt.o ztpqrt2.o ztpmqrt.o ztprfb.o -+ zbdsqr.$(SUFFIX) zgbbrd.$(SUFFIX) zgbcon.$(SUFFIX) zgbequ.$(SUFFIX) zgbrfs.$(SUFFIX) zgbsv.$(SUFFIX) zgbsvx.$(SUFFIX) \ -+ zgbtf2.$(SUFFIX) zgbtrf.$(SUFFIX) zgbtrs.$(SUFFIX) zgebak.$(SUFFIX) zgebal.$(SUFFIX) zgebd2.$(SUFFIX) zgebrd.$(SUFFIX) \ -+ zgecon.$(SUFFIX) zgeequ.$(SUFFIX) zgees.$(SUFFIX) zgeesx.$(SUFFIX) zgeev.$(SUFFIX) zgeevx.$(SUFFIX) \ -+ zgegs.$(SUFFIX) zgegv.$(SUFFIX) zgehd2.$(SUFFIX) zgehrd.$(SUFFIX) zgelq2.$(SUFFIX) zgelqf.$(SUFFIX) \ -+ zgels.$(SUFFIX) zgelsd.$(SUFFIX) zgelss.$(SUFFIX) zgelsx.$(SUFFIX) zgelsy.$(SUFFIX) zgeql2.$(SUFFIX) zgeqlf.$(SUFFIX) zgeqp3.$(SUFFIX) \ -+ zgeqpf.$(SUFFIX) zgeqr2.$(SUFFIX) zgeqr2p.$(SUFFIX) zgeqrf.$(SUFFIX) zgeqrfp.$(SUFFIX) zgerfs.$(SUFFIX) zgerq2.$(SUFFIX) zgerqf.$(SUFFIX) \ -+ zgesc2.$(SUFFIX) zgesdd.$(SUFFIX) zgesv.$(SUFFIX) zgesvd.$(SUFFIX) zgesvx.$(SUFFIX) zgetc2.$(SUFFIX) \ -+ zgetri.$(SUFFIX) \ -+ zggbak.$(SUFFIX) zggbal.$(SUFFIX) zgges.$(SUFFIX) zggesx.$(SUFFIX) zggev.$(SUFFIX) zggevx.$(SUFFIX) zggglm.$(SUFFIX) \ -+ zgghrd.$(SUFFIX) zgglse.$(SUFFIX) zggqrf.$(SUFFIX) zggrqf.$(SUFFIX) \ -+ zggsvd.$(SUFFIX) zggsvp.$(SUFFIX) \ -+ zgtcon.$(SUFFIX) zgtrfs.$(SUFFIX) zgtsv.$(SUFFIX) zgtsvx.$(SUFFIX) zgttrf.$(SUFFIX) zgttrs.$(SUFFIX) zgtts2.$(SUFFIX) zhbev.$(SUFFIX) \ -+ zhbevd.$(SUFFIX) zhbevx.$(SUFFIX) zhbgst.$(SUFFIX) zhbgv.$(SUFFIX) zhbgvd.$(SUFFIX) zhbgvx.$(SUFFIX) zhbtrd.$(SUFFIX) \ -+ zhecon.$(SUFFIX) zheev.$(SUFFIX) zheevd.$(SUFFIX) zheevr.$(SUFFIX) zheevx.$(SUFFIX) zhegs2.$(SUFFIX) zhegst.$(SUFFIX) \ -+ zhegv.$(SUFFIX) zhegvd.$(SUFFIX) zhegvx.$(SUFFIX) zherfs.$(SUFFIX) zhesv.$(SUFFIX) zhesvx.$(SUFFIX) zhetd2.$(SUFFIX) \ -+ zhetf2.$(SUFFIX) zhetrd.$(SUFFIX) \ -+ zhetrf.$(SUFFIX) zhetri.$(SUFFIX) zhetri2.$(SUFFIX) zhetri2x.$(SUFFIX) zheswapr.$(SUFFIX) \ -+ zhetrs.$(SUFFIX) zhetrs2.$(SUFFIX) zhgeqz.$(SUFFIX) zhpcon.$(SUFFIX) zhpev.$(SUFFIX) zhpevd.$(SUFFIX) \ -+ zhpevx.$(SUFFIX) zhpgst.$(SUFFIX) zhpgv.$(SUFFIX) zhpgvd.$(SUFFIX) zhpgvx.$(SUFFIX) zhprfs.$(SUFFIX) zhpsv.$(SUFFIX) \ -+ zhpsvx.$(SUFFIX) \ -+ zhptrd.$(SUFFIX) zhptrf.$(SUFFIX) zhptri.$(SUFFIX) zhptrs.$(SUFFIX) zhsein.$(SUFFIX) zhseqr.$(SUFFIX) zlabrd.$(SUFFIX) \ -+ zlacgv.$(SUFFIX) zlacon.$(SUFFIX) zlacn2.$(SUFFIX) zlacp2.$(SUFFIX) zlacpy.$(SUFFIX) zlacrm.$(SUFFIX) zlacrt.$(SUFFIX) zladiv.$(SUFFIX) \ -+ zlaed0.$(SUFFIX) zlaed7.$(SUFFIX) zlaed8.$(SUFFIX) \ -+ zlaein.$(SUFFIX) zlaesy.$(SUFFIX) zlaev2.$(SUFFIX) zlags2.$(SUFFIX) zlagtm.$(SUFFIX) \ -+ zlahef.$(SUFFIX) zlahqr.$(SUFFIX) \ -+ zlahrd.$(SUFFIX) zlahr2.$(SUFFIX) zlaic1.$(SUFFIX) zlals0.$(SUFFIX) zlalsa.$(SUFFIX) zlalsd.$(SUFFIX) zlangb.$(SUFFIX) zlange.$(SUFFIX) \ -+ zlangt.$(SUFFIX) zlanhb.$(SUFFIX) \ -+ zlanhe.$(SUFFIX) \ -+ zlanhp.$(SUFFIX) zlanhs.$(SUFFIX) zlanht.$(SUFFIX) zlansb.$(SUFFIX) zlansp.$(SUFFIX) zlansy.$(SUFFIX) zlantb.$(SUFFIX) \ -+ zlantp.$(SUFFIX) zlantr.$(SUFFIX) zlapll.$(SUFFIX) zlapmt.$(SUFFIX) zlaqgb.$(SUFFIX) zlaqge.$(SUFFIX) \ -+ zlaqhb.$(SUFFIX) zlaqhe.$(SUFFIX) zlaqhp.$(SUFFIX) zlaqp2.$(SUFFIX) zlaqps.$(SUFFIX) zlaqsb.$(SUFFIX) \ -+ zlaqr0.$(SUFFIX) zlaqr1.$(SUFFIX) zlaqr2.$(SUFFIX) zlaqr3.$(SUFFIX) zlaqr4.$(SUFFIX) zlaqr5.$(SUFFIX) \ -+ zlaqsp.$(SUFFIX) zlaqsy.$(SUFFIX) zlar1v.$(SUFFIX) zlar2v.$(SUFFIX) ilazlr.$(SUFFIX) ilazlc.$(SUFFIX) \ -+ zlarcm.$(SUFFIX) zlarf.$(SUFFIX) zlarfb.$(SUFFIX) \ -+ zlarfg.$(SUFFIX) zlarft.$(SUFFIX) zlarfgp.$(SUFFIX) \ -+ zlarfx.$(SUFFIX) zlargv.$(SUFFIX) zlarnv.$(SUFFIX) zlarrv.$(SUFFIX) zlartg.$(SUFFIX) zlartv.$(SUFFIX) \ -+ zlarz.$(SUFFIX) zlarzb.$(SUFFIX) zlarzt.$(SUFFIX) zlascl.$(SUFFIX) zlaset.$(SUFFIX) zlasr.$(SUFFIX) \ -+ zlassq.$(SUFFIX) zlasyf.$(SUFFIX) \ -+ zlatbs.$(SUFFIX) zlatdf.$(SUFFIX) zlatps.$(SUFFIX) zlatrd.$(SUFFIX) zlatrs.$(SUFFIX) zlatrz.$(SUFFIX) zlatzm.$(SUFFIX) zlauu2.$(SUFFIX) \ -+ zpbcon.$(SUFFIX) zpbequ.$(SUFFIX) zpbrfs.$(SUFFIX) zpbstf.$(SUFFIX) zpbsv.$(SUFFIX) \ -+ zpbsvx.$(SUFFIX) zpbtf2.$(SUFFIX) zpbtrf.$(SUFFIX) zpbtrs.$(SUFFIX) zpocon.$(SUFFIX) zpoequ.$(SUFFIX) zporfs.$(SUFFIX) \ -+ zposv.$(SUFFIX) zposvx.$(SUFFIX) zpotri.$(SUFFIX) zpotrs.$(SUFFIX) zpstrf.$(SUFFIX) zpstf2.$(SUFFIX) \ -+ zppcon.$(SUFFIX) zppequ.$(SUFFIX) zpprfs.$(SUFFIX) zppsv.$(SUFFIX) zppsvx.$(SUFFIX) zpptrf.$(SUFFIX) zpptri.$(SUFFIX) zpptrs.$(SUFFIX) \ -+ zptcon.$(SUFFIX) zpteqr.$(SUFFIX) zptrfs.$(SUFFIX) zptsv.$(SUFFIX) zptsvx.$(SUFFIX) zpttrf.$(SUFFIX) zpttrs.$(SUFFIX) zptts2.$(SUFFIX) \ -+ zrot.$(SUFFIX) zspcon.$(SUFFIX) zspmv.$(SUFFIX) zspr.$(SUFFIX) zsprfs.$(SUFFIX) zspsv.$(SUFFIX) \ -+ zspsvx.$(SUFFIX) zsptrf.$(SUFFIX) zsptri.$(SUFFIX) zsptrs.$(SUFFIX) zdrscl.$(SUFFIX) zstedc.$(SUFFIX) \ -+ zstegr.$(SUFFIX) zstein.$(SUFFIX) zsteqr.$(SUFFIX) \ -+ zsycon.$(SUFFIX) zsymv.$(SUFFIX) \ -+ zsyr.$(SUFFIX) zsyrfs.$(SUFFIX) zsysv.$(SUFFIX) zsysvx.$(SUFFIX) zsytf2.$(SUFFIX) zsytrf.$(SUFFIX) zsytri.$(SUFFIX) zsytri2.$(SUFFIX) zsytri2x.$(SUFFIX) \ -+ zsyswapr.$(SUFFIX) zsytrs.$(SUFFIX) zsytrs2.$(SUFFIX) zsyconv.$(SUFFIX) \ -+ ztbcon.$(SUFFIX) ztbrfs.$(SUFFIX) ztbtrs.$(SUFFIX) ztgevc.$(SUFFIX) ztgex2.$(SUFFIX) \ -+ ztgexc.$(SUFFIX) ztgsen.$(SUFFIX) ztgsja.$(SUFFIX) ztgsna.$(SUFFIX) ztgsy2.$(SUFFIX) ztgsyl.$(SUFFIX) ztpcon.$(SUFFIX) \ -+ ztprfs.$(SUFFIX) ztptri.$(SUFFIX) \ -+ ztptrs.$(SUFFIX) ztrcon.$(SUFFIX) ztrevc.$(SUFFIX) ztrexc.$(SUFFIX) ztrrfs.$(SUFFIX) ztrsen.$(SUFFIX) ztrsna.$(SUFFIX) \ -+ ztrsyl.$(SUFFIX) ztrtrs.$(SUFFIX) ztzrqf.$(SUFFIX) ztzrzf.$(SUFFIX) zung2l.$(SUFFIX) \ -+ zung2r.$(SUFFIX) zungbr.$(SUFFIX) zunghr.$(SUFFIX) zungl2.$(SUFFIX) zunglq.$(SUFFIX) zungql.$(SUFFIX) zungqr.$(SUFFIX) zungr2.$(SUFFIX) \ -+ zungrq.$(SUFFIX) zungtr.$(SUFFIX) zunm2l.$(SUFFIX) zunm2r.$(SUFFIX) zunmbr.$(SUFFIX) zunmhr.$(SUFFIX) zunml2.$(SUFFIX) \ -+ zunmlq.$(SUFFIX) zunmql.$(SUFFIX) zunmqr.$(SUFFIX) zunmr2.$(SUFFIX) zunmr3.$(SUFFIX) zunmrq.$(SUFFIX) zunmrz.$(SUFFIX) \ -+ zunmtr.$(SUFFIX) zupgtr.$(SUFFIX) \ -+ zupmtr.$(SUFFIX) izmax1.$(SUFFIX) dzsum1.$(SUFFIX) zstemr.$(SUFFIX) \ -+ zcgesv.$(SUFFIX) zcposv.$(SUFFIX) zlag2c.$(SUFFIX) clag2z.$(SUFFIX) zlat2c.$(SUFFIX) \ -+ zhfrk.$(SUFFIX) ztfttp.$(SUFFIX) zlanhf.$(SUFFIX) zpftrf.$(SUFFIX) zpftri.$(SUFFIX) zpftrs.$(SUFFIX) ztfsm.$(SUFFIX) ztftri.$(SUFFIX) \ -+ ztfttr.$(SUFFIX) ztpttf.$(SUFFIX) ztpttr.$(SUFFIX) ztrttf.$(SUFFIX) ztrttp.$(SUFFIX) \ -+ zgeequb.$(SUFFIX) zgbequb.$(SUFFIX) zsyequb.$(SUFFIX) zpoequb.$(SUFFIX) zheequb.$(SUFFIX) \ -+ zbbcsd.$(SUFFIX) zlapmr.$(SUFFIX) zunbdb.$(SUFFIX) zuncsd.$(SUFFIX) \ -+ zgeqrt.$(SUFFIX) zgeqrt2.$(SUFFIX) zgeqrt3.$(SUFFIX) zgemqrt.$(SUFFIX) \ -+ ztpqrt.$(SUFFIX) ztpqrt2.$(SUFFIX) ztpmqrt.$(SUFFIX) ztprfb.$(SUFFIX) - - ifdef USEXBLAS --ZXLASRC = zgesvxx.o zgerfsx.o zla_gerfsx_extended.o zla_geamv.o \ -- zla_gercond_c.o zla_gercond_x.o zla_gerpvgrw.o zsysvxx.o zsyrfsx.o \ -- zla_syrfsx_extended.o zla_syamv.o zla_syrcond_c.o zla_syrcond_x.o \ -- zla_syrpvgrw.o zposvxx.o zporfsx.o zla_porfsx_extended.o \ -- zla_porcond_c.o zla_porcond_x.o zla_porpvgrw.o zgbsvxx.o zgbrfsx.o \ -- zla_gbrfsx_extended.o zla_gbamv.o zla_gbrcond_c.o zla_gbrcond_x.o \ -- zla_gbrpvgrw.o zhesvxx.o zherfsx.o zla_herfsx_extended.o \ -- zla_heamv.o zla_hercond_c.o zla_hercond_x.o zla_herpvgrw.o \ -- zla_lin_berr.o zlarscl2.o zlascl2.o zla_wwaddw.o -+ZXLASRC = zgesvxx.$(SUFFIX) zgerfsx.$(SUFFIX) zla_gerfsx_extended.$(SUFFIX) zla_geamv.$(SUFFIX) \ -+ zla_gercond_c.$(SUFFIX) zla_gercond_x.$(SUFFIX) zla_gerpvgrw.$(SUFFIX) zsysvxx.$(SUFFIX) zsyrfsx.$(SUFFIX) \ -+ zla_syrfsx_extended.$(SUFFIX) zla_syamv.$(SUFFIX) zla_syrcond_c.$(SUFFIX) zla_syrcond_x.$(SUFFIX) \ -+ zla_syrpvgrw.$(SUFFIX) zposvxx.$(SUFFIX) zporfsx.$(SUFFIX) zla_porfsx_extended.$(SUFFIX) \ -+ zla_porcond_c.$(SUFFIX) zla_porcond_x.$(SUFFIX) zla_porpvgrw.$(SUFFIX) zgbsvxx.$(SUFFIX) zgbrfsx.$(SUFFIX) \ -+ zla_gbrfsx_extended.$(SUFFIX) zla_gbamv.$(SUFFIX) zla_gbrcond_c.$(SUFFIX) zla_gbrcond_x.$(SUFFIX) \ -+ zla_gbrpvgrw.$(SUFFIX) zhesvxx.$(SUFFIX) zherfsx.$(SUFFIX) zla_herfsx_extended.$(SUFFIX) \ -+ zla_heamv.$(SUFFIX) zla_hercond_c.$(SUFFIX) zla_hercond_x.$(SUFFIX) zla_herpvgrw.$(SUFFIX) \ -+ zla_lin_berr.$(SUFFIX) zlarscl2.$(SUFFIX) zlascl2.$(SUFFIX) zla_wwaddw.$(SUFFIX) - endif - - ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \ - $(SCLAUX) $(DZLAUX) $(ALLAUX) - -+ALLOBJ_P = $(ALLOBJ:.$(SUFFIX)=.$(PSUFFIX)) -+ - ifdef USEXBLAS - ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) - endif - - all: ../$(LAPACKLIB) - -+lapack_prof: ../$(LAPACKLIB_P) -+ - ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) - $(RANLIB) $@ - -+../$(LAPACKLIB_P): $(ALLOBJ_P) -+ $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ_P) -+ $(RANLIB) $@ -+ - single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \ - $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX) -@@ -451,15 +459,24 @@ - @FRC=$(FRC) - - clean: -- rm -f *.o -+ rm -f *.$(SUFFIX) *.$(PSUFFIX) - --.f.o: -+%.$(SUFFIX): %.f - $(FORTRAN) $(OPTS) -c $< -o $@ - --slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ --zla_wwaddw.o: zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@ -+%.$(PSUFFIX): %.f -+ $(FORTRAN) $(POPTS) -c $< -o $@ - -+slaruv.$(SUFFIX): slaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dlaruv.$(SUFFIX): dlaruv.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(SUFFIX): sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(SUFFIX): dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(SUFFIX): cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(SUFFIX): zla_wwaddw.f ; $(FORTRAN) $(NOOPT) -O0 -c $< -o $@ -+ -+slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+sla_wwaddw.$(PSUFFIX): sla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+dla_wwaddw.$(PSUFFIX): dla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+cla_wwaddw.$(PSUFFIX): cla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -+zla_wwaddw.$(PSUFFIX): zla_wwaddw.f ; $(FORTRAN) $(PNOOPT) -O0 -c $< -o $@ -diff -ruN lapack-3.4.2.old/TESTING/EIG/Makefile lapack-3.4.2/TESTING/EIG/Makefile ---- lapack-3.4.2.old/TESTING/EIG/Makefile 2011-09-26 23:52:31 +0200 -+++ lapack-3.4.2/TESTING/EIG/Makefile 2012-04-22 21:41:45 +0200 -@@ -78,7 +78,7 @@ - cget35.o cget36.o cget37.o cget38.o cget51.o cget52.o \ - cget54.o cglmts.o cgqrts.o cgrqts.o cgsvts.o \ - chbt21.o chet21.o chet22.o chpt21.o chst01.o \ -- clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o csbmv.o \ -+ clarfy.o clarhs.o clatm4.o clctes.o clctsx.o clsets.o \ - csgt01.o cslect.o \ - cstt21.o cstt22.o cunt01.o cunt03.o - -@@ -115,7 +115,7 @@ - zget35.o zget36.o zget37.o zget38.o zget51.o zget52.o \ - zget54.o zglmts.o zgqrts.o zgrqts.o zgsvts.o \ - zhbt21.o zhet21.o zhet22.o zhpt21.o zhst01.o \ -- zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o zsbmv.o \ -+ zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o \ - zsgt01.o zslect.o \ - zstt21.o zstt22.o zunt01.o zunt03.o - -@@ -129,22 +129,22 @@ - ../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtsts \ - $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtsts $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtsts $@ - - ../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstc \ - $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstc $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstc $@ - - ../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstd \ - $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstd $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstd $@ - - ../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \ - $(LOADER) $(LOADOPTS) -o xeigtstz \ - $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ -- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstz $@ -+ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstz $@ - - $(AEIGTST): $(FRC) - $(SCIGTST): $(FRC) -diff -ruN lapack-3.4.2.old/TESTING/LIN/Makefile lapack-3.4.2/TESTING/LIN/Makefile ---- lapack-3.4.2.old/TESTING/LIN/Makefile 2012-04-02 21:06:36 +0200 -+++ lapack-3.4.2/TESTING/LIN/Makefile 2012-04-22 21:43:30 +0200 -@@ -109,7 +109,7 @@ - cqpt01.o cqrt01.o cqrt01p.o cqrt02.o cqrt03.o cqrt11.o \ - cqrt12.o cqrt13.o cqrt14.o cqrt15.o cqrt16.o \ - cqrt17.o crqt01.o crqt02.o crqt03.o crzt01.o crzt02.o \ -- csbmv.o cspt01.o \ -+ cspt01.o \ - cspt02.o cspt03.o csyt01.o csyt02.o csyt03.o \ - ctbt02.o ctbt03.o ctbt05.o ctbt06.o ctpt01.o \ - ctpt02.o ctpt03.o ctpt05.o ctpt06.o ctrt01.o \ -@@ -188,7 +188,7 @@ - zqpt01.o zqrt01.o zqrt01p.o zqrt02.o zqrt03.o zqrt11.o \ - zqrt12.o zqrt13.o zqrt14.o zqrt15.o zqrt16.o \ - zqrt17.o zrqt01.o zrqt02.o zrqt03.o zrzt01.o zrzt02.o \ -- zsbmv.o zspt01.o \ -+ zspt01.o \ - zspt02.o zspt03.o zsyt01.o zsyt02.o zsyt03.o \ - ztbt02.o ztbt03.o ztbt05.o ztbt06.o ztpt01.o \ - ztpt02.o ztpt03.o ztpt05.o ztpt06.o ztrt01.o \ -@@ -214,7 +214,7 @@ - zdrvab.o zdrvac.o zerrab.o zerrac.o zget08.o \ - alaerh.o alahd.o aladhd.o alareq.o \ - chkxer.o zget02.o zlarhs.o zlatb4.o \ -- zsbmv.o xerbla.o zpot06.o zlaipd.o -+ xerbla.o zpot06.o zlaipd.o - - SLINTSTRFP = schkrfp.o sdrvrfp.o sdrvrf1.o sdrvrf2.o sdrvrf3.o sdrvrf4.o serrrfp.o \ - slatb4.o slarhs.o sget04.o spot01.o spot03.o spot02.o \ -@@ -225,11 +225,11 @@ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - CLINTSTRFP = cchkrfp.o cdrvrfp.o cdrvrf1.o cdrvrf2.o cdrvrf3.o cdrvrf4.o cerrrfp.o \ -- claipd.o clatb4.o clarhs.o csbmv.o cget04.o cpot01.o cpot03.o cpot02.o \ -+ claipd.o clatb4.o clarhs.o cget04.o cpot01.o cpot03.o cpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - ZLINTSTRFP = zchkrfp.o zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp.o \ -- zlatb4.o zlaipd.o zlarhs.o zsbmv.o zget04.o zpot01.o zpot03.o zpot02.o \ -+ zlatb4.o zlaipd.o zlarhs.o zget04.o zpot01.o zpot03.o zpot02.o \ - chkxer.o xerbla.o alaerh.o aladhd.o alahd.o alasvm.o - - all: single double complex complex16 proto-single proto-double proto-complex proto-complex16 -@@ -246,43 +246,43 @@ - - xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $^ \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstds : $(DSLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DSLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstzc : $(ZCLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZCLINTST) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfs : $(SLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(SLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfd : $(DLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(DLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfc : $(CLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(CLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - xlintstrfz : $(ZLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ZLINTSTRFP) \ -- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ $(CEXTRALIB) - - ../xlintsts: xlintsts - mv xlintsts $@ -diff -ruN lapack-3.4.2.old/lapacke/src/Makefile lapack-3.4.2/lapacke/src/Makefile ---- lapack-3.4.2.old/lapacke/src/Makefile 2012-09-21 04:21:29 +0200 -+++ lapack-3.4.2/lapacke/src/Makefile 2012-10-15 22:04:56 +0200 -@@ -34,7 +34,7 @@ - # - include ../../make.inc - --SRC_OBJ = \ -+CSRC_OBJ = \ - lapacke_cbbcsd.o \ - lapacke_cbbcsd_work.o \ - lapacke_cbdsqr.o \ -@@ -526,7 +526,9 @@ - lapacke_cupgtr.o \ - lapacke_cupgtr_work.o \ - lapacke_cupmtr.o \ --lapacke_cupmtr_work.o \ -+lapacke_cupmtr_work.o -+ -+DSRC_OBJ = \ - lapacke_dbbcsd.o \ - lapacke_dbbcsd_work.o \ - lapacke_dbdsdc.o \ -@@ -1012,7 +1014,9 @@ - lapacke_dtrttp.o \ - lapacke_dtrttp_work.o \ - lapacke_dtzrzf.o \ --lapacke_dtzrzf_work.o \ -+lapacke_dtzrzf_work.o -+ -+SSRC_OBJ = \ - lapacke_sbbcsd.o \ - lapacke_sbbcsd_work.o \ - lapacke_sbdsdc.o \ -@@ -1492,7 +1496,9 @@ - lapacke_strttp.o \ - lapacke_strttp_work.o \ - lapacke_stzrzf.o \ --lapacke_stzrzf_work.o \ -+lapacke_stzrzf_work.o -+ -+ZSRC_OBJ = \ - lapacke_zbbcsd.o \ - lapacke_zbbcsd_work.o \ - lapacke_zbdsqr.o \ -@@ -2041,19 +2047,29 @@ - lapacke_zlagsy.o \ - lapacke_zlagsy_work.o - --ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ) -+COBJ_FILES := $(CSRC_OBJ) -+SOBJ_FILES := $(SSRC_OBJ) -+DOBJ_FILES := $(DSRC_OBJ) -+ZOBJ_FILES := $(ZSRC_OBJ) - --ifdef USEXBLAS --ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) -+ifdef LAPACKE_EXTENDED -+OBJ_FILES += $(SRCX_OBJ) - endif - -- --OBJ_FILES := $(C_FILES:.o=.o) -+ifdef LAPACKE_TESTING -+OBJ_FILES += $(MATGEN_OBJ) -+endif - - all: ../../$(LAPACKELIB) - --../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) -- $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) -+../../$(LAPACKELIB): $(COBJ_FILES) $(DOBJ_FILES) $(SOBJ_FILES) $(ZOBJ_FILES) $(OBJ_FILES) -+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(COBJ_FILES) -+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(DOBJ_FILES) -+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(SOBJ_FILES) -+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ZOBJ_FILES) -+ifneq ($(strip $(OBJ_FILES)),) -+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(OBJ_FILES) -+endif - $(RANLIB) ../../$(LAPACKELIB) - - .c.o: -diff -ruN lapack-3.4.2.old/lapacke/example/Makefile lapack-3.4.2/lapacke/example/Makefile ---- lapack-3.4.2.old/lapacke/example/Makefile 2012-03-23 06:55:22.000000000 +0800 -+++ lapack-3.4.2/lapacke/example/Makefile 2012-11-13 00:32:24.125449952 +0800 -@@ -4,12 +4,12 @@ - - xexample_DGESV_rowmajor: example_DGESV_rowmajor.o ../../$(LAPACKLIB) ../../$(LAPACKELIB) - $(LOADER) $(LOADOPTS) example_DGESV_rowmajor.o \ -- ../../$(LAPACKELIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(LAPACKELIB) $(CEXTRALIB) -o $@ - ./$@ - - xexample_ZGESV_rowmajor: example_ZGESV_rowmajor.o ../../$(LAPACKLIB) ../../$(LAPACKELIB) - $(LOADER) $(LOADOPTS) example_ZGESV_rowmajor.o \ -- ../../$(LAPACKELIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ -+ ../../$(LAPACKELIB) $(CEXTRALIB) -o $@ - ./$@ - - .c.o: From d4237cb7f3632d36ce9cdae008afa533f0b7d51d Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 11:23:17 +0200 Subject: [PATCH 76/98] marked larf.c as obsolete --- interface/lapack/larf.c | 109 ---------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 interface/lapack/larf.c diff --git a/interface/lapack/larf.c b/interface/lapack/larf.c deleted file mode 100644 index 3b538c4a2..000000000 --- a/interface/lapack/larf.c +++ /dev/null @@ -1,109 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -static int (*larf[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LARF_L, LARF_R, -}; - -int NAME(char *SIDE, blasint *M, blasint *N, FLOAT *v, blasint *incV, FLOAT *tau, FLOAT *c, blasint *ldC, FLOAT *work){ - - blas_arg_t args; - - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - char side_arg = *SIDE; - int side; - - PRINT_DEBUG_NAME; - - TOUPPER(side_arg); - - args.m = *M; - args.n = *N; - args.a = (void *)v; - args.lda = *incV; - args.c = (void *)c; - args.ldc = *ldC; - - args.alpha = (void *)tau; - - side = -1; - if (side_arg == 'L') side = 0; - if (side_arg == 'R') side = 1; - - if (args.m == 0 || args.n == 0) return 0; - -#ifndef COMPLEX - if (*tau == ZERO) return 0; -#else - if ((*(tau + 0) == ZERO) && (*(tau + 1) == ZERO)) return 0; -#endif - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - larf[side](&args, NULL, NULL, sa, sb, 0); - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); - - IDEBUG_END; - - return 0; -} From 9f201558c92e2d36f53f2d0f4c2f3aa63f42edcb Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 12:00:16 +0200 Subject: [PATCH 77/98] marked lauu2.c and lauum.c as bad --- interface/lapack/larf.c.obsolete | 109 ++++++++++++++++++++++ interface/lapack/{lauu2.c => lauu2.c.bad} | 0 interface/lapack/{lauum.c => lauum.c.bad} | 0 3 files changed, 109 insertions(+) create mode 100644 interface/lapack/larf.c.obsolete rename interface/lapack/{lauu2.c => lauu2.c.bad} (100%) rename interface/lapack/{lauum.c => lauum.c.bad} (100%) diff --git a/interface/lapack/larf.c.obsolete b/interface/lapack/larf.c.obsolete new file mode 100644 index 000000000..3b538c4a2 --- /dev/null +++ b/interface/lapack/larf.c.obsolete @@ -0,0 +1,109 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +static int (*larf[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LARF_L, LARF_R, +}; + +int NAME(char *SIDE, blasint *M, blasint *N, FLOAT *v, blasint *incV, FLOAT *tau, FLOAT *c, blasint *ldC, FLOAT *work){ + + blas_arg_t args; + + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + char side_arg = *SIDE; + int side; + + PRINT_DEBUG_NAME; + + TOUPPER(side_arg); + + args.m = *M; + args.n = *N; + args.a = (void *)v; + args.lda = *incV; + args.c = (void *)c; + args.ldc = *ldC; + + args.alpha = (void *)tau; + + side = -1; + if (side_arg == 'L') side = 0; + if (side_arg == 'R') side = 1; + + if (args.m == 0 || args.n == 0) return 0; + +#ifndef COMPLEX + if (*tau == ZERO) return 0; +#else + if ((*(tau + 0) == ZERO) && (*(tau + 1) == ZERO)) return 0; +#endif + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + larf[side](&args, NULL, NULL, sa, sb, 0); + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/lauu2.c b/interface/lapack/lauu2.c.bad similarity index 100% rename from interface/lapack/lauu2.c rename to interface/lapack/lauu2.c.bad diff --git a/interface/lapack/lauum.c b/interface/lapack/lauum.c.bad similarity index 100% rename from interface/lapack/lauum.c rename to interface/lapack/lauum.c.bad From 45be9ac111bde752b432f54c5926a4b575d9b5b8 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 12:29:29 +0200 Subject: [PATCH 78/98] moved trtri.c and ztrtri.c to the directory lapack --- interface/{ => lapack}/trtri.c | 0 interface/{ => lapack}/ztrtri.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename interface/{ => lapack}/trtri.c (100%) rename interface/{ => lapack}/ztrtri.c (100%) diff --git a/interface/trtri.c b/interface/lapack/trtri.c similarity index 100% rename from interface/trtri.c rename to interface/lapack/trtri.c diff --git a/interface/ztrtri.c b/interface/lapack/ztrtri.c similarity index 100% rename from interface/ztrtri.c rename to interface/lapack/ztrtri.c From 9a9e8102398c2db657fa01fc7cea3a8fa408f0e8 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 12:42:52 +0200 Subject: [PATCH 79/98] marked trtri.c and ztrtri as bad --- interface/lapack/{trtri.c => trtri.c.bad} | 0 interface/lapack/{ztrtri.c => ztrtri.c.bad} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename interface/lapack/{trtri.c => trtri.c.bad} (100%) rename interface/lapack/{ztrtri.c => ztrtri.c.bad} (100%) diff --git a/interface/lapack/trtri.c b/interface/lapack/trtri.c.bad similarity index 100% rename from interface/lapack/trtri.c rename to interface/lapack/trtri.c.bad diff --git a/interface/lapack/ztrtri.c b/interface/lapack/ztrtri.c.bad similarity index 100% rename from interface/lapack/ztrtri.c rename to interface/lapack/ztrtri.c.bad From 5e550349223c5a1b38169d14f130b26984669f50 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 12:53:22 +0200 Subject: [PATCH 80/98] marked zlauu2.c and zlauum.c as bad --- interface/lapack/zlauu2.c.bad | 129 +++++++++++++++++++++++++++++++ interface/lapack/zlauum.c.bad | 141 ++++++++++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) create mode 100644 interface/lapack/zlauu2.c.bad create mode 100644 interface/lapack/zlauum.c.bad diff --git a/interface/lapack/zlauu2.c.bad b/interface/lapack/zlauu2.c.bad new file mode 100644 index 000000000..05603fe1b --- /dev/null +++ b/interface/lapack/zlauu2.c.bad @@ -0,0 +1,129 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "QLAUU2" +#elif defined(DOUBLE) +#define ERROR_NAME "ZLAUU2" +#else +#define ERROR_NAME "CLAUU2" +#endif + +static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + +#ifdef XDOUBLE + xlauu2_U, xlauu2_L, +#elif defined(DOUBLE) + zlauu2_U, zlauu2_L, +#else + clauu2_U, clauu2_L, +#endif + }; + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n <= 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + + info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); + + *Info = info; + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + 6. * 1./6. * args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} diff --git a/interface/lapack/zlauum.c.bad b/interface/lapack/zlauum.c.bad new file mode 100644 index 000000000..23990e8e4 --- /dev/null +++ b/interface/lapack/zlauum.c.bad @@ -0,0 +1,141 @@ +/*********************************************************************/ +/* Copyright 2009, 2010 The University of Texas at Austin. */ +/* All rights reserved. */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* 1. Redistributions of source code must retain the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer. */ +/* */ +/* 2. Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ +/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ +/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ +/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ +/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ +/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ +/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ +/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ +/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ +/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ +/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ +/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ +/* POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* The views and conclusions contained in the software and */ +/* documentation are those of the authors and should not be */ +/* interpreted as representing official policies, either expressed */ +/* or implied, of The University of Texas at Austin. */ +/*********************************************************************/ + +#include +#include "common.h" +#ifdef FUNCTION_PROFILE +#include "functable.h" +#endif + +#ifdef XDOUBLE +#define ERROR_NAME "XLAUUM" +#elif defined(DOUBLE) +#define ERROR_NAME "ZLAUUM" +#else +#define ERROR_NAME "CLAUUM" +#endif + +static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_SINGLE, LAUUM_L_SINGLE, +}; + +#ifdef SMP +static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { + LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, +}; +#endif + +int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ + + blas_arg_t args; + + blasint uplo_arg = *UPLO; + blasint uplo; + blasint info; + FLOAT *buffer; +#ifdef PPC440 + extern +#endif + FLOAT *sa, *sb; + + PRINT_DEBUG_NAME; + + args.n = *N; + args.a = (void *)a; + args.lda = *ldA; + + TOUPPER(uplo_arg); + + uplo = -1; + if (uplo_arg == 'U') uplo = 0; + if (uplo_arg == 'L') uplo = 1; + + info = 0; + if (args.lda < MAX(1,args.n)) info = 4; + if (args.n < 0) info = 2; + if (uplo < 0) info = 1; + if (info) { + BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); + *Info = - info; + return 0; + } + + *Info = 0; + + if (args.n == 0) return 0; + + IDEBUG_START; + + FUNCTION_PROFILE_START(); + +#ifndef PPC440 + buffer = (FLOAT *)blas_memory_alloc(1); + + sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); + sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); +#endif + +#ifdef SMP + args.common = NULL; + args.nthreads = num_cpu_avail(4); + + if (args.nthreads == 1) { +#endif + + *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); + +#ifdef SMP + } else { + + *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); + + } +#endif + +#ifndef PPC440 + blas_memory_free(buffer); +#endif + + FUNCTION_PROFILE_END(1, .5 * args.n * args.n, + 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (args.n * args.n - 1)); + + IDEBUG_END; + + return 0; +} From 2ff66e661d2a2c2cb37df4c7cd316803e6be4c6c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 13:35:32 +0200 Subject: [PATCH 81/98] enabled and tested optimized laswp lapack function --- interface/Makefile | 16 ++--- interface/lapack/zlauu2.c | 129 --------------------------------- interface/lapack/zlauum.c | 141 ------------------------------------- lapack-netlib/SRC/Makefile | 8 +-- 4 files changed, 12 insertions(+), 282 deletions(-) delete mode 100644 interface/lapack/zlauu2.c delete mode 100644 interface/lapack/zlauum.c diff --git a/interface/Makefile b/interface/Makefile index 42e9f50b5..8b87127ef 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -349,7 +349,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ - spotf2.$(SUFFIX) + spotf2.$(SUFFIX) slaswp.$(SUFFIX) #DLAPACKOBJS = \ @@ -359,7 +359,7 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ - dpotf2.$(SUFFIX) + dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) QLAPACKOBJS = \ @@ -374,7 +374,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ - cpotf2.$(SUFFIX) + cpotf2.$(SUFFIX) claswp.$(SUFFIX) #ZLAPACKOBJS = \ @@ -384,7 +384,7 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ - zpotf2.$(SUFFIX) + zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) @@ -1896,19 +1896,19 @@ ztrtri.$(SUFFIX) ztrtri.$(PSUFFIX) : ztrtri.c xtrtri.$(SUFFIX) xtrtri.$(PSUFFIX) : ztrtri.c $(CC) -c $(CFLAGS) $< -o $(@F) -slaswp.$(SUFFIX) slaswp.$(PSUFFIX) : laswp.c +slaswp.$(SUFFIX) slaswp.$(PSUFFIX) : lapack/laswp.c $(CC) -c $(CFLAGS) $< -o $(@F) -dlaswp.$(SUFFIX) dlaswp.$(PSUFFIX) : laswp.c +dlaswp.$(SUFFIX) dlaswp.$(PSUFFIX) : lapack/laswp.c $(CC) -c $(CFLAGS) $< -o $(@F) qlaswp.$(SUFFIX) qlaswp.$(PSUFFIX) : laswp.c $(CC) -c $(CFLAGS) $< -o $(@F) -claswp.$(SUFFIX) claswp.$(PSUFFIX) : zlaswp.c +claswp.$(SUFFIX) claswp.$(PSUFFIX) : lapack/zlaswp.c $(CC) -c $(CFLAGS) $< -o $(@F) -zlaswp.$(SUFFIX) zlaswp.$(PSUFFIX) : zlaswp.c +zlaswp.$(SUFFIX) zlaswp.$(PSUFFIX) : lapack/zlaswp.c $(CC) -c $(CFLAGS) $< -o $(@F) xlaswp.$(SUFFIX) xlaswp.$(PSUFFIX) : zlaswp.c diff --git a/interface/lapack/zlauu2.c b/interface/lapack/zlauu2.c deleted file mode 100644 index 05603fe1b..000000000 --- a/interface/lapack/zlauu2.c +++ /dev/null @@ -1,129 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "QLAUU2" -#elif defined(DOUBLE) -#define ERROR_NAME "ZLAUU2" -#else -#define ERROR_NAME "CLAUU2" -#endif - -static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - -#ifdef XDOUBLE - xlauu2_U, xlauu2_L, -#elif defined(DOUBLE) - zlauu2_U, zlauu2_L, -#else - clauu2_U, clauu2_L, -#endif - }; - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n <= 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - - info = (lauu2[uplo])(&args, NULL, NULL, sa, sb, 0); - - *Info = info; - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + 6. * 1./6. * args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/interface/lapack/zlauum.c b/interface/lapack/zlauum.c deleted file mode 100644 index 23990e8e4..000000000 --- a/interface/lapack/zlauum.c +++ /dev/null @@ -1,141 +0,0 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ - -#include -#include "common.h" -#ifdef FUNCTION_PROFILE -#include "functable.h" -#endif - -#ifdef XDOUBLE -#define ERROR_NAME "XLAUUM" -#elif defined(DOUBLE) -#define ERROR_NAME "ZLAUUM" -#else -#define ERROR_NAME "CLAUUM" -#endif - -static blasint (*lauum_single[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_SINGLE, LAUUM_L_SINGLE, -}; - -#ifdef SMP -static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *, BLASLONG) = { - LAUUM_U_PARALLEL, LAUUM_L_PARALLEL, -}; -#endif - -int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ - - blas_arg_t args; - - blasint uplo_arg = *UPLO; - blasint uplo; - blasint info; - FLOAT *buffer; -#ifdef PPC440 - extern -#endif - FLOAT *sa, *sb; - - PRINT_DEBUG_NAME; - - args.n = *N; - args.a = (void *)a; - args.lda = *ldA; - - TOUPPER(uplo_arg); - - uplo = -1; - if (uplo_arg == 'U') uplo = 0; - if (uplo_arg == 'L') uplo = 1; - - info = 0; - if (args.lda < MAX(1,args.n)) info = 4; - if (args.n < 0) info = 2; - if (uplo < 0) info = 1; - if (info) { - BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME)); - *Info = - info; - return 0; - } - - *Info = 0; - - if (args.n == 0) return 0; - - IDEBUG_START; - - FUNCTION_PROFILE_START(); - -#ifndef PPC440 - buffer = (FLOAT *)blas_memory_alloc(1); - - sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A); - sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B); -#endif - -#ifdef SMP - args.common = NULL; - args.nthreads = num_cpu_avail(4); - - if (args.nthreads == 1) { -#endif - - *Info = (lauum_single[uplo])(&args, NULL, NULL, sa, sb, 0); - -#ifdef SMP - } else { - - *Info = (lauum_parallel[uplo])(&args, NULL, NULL, sa, sb, 0); - - } -#endif - -#ifndef PPC440 - blas_memory_free(buffer); -#endif - - FUNCTION_PROFILE_END(1, .5 * args.n * args.n, - 2. * args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) - + args.n * (args.n * args.n - 1)); - - IDEBUG_END; - - return 0; -} diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 40bb5625c..bacb13928 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -118,7 +118,7 @@ SLASRC = \ slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \ slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \ slarrv.o slartv.o \ - slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o slasyf_rook.o \ + slarz.o slarzb.o slarzt.o slasy2.o slasyf.o slasyf_rook.o \ slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ @@ -207,7 +207,7 @@ CLASRC = \ clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \ clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ - claswp.o clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ + clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ @@ -278,7 +278,7 @@ DLASRC = \ dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \ dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ dlargv.o dlarrv.o dlartv.o \ - dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o dlasyf_rook.o \ + dlarz.o dlarzb.o dlarzt.o dlasy2.o dlasyf.o dlasyf_rook.o \ dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ @@ -368,7 +368,7 @@ ZLASRC = \ zlarfg.o zlarft.o zlarfgp.o \ zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ - zlassq.o zlaswp.o zlasyf.o zlasyf_rook.o \ + zlassq.o zlasyf.o zlasyf_rook.o \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ From abad6f66d608d0fefab7db7f81cdb9dc6091a979 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 13:50:02 +0200 Subject: [PATCH 82/98] marked trti2.c and ztrti2.c as bad --- interface/{trti2.c => lapack/trti2.c.bad} | 0 interface/{ztrti2.c => lapack/ztrti2.c.bad} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename interface/{trti2.c => lapack/trti2.c.bad} (100%) rename interface/{ztrti2.c => lapack/ztrti2.c.bad} (100%) diff --git a/interface/trti2.c b/interface/lapack/trti2.c.bad similarity index 100% rename from interface/trti2.c rename to interface/lapack/trti2.c.bad diff --git a/interface/ztrti2.c b/interface/lapack/ztrti2.c.bad similarity index 100% rename from interface/ztrti2.c rename to interface/lapack/ztrti2.c.bad From 0d75f3b6a21ac3e5e2cb52f36308c3093bce7a04 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 14:44:53 +0200 Subject: [PATCH 83/98] enabled and tested optimized gesv lapack functions --- interface/Makefile | 16 ++++++++-------- lapack-netlib/SRC/Makefile | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 8b87127ef..16d59a6e6 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -349,7 +349,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ - spotf2.$(SUFFIX) slaswp.$(SUFFIX) + spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) #DLAPACKOBJS = \ @@ -359,7 +359,7 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ - dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) + dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) QLAPACKOBJS = \ @@ -374,7 +374,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ - cpotf2.$(SUFFIX) claswp.$(SUFFIX) + cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) #ZLAPACKOBJS = \ @@ -384,7 +384,7 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ - zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) + zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) @@ -1932,19 +1932,19 @@ zgetrs.$(SUFFIX) zgetrs.$(PSUFFIX) : lapack/zgetrs.c xgetrs.$(SUFFIX) xgetrs.$(PSUFFIX) : zgetrs.c $(CC) -c $(CFLAGS) $< -o $(@F) -sgesv.$(SUFFIX) sgesv.$(PSUFFIX) : gesv.c +sgesv.$(SUFFIX) sgesv.$(PSUFFIX) : lapack/gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) -dgesv.$(SUFFIX) dgesv.$(PSUFFIX) : gesv.c +dgesv.$(SUFFIX) dgesv.$(PSUFFIX) : lapack/gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) qgesv.$(SUFFIX) qgesv.$(PSUFFIX) : gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) -cgesv.$(SUFFIX) cgesv.$(PSUFFIX) : gesv.c +cgesv.$(SUFFIX) cgesv.$(PSUFFIX) : lapack/gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) -zgesv.$(SUFFIX) zgesv.$(PSUFFIX) : gesv.c +zgesv.$(SUFFIX) zgesv.$(PSUFFIX) : lapack/gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) xgesv.$(SUFFIX) xgesv.$(PSUFFIX) : gesv.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index bacb13928..d8cef80ba 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -101,7 +101,7 @@ SLASRC = \ sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \ sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \ sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \ - sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \ + sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesvd.o sgesvx.o \ sgetc2.o sgetri.o \ sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \ sggglm.o sgghrd.o sgglse.o sggqrf.o \ @@ -176,7 +176,7 @@ CLASRC = \ cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \ cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \ cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \ - cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \ + cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesvd.o \ cgesvx.o cgetc2.o cgetri.o \ cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \ cgghrd.o cgglse.o cggqrf.o cggrqf.o \ @@ -261,7 +261,7 @@ DLASRC = \ dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \ dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \ - dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \ + dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesvd.o dgesvx.o \ dgetc2.o dgetri.o \ dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \ dggglm.o dgghrd.o dgglse.o dggqrf.o \ @@ -335,7 +335,7 @@ ZLASRC = \ zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \ - zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o \ + zgesc2.o zgesdd.o zgesvd.o zgesvx.o zgetc2.o \ zgetri.o \ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \ zgghrd.o zgglse.o zggqrf.o zggrqf.o \ From a0ae53966f7c0214c572d7f329022abc58b7141c Mon Sep 17 00:00:00 2001 From: wernsaar Date: Mon, 19 May 2014 15:57:18 +0200 Subject: [PATCH 84/98] removed debug flag from Makefile.rule --- Makefile.rule | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.rule b/Makefile.rule index 9c2847a5c..6b604b781 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -127,7 +127,7 @@ NO_AFFINITY = 1 # Common Optimization Flag; # The default -O2 is enough. -COMMON_OPT = -O0 +# COMMON_OPT = -O2 # gfortran option for LAPACK FCOMMON_OPT = -frecursive @@ -136,7 +136,7 @@ FCOMMON_OPT = -frecursive COMMON_PROF = -pg # Build Debug version -DEBUG = 1 +# DEBUG = 1 # # End of user configuration From dbaeea7b59dc9c2f12efd952821a4d2f2550a10b Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 21 May 2014 09:49:18 +0200 Subject: [PATCH 85/98] enabled lauu2 and lauum lapack functions again --- interface/Makefile | 22 +++++++++++---------- interface/lapack/{lauu2.c.bad => lauu2.c} | 0 interface/lapack/{lauum.c.bad => lauum.c} | 0 interface/lapack/{zlauu2.c.bad => zlauu2.c} | 0 lapack-netlib/SRC/Makefile | 10 +++++----- lapack/Makefile | 2 +- 6 files changed, 18 insertions(+), 16 deletions(-) rename interface/lapack/{lauu2.c.bad => lauu2.c} (100%) rename interface/lapack/{lauum.c.bad => lauum.c} (100%) rename interface/lapack/{zlauu2.c.bad => zlauu2.c} (100%) diff --git a/interface/Makefile b/interface/Makefile index 16d59a6e6..69ee292d0 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -349,7 +349,8 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ - spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) + spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) slauu2.$(SUFFIX) \ + slauum.$(SUFFIX) #DLAPACKOBJS = \ @@ -359,7 +360,8 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ - dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) + dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) dlauu2.$(SUFFIX) \ + dlauum.$(SUFFIX) QLAPACKOBJS = \ @@ -374,7 +376,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ - cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) + cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) #ZLAPACKOBJS = \ @@ -384,7 +386,7 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ - zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) + zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) @@ -1788,28 +1790,28 @@ zgetrf.$(SUFFIX) zgetrf.$(PSUFFIX) : lapack/zgetrf.c xgetrf.$(SUFFIX) xgetrf.$(PSUFFIX) : zgetrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -slauu2.$(SUFFIX) slauu2.$(PSUFFIX) : lauu2.c +slauu2.$(SUFFIX) slauu2.$(PSUFFIX) : lapack/lauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) -dlauu2.$(SUFFIX) dlauu2.$(PSUFFIX) : lauu2.c +dlauu2.$(SUFFIX) dlauu2.$(PSUFFIX) : lapack/lauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) qlauu2.$(SUFFIX) qlauu2.$(PSUFFIX) : lauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) -clauu2.$(SUFFIX) clauu2.$(PSUFFIX) : zlauu2.c +clauu2.$(SUFFIX) clauu2.$(PSUFFIX) : lapack/zlauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) -zlauu2.$(SUFFIX) zlauu2.$(PSUFFIX) : zlauu2.c +zlauu2.$(SUFFIX) zlauu2.$(PSUFFIX) : lapack/zlauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) xlauu2.$(SUFFIX) xlauu2.$(PSUFFIX) : zlauu2.c $(CC) -c $(CFLAGS) $< -o $(@F) -slauum.$(SUFFIX) slauum.$(PSUFFIX) : lauum.c +slauum.$(SUFFIX) slauum.$(PSUFFIX) : lapack/lauum.c $(CC) -c $(CFLAGS) $< -o $(@F) -dlauum.$(SUFFIX) dlauum.$(PSUFFIX) : lauum.c +dlauum.$(SUFFIX) dlauum.$(PSUFFIX) : lapack/lauum.c $(CC) -c $(CFLAGS) $< -o $(@F) qlauum.$(SUFFIX) qlauum.$(PSUFFIX) : lauum.c diff --git a/interface/lapack/lauu2.c.bad b/interface/lapack/lauu2.c similarity index 100% rename from interface/lapack/lauu2.c.bad rename to interface/lapack/lauu2.c diff --git a/interface/lapack/lauum.c.bad b/interface/lapack/lauum.c similarity index 100% rename from interface/lapack/lauum.c.bad rename to interface/lapack/lauum.c diff --git a/interface/lapack/zlauu2.c.bad b/interface/lapack/zlauu2.c similarity index 100% rename from interface/lapack/zlauu2.c.bad rename to interface/lapack/zlauu2.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index d8cef80ba..fdf6f3a84 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -120,7 +120,7 @@ SLASRC = \ slarrv.o slartv.o \ slarz.o slarzb.o slarzt.o slasy2.o slasyf.o slasyf_rook.o \ slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \ - slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ + sopgtr.o sopmtr.o sorg2l.o sorg2r.o \ sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \ sorgrq.o sorgtr.o sorm2l.o sorm2r.o \ sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \ @@ -208,7 +208,7 @@ CLASRC = \ clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ - clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ + clatzm.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ @@ -279,8 +279,8 @@ DLASRC = \ dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \ dlargv.o dlarrv.o dlartv.o \ dlarz.o dlarzb.o dlarzt.o dlasy2.o dlasyf.o dlasyf_rook.o \ - dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \ - dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ + dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o \ + dopgtr.o dopmtr.o dorg2l.o dorg2r.o \ dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \ dorgrq.o dorgtr.o dorm2l.o dorm2r.o \ dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \ @@ -369,7 +369,7 @@ ZLASRC = \ zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \ zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ zlassq.o zlasyf.o zlasyf_rook.o \ - zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \ + zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o \ zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ zposv.o zposvx.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ diff --git a/lapack/Makefile b/lapack/Makefile index f99416fa6..4db8ecac6 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = getrf getf2 laswp getrs potrf potf2 +SUBDIRS = getrf getf2 laswp getrs potrf potf2 lauu2 lauum FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 From a5ab231ad4c09636edd004e76b612d17ad9c365e Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 21 May 2014 10:35:28 +0200 Subject: [PATCH 86/98] enabled optimized complex lauum lapack functions again --- interface/Makefile | 10 ++++++---- interface/lapack/{zlauum.c.bad => zlauum.c} | 0 lapack-netlib/SRC/Makefile | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) rename interface/lapack/{zlauum.c.bad => zlauum.c} (100%) diff --git a/interface/Makefile b/interface/Makefile index 69ee292d0..96629db15 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -376,7 +376,8 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ - cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) + cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) \ + clauum.$(SUFFIX) #ZLAPACKOBJS = \ @@ -386,7 +387,8 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ - zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) + zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) \ + zlauum.$(SUFFIX) @@ -1817,10 +1819,10 @@ dlauum.$(SUFFIX) dlauum.$(PSUFFIX) : lapack/lauum.c qlauum.$(SUFFIX) qlauum.$(PSUFFIX) : lauum.c $(CC) -c $(CFLAGS) $< -o $(@F) -clauum.$(SUFFIX) clauum.$(PSUFFIX) : zlauum.c +clauum.$(SUFFIX) clauum.$(PSUFFIX) : lapack/zlauum.c $(CC) -c $(CFLAGS) $< -o $(@F) -zlauum.$(SUFFIX) zlauum.$(PSUFFIX) : zlauum.c +zlauum.$(SUFFIX) zlauum.$(PSUFFIX) : lapack/zlauum.c $(CC) -c $(CFLAGS) $< -o $(@F) xlauum.$(SUFFIX) xlauum.$(PSUFFIX) : zlauum.c diff --git a/interface/lapack/zlauum.c.bad b/interface/lapack/zlauum.c similarity index 100% rename from interface/lapack/zlauum.c.bad rename to interface/lapack/zlauum.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index fdf6f3a84..db3b0ef3a 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -208,7 +208,7 @@ CLASRC = \ clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \ clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \ clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ - clatzm.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ + clatzm.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ @@ -370,7 +370,7 @@ ZLASRC = \ zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \ zlassq.o zlasyf.o zlasyf_rook.o \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o \ - zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ + zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ zposv.o zposvx.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ From a748d3a75dd9d2960d84486afaa614fb0bf82bec Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 21 May 2014 11:02:07 +0200 Subject: [PATCH 87/98] enabled optimized trti2 lapack functions again --- interface/Makefile | 17 +++++++++-------- interface/lapack/{trti2.c.bad => trti2.c} | 0 interface/lapack/{ztrti2.c.bad => ztrti2.c} | 0 lapack-netlib/SRC/Makefile | 8 ++++---- lapack/Makefile | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) rename interface/lapack/{trti2.c.bad => trti2.c} (100%) rename interface/lapack/{ztrti2.c.bad => ztrti2.c} (100%) diff --git a/interface/Makefile b/interface/Makefile index 96629db15..fcff93ec9 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -350,7 +350,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) slauu2.$(SUFFIX) \ - slauum.$(SUFFIX) + slauum.$(SUFFIX) strti2.$(SUFFIX) #DLAPACKOBJS = \ @@ -361,7 +361,7 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) dlauu2.$(SUFFIX) \ - dlauum.$(SUFFIX) + dlauum.$(SUFFIX) dtrti2.$(SUFFIX) QLAPACKOBJS = \ @@ -377,7 +377,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) \ - clauum.$(SUFFIX) + clauum.$(SUFFIX) ctrti2.$(SUFFIX) #ZLAPACKOBJS = \ @@ -388,7 +388,8 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) \ - zlauum.$(SUFFIX) + zlauum.$(SUFFIX) ztrti2.$(SUFFIX) + @@ -1864,19 +1865,19 @@ zpotrf.$(SUFFIX) zpotrf.$(PSUFFIX) : lapack/zpotrf.c xpotrf.$(SUFFIX) xpotrf.$(PSUFFIX) : zpotrf.c $(CC) -c $(CFLAGS) $< -o $(@F) -strti2.$(SUFFIX) strti2.$(PSUFFIX) : trti2.c +strti2.$(SUFFIX) strti2.$(PSUFFIX) : lapack/trti2.c $(CC) -c $(CFLAGS) $< -o $(@F) -dtrti2.$(SUFFIX) dtrti2.$(PSUFFIX) : trti2.c +dtrti2.$(SUFFIX) dtrti2.$(PSUFFIX) : lapack/trti2.c $(CC) -c $(CFLAGS) $< -o $(@F) qtrti2.$(SUFFIX) qtrti2.$(PSUFFIX) : trti2.c $(CC) -c $(CFLAGS) $< -o $(@F) -ctrti2.$(SUFFIX) ctrti2.$(PSUFFIX) : ztrti2.c +ctrti2.$(SUFFIX) ctrti2.$(PSUFFIX) : lapack/ztrti2.c $(CC) -c $(CFLAGS) $< -o $(@F) -ztrti2.$(SUFFIX) ztrti2.$(PSUFFIX) : ztrti2.c +ztrti2.$(SUFFIX) ztrti2.$(PSUFFIX) : lapack/ztrti2.c $(CC) -c $(CFLAGS) $< -o $(@F) xtrti2.$(SUFFIX) xtrti2.$(PSUFFIX) : ztrti2.c diff --git a/interface/lapack/trti2.c.bad b/interface/lapack/trti2.c similarity index 100% rename from interface/lapack/trti2.c.bad rename to interface/lapack/trti2.c diff --git a/interface/lapack/ztrti2.c.bad b/interface/lapack/ztrti2.c similarity index 100% rename from interface/lapack/ztrti2.c.bad rename to interface/lapack/ztrti2.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index db3b0ef3a..8a622c837 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -147,7 +147,7 @@ SLASRC = \ stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ stptrs.o \ strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ - strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ + strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ @@ -225,7 +225,7 @@ CLASRC = \ ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ ctprfs.o ctptri.o \ ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ - ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ + ctrsyl.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ @@ -307,7 +307,7 @@ DLASRC = \ dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ dtptrs.o \ dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ - dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ + dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ @@ -387,7 +387,7 @@ ZLASRC = \ ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ ztprfs.o ztptri.o \ ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ - ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ + ztrsyl.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ diff --git a/lapack/Makefile b/lapack/Makefile index 4db8ecac6..870962bc9 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = getrf getf2 laswp getrs potrf potf2 lauu2 lauum +SUBDIRS = getrf getf2 laswp getrs potrf potf2 lauu2 lauum trti2 FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 From c4ccb3fbb23cabe92acb8ff9832681db6139840d Mon Sep 17 00:00:00 2001 From: wernsaar Date: Wed, 21 May 2014 14:21:19 +0200 Subject: [PATCH 88/98] removed lapack/getri because it was never used --- lapack/getri/cgetri.f | 194 ------------------------------------------ lapack/getri/dgetri.f | 193 ----------------------------------------- lapack/getri/sgetri.f | 193 ----------------------------------------- lapack/getri/zgetri.f | 194 ------------------------------------------ 4 files changed, 774 deletions(-) delete mode 100644 lapack/getri/cgetri.f delete mode 100644 lapack/getri/dgetri.f delete mode 100644 lapack/getri/sgetri.f delete mode 100644 lapack/getri/zgetri.f diff --git a/lapack/getri/cgetri.f b/lapack/getri/cgetri.f deleted file mode 100644 index 6840f531c..000000000 --- a/lapack/getri/cgetri.f +++ /dev/null @@ -1,194 +0,0 @@ - SUBROUTINE CGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - COMPLEX A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* CGETRI computes the inverse of a matrix using the LU factorization -* computed by CGETRF. -* -* This method inverts U and then computes inv(A) by solving the system -* inv(A)*L = inv(U) for inv(A). -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) COMPLEX array, dimension (LDA,N) -* On entry, the factors L and U from the factorization -* A = P*L*U as computed by CGETRF. -* On exit, if INFO = 0, the inverse of the original matrix A. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* The pivot indices from CGETRF; for 1<=i<=N, row i of the -* matrix was interchanged with row IPIV(i). -* -* WORK (workspace/output) COMPLEX array, dimension (LWORK) -* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimal performance LWORK >= N*NB, where NB is -* the optimal blocksize returned by ILAENV. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is -* singular and its inverse could not be computed. -* -* ===================================================================== -* -* .. Parameters .. - COMPLEX ZERO, ONE - PARAMETER ( ZERO = ( 0.0E+0, 0.0E+0 ), - $ ONE = ( 1.0E+0, 0.0E+0 ) ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, - $ NBMIN, NN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. External Subroutines .. - EXTERNAL CGEMM, CGEMV, CSWAP, CTRSM, CTRTRI, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - NB = ILAENV( 1, 'CGETRI', ' ', N, -1, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -3 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -6 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'CGETRI', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Form inv(U). If INFO > 0 from CTRTRI, then U is singular, -* and the inverse is not computed. -* - CALL CTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) - IF( INFO.GT.0 ) - $ RETURN -* - NBMIN = 2 - LDWORK = N - IF( NB.GT.1 .AND. NB.LT.N ) THEN - IWS = MAX( LDWORK*NB, 1 ) - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'CGETRI', ' ', N, -1, -1, -1 ) ) - END IF - ELSE - IWS = N - END IF -* -* Solve the equation inv(A)*L = inv(U) for inv(A). -* - IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN -* -* Use unblocked code. -* - DO 20 J = N, 1, -1 -* -* Copy current column of L to WORK and replace with zeros. -* - DO 10 I = J + 1, N - WORK( I ) = A( I, J ) - A( I, J ) = ZERO - 10 CONTINUE -* -* Compute current column of inv(A). -* - IF( J.LT.N ) - $ CALL CGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), - $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) - 20 CONTINUE - ELSE -* -* Use blocked code. -* - NN = ( ( N-1 ) / NB )*NB + 1 - DO 50 J = NN, 1, -NB - JB = MIN( NB, N-J+1 ) -* -* Copy current block column of L to WORK and replace with -* zeros. -* - DO 40 JJ = J, J + JB - 1 - DO 30 I = JJ + 1, N - WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) - A( I, JJ ) = ZERO - 30 CONTINUE - 40 CONTINUE -* -* Compute current block column of inv(A). -* - IF( J+JB.LE.N ) - $ CALL CGEMM( 'No transpose', 'No transpose', N, JB, - $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, - $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) - CALL CTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, - $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) - 50 CONTINUE - END IF -* -* Apply column interchanges. -* - DO 60 J = N - 1, 1, -1 - JP = IPIV( J ) - IF( JP.NE.J ) - $ CALL CSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) - 60 CONTINUE -* - WORK( 1 ) = IWS - RETURN -* -* End of CGETRI -* - END diff --git a/lapack/getri/dgetri.f b/lapack/getri/dgetri.f deleted file mode 100644 index c67a34803..000000000 --- a/lapack/getri/dgetri.f +++ /dev/null @@ -1,193 +0,0 @@ - SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGETRI computes the inverse of a matrix using the LU factorization -* computed by DGETRF. -* -* This method inverts U and then computes inv(A) by solving the system -* inv(A)*L = inv(U) for inv(A). -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the factors L and U from the factorization -* A = P*L*U as computed by DGETRF. -* On exit, if INFO = 0, the inverse of the original matrix A. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* The pivot indices from DGETRF; for 1<=i<=N, row i of the -* matrix was interchanged with row IPIV(i). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimal performance LWORK >= N*NB, where NB is -* the optimal blocksize returned by ILAENV. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is -* singular and its inverse could not be computed. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, - $ NBMIN, NN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DGEMM, DGEMV, DSWAP, DTRSM, DTRTRI, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - NB = ILAENV( 1, 'DGETRI', ' ', N, -1, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -3 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -6 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGETRI', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Form inv(U). If INFO > 0 from DTRTRI, then U is singular, -* and the inverse is not computed. -* - CALL DTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) - IF( INFO.GT.0 ) - $ RETURN -* - NBMIN = 2 - LDWORK = N - IF( NB.GT.1 .AND. NB.LT.N ) THEN - IWS = MAX( LDWORK*NB, 1 ) - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DGETRI', ' ', N, -1, -1, -1 ) ) - END IF - ELSE - IWS = N - END IF -* -* Solve the equation inv(A)*L = inv(U) for inv(A). -* - IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN -* -* Use unblocked code. -* - DO 20 J = N, 1, -1 -* -* Copy current column of L to WORK and replace with zeros. -* - DO 10 I = J + 1, N - WORK( I ) = A( I, J ) - A( I, J ) = ZERO - 10 CONTINUE -* -* Compute current column of inv(A). -* - IF( J.LT.N ) - $ CALL DGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), - $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) - 20 CONTINUE - ELSE -* -* Use blocked code. -* - NN = ( ( N-1 ) / NB )*NB + 1 - DO 50 J = NN, 1, -NB - JB = MIN( NB, N-J+1 ) -* -* Copy current block column of L to WORK and replace with -* zeros. -* - DO 40 JJ = J, J + JB - 1 - DO 30 I = JJ + 1, N - WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) - A( I, JJ ) = ZERO - 30 CONTINUE - 40 CONTINUE -* -* Compute current block column of inv(A). -* - IF( J+JB.LE.N ) - $ CALL DGEMM( 'No transpose', 'No transpose', N, JB, - $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, - $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) - CALL DTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, - $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) - 50 CONTINUE - END IF -* -* Apply column interchanges. -* - DO 60 J = N - 1, 1, -1 - JP = IPIV( J ) - IF( JP.NE.J ) - $ CALL DSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) - 60 CONTINUE -* - WORK( 1 ) = IWS - RETURN -* -* End of DGETRI -* - END diff --git a/lapack/getri/sgetri.f b/lapack/getri/sgetri.f deleted file mode 100644 index ec5932f16..000000000 --- a/lapack/getri/sgetri.f +++ /dev/null @@ -1,193 +0,0 @@ - SUBROUTINE SGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - REAL A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* SGETRI computes the inverse of a matrix using the LU factorization -* computed by SGETRF. -* -* This method inverts U and then computes inv(A) by solving the system -* inv(A)*L = inv(U) for inv(A). -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) REAL array, dimension (LDA,N) -* On entry, the factors L and U from the factorization -* A = P*L*U as computed by SGETRF. -* On exit, if INFO = 0, the inverse of the original matrix A. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* The pivot indices from SGETRF; for 1<=i<=N, row i of the -* matrix was interchanged with row IPIV(i). -* -* WORK (workspace/output) REAL array, dimension (LWORK) -* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimal performance LWORK >= N*NB, where NB is -* the optimal blocksize returned by ILAENV. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is -* singular and its inverse could not be computed. -* -* ===================================================================== -* -* .. Parameters .. - REAL ZERO, ONE - PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, - $ NBMIN, NN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. External Subroutines .. - EXTERNAL SGEMM, SGEMV, SSWAP, STRSM, STRTRI, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - NB = ILAENV( 1, 'SGETRI', ' ', N, -1, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -3 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -6 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'SGETRI', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Form inv(U). If INFO > 0 from STRTRI, then U is singular, -* and the inverse is not computed. -* - CALL STRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) - IF( INFO.GT.0 ) - $ RETURN -* - NBMIN = 2 - LDWORK = N - IF( NB.GT.1 .AND. NB.LT.N ) THEN - IWS = MAX( LDWORK*NB, 1 ) - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'SGETRI', ' ', N, -1, -1, -1 ) ) - END IF - ELSE - IWS = N - END IF -* -* Solve the equation inv(A)*L = inv(U) for inv(A). -* - IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN -* -* Use unblocked code. -* - DO 20 J = N, 1, -1 -* -* Copy current column of L to WORK and replace with zeros. -* - DO 10 I = J + 1, N - WORK( I ) = A( I, J ) - A( I, J ) = ZERO - 10 CONTINUE -* -* Compute current column of inv(A). -* - IF( J.LT.N ) - $ CALL SGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), - $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) - 20 CONTINUE - ELSE -* -* Use blocked code. -* - NN = ( ( N-1 ) / NB )*NB + 1 - DO 50 J = NN, 1, -NB - JB = MIN( NB, N-J+1 ) -* -* Copy current block column of L to WORK and replace with -* zeros. -* - DO 40 JJ = J, J + JB - 1 - DO 30 I = JJ + 1, N - WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) - A( I, JJ ) = ZERO - 30 CONTINUE - 40 CONTINUE -* -* Compute current block column of inv(A). -* - IF( J+JB.LE.N ) - $ CALL SGEMM( 'No transpose', 'No transpose', N, JB, - $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, - $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) - CALL STRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, - $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) - 50 CONTINUE - END IF -* -* Apply column interchanges. -* - DO 60 J = N - 1, 1, -1 - JP = IPIV( J ) - IF( JP.NE.J ) - $ CALL SSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) - 60 CONTINUE -* - WORK( 1 ) = IWS - RETURN -* -* End of SGETRI -* - END diff --git a/lapack/getri/zgetri.f b/lapack/getri/zgetri.f deleted file mode 100644 index 1eb4eb7f1..000000000 --- a/lapack/getri/zgetri.f +++ /dev/null @@ -1,194 +0,0 @@ - SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - COMPLEX*16 A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* ZGETRI computes the inverse of a matrix using the LU factorization -* computed by ZGETRF. -* -* This method inverts U and then computes inv(A) by solving the system -* inv(A)*L = inv(U) for inv(A). -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) COMPLEX*16 array, dimension (LDA,N) -* On entry, the factors L and U from the factorization -* A = P*L*U as computed by ZGETRF. -* On exit, if INFO = 0, the inverse of the original matrix A. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* The pivot indices from ZGETRF; for 1<=i<=N, row i of the -* matrix was interchanged with row IPIV(i). -* -* WORK (workspace/output) COMPLEX*16 array, dimension (LWORK) -* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimal performance LWORK >= N*NB, where NB is -* the optimal blocksize returned by ILAENV. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is -* singular and its inverse could not be computed. -* -* ===================================================================== -* -* .. Parameters .. - COMPLEX*16 ZERO, ONE - PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), - $ ONE = ( 1.0D+0, 0.0D+0 ) ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, - $ NBMIN, NN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. External Subroutines .. - EXTERNAL XERBLA, ZGEMM, ZGEMV, ZSWAP, ZTRSM, ZTRTRI -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - NB = ILAENV( 1, 'ZGETRI', ' ', N, -1, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -3 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -6 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'ZGETRI', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Form inv(U). If INFO > 0 from ZTRTRI, then U is singular, -* and the inverse is not computed. -* - CALL ZTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) - IF( INFO.GT.0 ) - $ RETURN -* - NBMIN = 2 - LDWORK = N - IF( NB.GT.1 .AND. NB.LT.N ) THEN - IWS = MAX( LDWORK*NB, 1 ) - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'ZGETRI', ' ', N, -1, -1, -1 ) ) - END IF - ELSE - IWS = N - END IF -* -* Solve the equation inv(A)*L = inv(U) for inv(A). -* - IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN -* -* Use unblocked code. -* - DO 20 J = N, 1, -1 -* -* Copy current column of L to WORK and replace with zeros. -* - DO 10 I = J + 1, N - WORK( I ) = A( I, J ) - A( I, J ) = ZERO - 10 CONTINUE -* -* Compute current column of inv(A). -* - IF( J.LT.N ) - $ CALL ZGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), - $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) - 20 CONTINUE - ELSE -* -* Use blocked code. -* - NN = ( ( N-1 ) / NB )*NB + 1 - DO 50 J = NN, 1, -NB - JB = MIN( NB, N-J+1 ) -* -* Copy current block column of L to WORK and replace with -* zeros. -* - DO 40 JJ = J, J + JB - 1 - DO 30 I = JJ + 1, N - WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) - A( I, JJ ) = ZERO - 30 CONTINUE - 40 CONTINUE -* -* Compute current block column of inv(A). -* - IF( J+JB.LE.N ) - $ CALL ZGEMM( 'No transpose', 'No transpose', N, JB, - $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, - $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) - CALL ZTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, - $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) - 50 CONTINUE - END IF -* -* Apply column interchanges. -* - DO 60 J = N - 1, 1, -1 - JP = IPIV( J ) - IF( JP.NE.J ) - $ CALL ZSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) - 60 CONTINUE -* - WORK( 1 ) = IWS - RETURN -* -* End of ZGETRI -* - END From a8d4d1c4d366da71315877f82b5d3a42d40d51e2 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sat, 17 May 2014 16:21:21 -0700 Subject: [PATCH 89/98] Build import library for mingw Signed-off-by: Timothy Gu --- Makefile.install | 1 + exports/Makefile | 12 +++--------- exports/dllinit.c | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Makefile.install b/Makefile.install index 6fcbcc3e1..d40bdd402 100644 --- a/Makefile.install +++ b/Makefile.install @@ -80,6 +80,7 @@ ifeq ($(OSNAME), Darwin) endif ifeq ($(OSNAME), WINNT) @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) + @-cp $(LIBDLLNAME).a $(OPENBLAS_LIBRARY_DIR) endif ifeq ($(OSNAME), CYGWIN_NT) @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) diff --git a/exports/Makefile b/exports/Makefile index e09b3c3ad..ce28ab5cc 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -83,15 +83,9 @@ dll : ../$(LIBDLLNAME) # For more details see: https://github.com/xianyi/OpenBLAS/issues/127. ../$(LIBDLLNAME) : ../$(LIBNAME) libopenblas.def dllinit.$(SUFFIX) $(RANLIB) ../$(LIBNAME) -ifeq ($(BINARY32), 1) - $(DLLWRAP) -o ../$(LIBDLLNAME) --def libopenblas.def \ - --entry _dllinit@12 -s dllinit.$(SUFFIX) --dllname $(@F) ../$(LIBNAME) $(EXTRALIB) - -lib /machine:i386 /def:libopenblas.def -else - $(DLLWRAP) -o ../$(LIBDLLNAME) --def libopenblas.def \ - --entry $(FU)dllinit -s dllinit.$(SUFFIX) --dllname $(@F) ../$(LIBNAME) $(EXTRALIB) - -lib /machine:X64 /def:libopenblas.def -endif + $(CC) $(CFLAGS) $(LDFLAGS) libopenblas.def dllinit.$(SUFFIX) \ + -shared -o ../$(LIBDLLNAME) -Wl,--out-implib,../$(LIBDLLNAME).a \ + -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) libopenblas.def : gensymbol perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) diff --git a/exports/dllinit.c b/exports/dllinit.c index 54ec1c36c..0f25824f1 100644 --- a/exports/dllinit.c +++ b/exports/dllinit.c @@ -41,7 +41,7 @@ void gotoblas_init(void); void gotoblas_quit(void); -BOOL APIENTRY dllinit(HINSTANCE hInst, DWORD reason, LPVOID reserved) { +BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) { if (reason == DLL_PROCESS_ATTACH) { gotoblas_init(); From fe858873af90f0faa352684f0fbae03ef7039cb9 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 22 May 2014 18:05:19 -0700 Subject: [PATCH 90/98] Add NO_STATIC variable which disables static lib installation Static library is still built for shared lib generation. Signed-off-by: Timothy Gu --- Makefile | 5 +++++ Makefile.install | 2 ++ Makefile.rule | 3 +++ 3 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 343bd72f4..66d094789 100644 --- a/Makefile +++ b/Makefile @@ -128,6 +128,11 @@ ifeq ($(CORE), UNKOWN) endif ifeq ($(NOFORTRAN), 1) $(error OpenBLAS: Detecting fortran compiler failed. Please install fortran compiler, e.g. gfortran, ifort, openf90.) +endif +ifeq ($(NO_STATIC), 1) +ifeq ($(NO_SHARED), 1) + $(error OpenBLAS: neither static nor shared are enabled.) +endif endif @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) @for d in $(SUBDIRS) ; \ diff --git a/Makefile.install b/Makefile.install index d40bdd402..e04112089 100644 --- a/Makefile.install +++ b/Makefile.install @@ -50,10 +50,12 @@ ifndef NO_LAPACKE endif #for install static library +ifndef NO_STATIC @echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) @install -pm644 $(LIBNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) @cd $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) ; \ ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) +endif #for install shared library ifndef NO_SHARED @echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) diff --git a/Makefile.rule b/Makefile.rule index 6b604b781..cf631d843 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -48,6 +48,9 @@ VERSION = 0.2.9.rc2 # automatically detected by the the script. # NUM_THREADS = 24 +# if you don't need to install the static library, please comment it in. +# NO_STATIC = 1 + # if you don't need generate the shared library, please comment it in. # NO_SHARED = 1 From ced13574a0584b8c284a2d9a637bc27fea940d69 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 22 May 2014 18:10:33 -0700 Subject: [PATCH 91/98] Random "walk (a)round" --> "work-around" typo fixes Signed-off-by: Timothy Gu --- Changelog.txt | 6 +++--- interface/axpy.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 198c2d8f1..f53cadc61 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -51,7 +51,7 @@ common: parallelization model is used by OpenBLAS. (Thank grisuthedragon) * Detect LLVM/Clang compiler. The default compiler is Clang on Mac OS X. * Change LIBSUFFIX from .lib to .a on windows. - * A walk round for dtrti_U single thread bug. Replace it with LAPACK codes. (#191) + * A work-around for dtrti_U single thread bug. Replace it with LAPACK codes. (#191) x86/x86-64: * Optimize c/zgemm, trsm, dgemv_n, ddot, daxpy, dcopy on @@ -284,7 +284,7 @@ x86/x86_64: * Fixed #28 a wrong result of dsdot on x86_64. * Fixed #32 a SEGFAULT bug of zdotc with gcc-4.6. * Fixed #33 ztrmm bug on Nehalem. - * Walk round #27 the low performance axpy issue with small imput size & multithreads. + * Work-around #27 the low performance axpy issue with small imput size & multithreads. MIPS64: * Fixed #28 a wrong result of dsdot on Loongson3A/MIPS64. @@ -308,7 +308,7 @@ common: x86/x86_64: * On x86 32bits, fixed a bug in zdot_sse2.S line 191. This would casue - zdotu & zdotc failures.Instead,Walk around it. (Refs issue #8 #9 on github) + zdotu & zdotc failures. Instead, work-around it. (Refs issue #8 #9 on github) * Modified ?axpy functions to return same netlib BLAS results when incx==0 or incy==0 (Refs issue #7 on github) * Modified ?swap functions to return same netlib BLAS results diff --git a/interface/axpy.c b/interface/axpy.c index 82b0ee234..5e288e3b9 100644 --- a/interface/axpy.c +++ b/interface/axpy.c @@ -86,7 +86,8 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc if (incx == 0 || incy == 0) nthreads = 1; - //Temporarily walk around the low performance issue with small imput size & multithreads. + //Temporarily work-around the low performance issue with small imput size & + //multithreads. if (n <= 10000) nthreads = 1; From c26bbee4891e7f33e9d3f72df107f33ef5a508e8 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 23 May 2014 10:55:39 +0200 Subject: [PATCH 92/98] enabled abd tested optimized trtri lapack functions --- Makefile | 3 + interface/Makefile | 16 +- interface/lapack/{trtri.c.bad => trtri.c} | 0 interface/lapack/{ztrtri.c.bad => ztrtri.c} | 0 lapack-netlib/SRC/Makefile | 8 +- lapack/Makefile | 2 +- lapack/trtri/trtri_L_single.c | 251 +++++++------------- lapack/trtri/trtri_U_single.c | 246 ++++++------------- 8 files changed, 182 insertions(+), 344 deletions(-) rename interface/lapack/{trtri.c.bad => trtri.c} (100%) rename interface/lapack/{ztrtri.c.bad => ztrtri.c} (100%) diff --git a/Makefile b/Makefile index 343bd72f4..d68e0882b 100644 --- a/Makefile +++ b/Makefile @@ -262,6 +262,7 @@ endif lapack-test : + (cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out) make -j 1 -C $(NETLIB_LAPACK_DIR) tmglib make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc (cd $(NETLIB_LAPACK_DIR); ./lapack_testing.py -r ) @@ -291,4 +292,6 @@ endif @$(MAKE) -C $(NETLIB_LAPACK_DIR) clean @rm -f $(NETLIB_LAPACK_DIR)/make.inc $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_mangling.h @rm -f *.grd Makefile.conf_last config_last.h + @(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt) + @rm -f $(NETLIB_LAPACK_DIR)/tmglib.a @echo Done. diff --git a/interface/Makefile b/interface/Makefile index fcff93ec9..172e2e5bf 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -350,7 +350,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) slauu2.$(SUFFIX) \ - slauum.$(SUFFIX) strti2.$(SUFFIX) + slauum.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) #DLAPACKOBJS = \ @@ -361,7 +361,7 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) dlauu2.$(SUFFIX) \ - dlauum.$(SUFFIX) dtrti2.$(SUFFIX) + dlauum.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) QLAPACKOBJS = \ @@ -377,7 +377,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) \ - clauum.$(SUFFIX) ctrti2.$(SUFFIX) + clauum.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) #ZLAPACKOBJS = \ @@ -388,7 +388,7 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) \ - zlauum.$(SUFFIX) ztrti2.$(SUFFIX) + zlauum.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) @@ -1883,19 +1883,19 @@ ztrti2.$(SUFFIX) ztrti2.$(PSUFFIX) : lapack/ztrti2.c xtrti2.$(SUFFIX) xtrti2.$(PSUFFIX) : ztrti2.c $(CC) -c $(CFLAGS) $< -o $(@F) -strtri.$(SUFFIX) strtri.$(PSUFFIX) : trtri.c +strtri.$(SUFFIX) strtri.$(PSUFFIX) : lapack/trtri.c $(CC) -c $(CFLAGS) $< -o $(@F) -dtrtri.$(SUFFIX) dtrtri.$(PSUFFIX) : trtri.c +dtrtri.$(SUFFIX) dtrtri.$(PSUFFIX) : lapack/trtri.c $(CC) -c $(CFLAGS) $< -o $(@F) qtrtri.$(SUFFIX) qtrtri.$(PSUFFIX) : trtri.c $(CC) -c $(CFLAGS) $< -o $(@F) -ctrtri.$(SUFFIX) ctrtri.$(PSUFFIX) : ztrtri.c +ctrtri.$(SUFFIX) ctrtri.$(PSUFFIX) : lapack/ztrtri.c $(CC) -c $(CFLAGS) $< -o $(@F) -ztrtri.$(SUFFIX) ztrtri.$(PSUFFIX) : ztrtri.c +ztrtri.$(SUFFIX) ztrtri.$(PSUFFIX) : lapack/ztrtri.c $(CC) -c $(CFLAGS) $< -o $(@F) xtrtri.$(SUFFIX) xtrtri.$(PSUFFIX) : ztrtri.c diff --git a/interface/lapack/trtri.c.bad b/interface/lapack/trtri.c similarity index 100% rename from interface/lapack/trtri.c.bad rename to interface/lapack/trtri.c diff --git a/interface/lapack/ztrtri.c.bad b/interface/lapack/ztrtri.c similarity index 100% rename from interface/lapack/ztrtri.c.bad rename to interface/lapack/ztrtri.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 8a622c837..8b275db3f 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -147,7 +147,7 @@ SLASRC = \ stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \ stptrs.o \ strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \ - strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \ + strtrs.o stzrqf.o stzrzf.o sstemr.o \ slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \ stfttr.o stpttf.o stpttr.o strttf.o strttp.o \ sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \ @@ -225,7 +225,7 @@ CLASRC = \ ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \ ctprfs.o ctptri.o \ ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \ - ctrsyl.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ + ctrsyl.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \ cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \ cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \ cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \ @@ -307,7 +307,7 @@ DLASRC = \ dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \ dtptrs.o \ dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \ - dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ + dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \ dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \ dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \ dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \ @@ -387,7 +387,7 @@ ZLASRC = \ ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \ ztprfs.o ztptri.o \ ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \ - ztrsyl.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ + ztrsyl.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \ zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \ zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \ zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \ diff --git a/lapack/Makefile b/lapack/Makefile index 870962bc9..aff5209d5 100644 --- a/lapack/Makefile +++ b/lapack/Makefile @@ -2,7 +2,7 @@ TOPDIR = .. include ../Makefile.system #SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -SUBDIRS = getrf getf2 laswp getrs potrf potf2 lauu2 lauum trti2 +SUBDIRS = getrf getf2 laswp getrs potrf potf2 lauu2 lauum trti2 trtri FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 diff --git a/lapack/trtri/trtri_L_single.c b/lapack/trtri/trtri_L_single.c index a940ce2f6..3e4343060 100644 --- a/lapack/trtri/trtri_L_single.c +++ b/lapack/trtri/trtri_L_single.c @@ -1,190 +1,113 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ +/*************************************************************************** + * Copyright (c) 2013, The OpenBLAS Project + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of the OpenBLAS project nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * *****************************************************************************/ + +/************************************************************************************** +* 2014/05/22 Saar +* TEST double precision unblocked : OK +* 2014/05/23 Saar +* TEST double precision blocked: OK +* TEST single precision blocked: OK +**************************************************************************************/ #include #include "common.h" -static FLOAT dp1 = 1.; -static FLOAT dm1 = -1.; +// static FLOAT dp1 = 1.; +// static FLOAT dm1 = -1.; + #ifdef UNIT -#define TRTI2 TRTI2_LU +#define TRTI2 TRTI2_LU +#define TRMM TRMM_LNLU +#define TRSM TRSM_RNLU #else -#define TRTI2 TRTI2_LN -#endif - -#if 0 -#undef GEMM_P -#undef GEMM_Q -#undef GEMM_R - -#define GEMM_P 8 -#define GEMM_Q 20 -#define GEMM_R 64 +#define TRTI2 TRTI2_LN +#define TRMM TRMM_LNLN +#define TRSM TRSM_RNLN #endif -#define GEMM_PQ MAX(GEMM_P, GEMM_Q) -#define REAL_GEMM_R (GEMM_R - 2 * GEMM_PQ) blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { - BLASLONG n, lda; + BLASLONG j, n, lda; FLOAT *a; - BLASLONG i, is, min_i, start_i; - BLASLONG ls, min_l; - BLASLONG bk; - BLASLONG blocking; - BLASLONG range_N[2]; + // BLASLONG info=0; + BLASLONG jb; + BLASLONG NB; + BLASLONG start_j; - FLOAT *sa_trsm = (FLOAT *)((BLASLONG)sb); - FLOAT *sa_trmm = (FLOAT *)((((BLASLONG)sb - + GEMM_PQ * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN) - + GEMM_OFFSET_A); - FLOAT *sb_gemm = (FLOAT *)((((BLASLONG)sa_trmm - + GEMM_PQ * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN) - + GEMM_OFFSET_B); + FLOAT beta_plus[2] = { ONE, ZERO}; + FLOAT beta_minus[2] = {-ONE, ZERO}; n = args -> n; - a = (FLOAT *)args -> a; - lda = args -> lda; - if (range_n) { - n = range_n[1] - range_n[0]; - a += range_n[0] * (lda + 1) * COMPSIZE; - } + NB = GEMM_Q; - if (n <= DTB_ENTRIES) { + if (n < NB) { TRTI2(args, NULL, range_n, sa, sb, 0); return 0; } - blocking = GEMM_Q; - if (n <= 4 * GEMM_Q) blocking = (n + 3) / 4; - - start_i = 0; - while (start_i < n) start_i += blocking; - start_i -= blocking; - - for (i = start_i; i >= 0; i -= blocking) { - bk = MIN(blocking, n - i); - - if (n - bk - i > 0) TRSM_OLNCOPY(bk, bk, a + (i + i * lda) * COMPSIZE, lda, 0, sa_trsm); - - if (!range_n) { - range_N[0] = i; - range_N[1] = i + bk; - } else { - range_N[0] = range_n[0] + i; - range_N[1] = range_n[0] + i + bk; - } - - CNAME(args, NULL, range_N, sa, sa_trmm, 0); - - if (i > 0) { - TRMM_ILTCOPY(bk, bk, a + (i + i * lda) * COMPSIZE, lda, 0, 0, sa_trmm); - - for (ls = 0; ls < i; ls += REAL_GEMM_R) { - min_l = i - ls; - if (min_l > REAL_GEMM_R) min_l = REAL_GEMM_R; - - GEMM_ONCOPY (bk, min_l, a + (i + ls * lda) * COMPSIZE, lda, sb_gemm); - - if (n - bk - i > 0) { - for (is = i + bk; is < n; is += GEMM_P) { - min_i = n - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - if (ls == 0) { - NEG_TCOPY (bk, min_i, a + (is + i * lda) * COMPSIZE, lda, sa); - - TRSM_KERNEL_RT(min_i, bk, bk, dm1, -#ifdef COMPLEX - ZERO, -#endif - sa, sa_trsm, - a + (is + i * lda) * COMPSIZE, lda, 0); - } else { - GEMM_ITCOPY (bk, min_i, a + (is + i * lda) * COMPSIZE, lda, sa); - } - - GEMM_KERNEL_N(min_i, min_l, bk, dp1, -#ifdef COMPLEX - ZERO, -#endif - sa, sb_gemm, - a + (is + ls * lda) * COMPSIZE, lda); - } - } - - for (is = 0; is < bk; is += GEMM_P) { - min_i = bk - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - TRMM_KERNEL_LT(min_i, min_l, bk, dp1, -#ifdef COMPLEX - ZERO, -#endif - sa_trmm + is * bk * COMPSIZE, sb_gemm, - a + (i + is + ls * lda) * COMPSIZE, lda, is); - } - } - - } else { - - if (n - bk - i > 0) { - for (is = 0; is < n - bk - i; is += GEMM_P) { - min_i = n - bk - i - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - NEG_TCOPY (bk, min_i, a + (i + bk + is + i * lda) * COMPSIZE, lda, sa); - - TRSM_KERNEL_RT(min_i, bk, bk, dm1, -#ifdef COMPLEX - ZERO, -#endif - sa, sa_trsm, - a + (i + bk + is + i * lda) * COMPSIZE, lda, 0); - } - } - - } - } + lda = args -> lda; + a = (FLOAT *) args -> a; + args -> ldb = lda; + args -> ldc = lda; + args -> alpha = NULL; + + start_j = 0; + while (start_j < n) start_j += NB; + start_j -= NB; + + + for (j = start_j ; j >=0 ; j-= NB) + { + jb = n - j; + if ( jb > NB ) jb = NB; + + args -> n = jb; + args -> m = n-j-jb; + + args -> a = &a[(j+jb+(j+jb)*lda) * COMPSIZE]; + args -> b = &a[(j+jb+j*lda) * COMPSIZE]; + args -> beta = beta_plus; + + TRMM(args, NULL, NULL, sa, sb, 0); + + args -> a = &a[(j+j*lda) * COMPSIZE]; + args -> beta = beta_minus; + + TRSM(args, NULL, NULL, sa, sb, 0); + + args -> a = &a[(j+j*lda) * COMPSIZE]; + + TRTI2(args, NULL, range_n, sa, sb, 0); + + } return 0; } diff --git a/lapack/trtri/trtri_U_single.c b/lapack/trtri/trtri_U_single.c index c79281cfb..e4da5da59 100644 --- a/lapack/trtri/trtri_U_single.c +++ b/lapack/trtri/trtri_U_single.c @@ -1,46 +1,44 @@ -/*********************************************************************/ -/* Copyright 2009, 2010 The University of Texas at Austin. */ -/* All rights reserved. */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* 1. Redistributions of source code must retain the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer. */ -/* */ -/* 2. Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ -/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ -/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ -/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ -/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ -/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ -/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ -/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/* POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* The views and conclusions contained in the software and */ -/* documentation are those of the authors and should not be */ -/* interpreted as representing official policies, either expressed */ -/* or implied, of The University of Texas at Austin. */ -/*********************************************************************/ +/*************************************************************************** + * Copyright (c) 2013, The OpenBLAS Project + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of the OpenBLAS project nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * *****************************************************************************/ + +/************************************************************************************** +* 2014/05/22 Saar +* TEST double precision unblocked : OK +* TEST double precision blocked : OK +* 2014/05/23 +* TEST single precision blocked : OK +* +**************************************************************************************/ #include #include "common.h" -static FLOAT dp1 = 1.; -static FLOAT dm1 = -1.; +// static FLOAT dp1 = 1.; +// static FLOAT dm1 = -1.; #ifdef UNIT #define TRTI2 TRTI2_UU @@ -48,152 +46,66 @@ static FLOAT dm1 = -1.; #define TRTI2 TRTI2_UN #endif -#if 0 -#undef GEMM_P -#undef GEMM_Q -#undef GEMM_R - -#define GEMM_P 8 -#define GEMM_Q 20 -#define GEMM_R 64 +#ifdef UNIT +#define TRMM TRMM_LNUU +#define TRSM TRSM_RNUU +#else +#define TRMM TRMM_LNUN +#define TRSM TRSM_RNUN #endif -#define GEMM_PQ MAX(GEMM_P, GEMM_Q) -#define REAL_GEMM_R (GEMM_R - 2 * GEMM_PQ) blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { - BLASLONG n, lda; + BLASLONG j, n, lda; FLOAT *a; - BLASLONG i, is, min_i, start_is; - BLASLONG ls, min_l; - BLASLONG bk; - BLASLONG blocking; - BLASLONG range_N[2]; + // BLASLONG info=0; + BLASLONG jb; + BLASLONG NB; - FLOAT *sa_trsm = (FLOAT *)((BLASLONG)sb); - FLOAT *sa_trmm = (FLOAT *)((((BLASLONG)sb - + GEMM_PQ * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN) - + GEMM_OFFSET_A); - FLOAT *sb_gemm = (FLOAT *)((((BLASLONG)sa_trmm - + GEMM_PQ * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN) - + GEMM_OFFSET_B); + FLOAT beta_plus[2] = { ONE, ZERO}; + FLOAT beta_minus[2] = {-ONE, ZERO}; n = args -> n; - a = (FLOAT *)args -> a; - lda = args -> lda; - if (range_n) { - n = range_n[1] - range_n[0]; - a += range_n[0] * (lda + 1) * COMPSIZE; - } + NB = GEMM_Q; - if (n <= DTB_ENTRIES) { + if (n <= NB) { TRTI2(args, NULL, range_n, sa, sb, 0); return 0; } - blocking = GEMM_Q; - if (n <= 4 * GEMM_Q) blocking = (n + 3) / 4; - - for (i = 0; i < n; i += blocking) { - bk = MIN(blocking, n - i); - - if (i > 0) TRSM_OUNCOPY(bk, bk, a + (i + i * lda) * COMPSIZE, lda, 0, sa_trsm); - - if (!range_n) { - range_N[0] = i; - range_N[1] = i + bk; - } else { - range_N[0] = range_n[0] + i; - range_N[1] = range_n[0] + i + bk; - } - - CNAME(args, NULL, range_N, sa, sa_trmm, 0); - - if (n -bk - i > 0) { - TRMM_IUTCOPY(bk, bk, a + (i + i * lda) * COMPSIZE, lda, 0, 0, sa_trmm); - - for (ls = i + bk; ls < n; ls += REAL_GEMM_R) { - min_l = n - ls; - if (min_l > REAL_GEMM_R) min_l = REAL_GEMM_R; - - GEMM_ONCOPY (bk, min_l, a + (i + ls * lda) * COMPSIZE, lda, sb_gemm); - - if (i > 0) { - for (is = 0; is < i; is += GEMM_P) { - min_i = i - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - if (ls == i + bk) { - //NEG_TCOPY (bk, min_i, a + (is + i * lda) * COMPSIZE, lda, sa); - - GEMM_BETA(min_i, bk, 0, dm1, -#ifdef COMPLEX - ZERO, -#endif - NULL, 0, NULL, 0, a + (is + i * lda) * COMPSIZE, lda); - TRSM_KERNEL_RN(min_i, bk, bk, dm1, -#ifdef COMPLEX - ZERO, -#endif - sa, sa_trsm, - a + (is + i * lda) * COMPSIZE, lda, 0); - } else { - GEMM_ITCOPY (bk, min_i, a + (is + i * lda) * COMPSIZE, lda, sa); - } - - GEMM_KERNEL_N(min_i, min_l, bk, dp1, -#ifdef COMPLEX - ZERO, -#endif - sa, sb_gemm, - a + (is + ls * lda) * COMPSIZE, lda); - } - } - - start_is = 0; - while (start_is < bk) start_is += GEMM_P; - start_is -= GEMM_P; - - for (is = 0; is < bk; is += GEMM_P) { - min_i = bk - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - TRMM_KERNEL_LN(min_i, min_l, bk, dp1, -#ifdef COMPLEX - ZERO, -#endif - sa_trmm + is * bk * COMPSIZE, sb_gemm, - a + (i + is + ls * lda) * COMPSIZE, lda, is); - } - } - - } else { - if (i > 0) { - for (is = 0; is < i; is += GEMM_P) { - min_i = i - is; - if (min_i > GEMM_P) min_i = GEMM_P; - - //NEG_TCOPY (bk, min_i, a + (is + i * lda) * COMPSIZE, lda, sa); - GEMM_BETA(min_i, bk, 0, dm1, -#ifdef COMPLEX - ZERO, -#endif - NULL, 0, NULL, 0, a + (is + i * lda) * COMPSIZE, lda); + lda = args -> lda; + a = (FLOAT *) args -> a; + args -> ldb = lda; + args -> ldc = lda; + args -> alpha = NULL; - TRSM_KERNEL_RN(min_i, bk, bk, dm1, -#ifdef COMPLEX - ZERO, -#endif - sa, sa_trsm, - a + (is + i * lda) * COMPSIZE, lda, 0); - } - } - } - } + for (j = 0; j < n; j += NB) + { + jb = n - j; + if ( jb > NB ) jb = NB; + + args -> n = jb; + args -> m = j; + + args -> a = &a[0]; + args -> b = &a[(j*lda) * COMPSIZE]; + args -> beta = beta_plus; + + TRMM(args, NULL, NULL, sa, sb, 0); + + args -> a = &a[(j+j*lda) * COMPSIZE]; + args -> beta = beta_minus; + TRSM(args, NULL, NULL, sa, sb, 0); + + args -> a = &a[(j+j*lda) * COMPSIZE]; + + TRTI2(args, NULL, range_n, sa, sb, 0); + + } return 0; } From 89da450800541e5ee77656b70cf0bb56463c4e4e Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 23 May 2014 12:14:30 +0200 Subject: [PATCH 93/98] enabled and tested optimized potri lapack functions --- interface/Makefile | 16 ++++++++-------- interface/lapack/{potri.c.bad => potri.c} | 0 interface/lapack/{zpotri.c.bad => zpotri.c} | 0 lapack-netlib/SRC/Makefile | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) rename interface/lapack/{potri.c.bad => potri.c} (100%) rename interface/lapack/{zpotri.c.bad => zpotri.c} (100%) diff --git a/interface/Makefile b/interface/Makefile index 172e2e5bf..9774f37b2 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -350,7 +350,7 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) SLAPACKOBJS = \ sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \ spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) slauu2.$(SUFFIX) \ - slauum.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) + slauum.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) spotri.$(SUFFIX) #DLAPACKOBJS = \ @@ -361,7 +361,7 @@ SLAPACKOBJS = \ DLAPACKOBJS = \ dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \ dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) dlauu2.$(SUFFIX) \ - dlauum.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) + dlauum.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) dpotri.$(SUFFIX) QLAPACKOBJS = \ @@ -377,7 +377,7 @@ QLAPACKOBJS = \ CLAPACKOBJS = \ cgetrf.$(SUFFIX) cgetrs.$(SUFFIX) cpotrf.$(SUFFIX) cgetf2.$(SUFFIX) \ cpotf2.$(SUFFIX) claswp.$(SUFFIX) cgesv.$(SUFFIX) clauu2.$(SUFFIX) \ - clauum.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) + clauum.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) cpotri.$(SUFFIX) #ZLAPACKOBJS = \ @@ -388,7 +388,7 @@ CLAPACKOBJS = \ ZLAPACKOBJS = \ zgetrf.$(SUFFIX) zgetrs.$(SUFFIX) zpotrf.$(SUFFIX) zgetf2.$(SUFFIX) \ zpotf2.$(SUFFIX) zlaswp.$(SUFFIX) zgesv.$(SUFFIX) zlauu2.$(SUFFIX) \ - zlauum.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) + zlauum.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) zpotri.$(SUFFIX) @@ -1955,19 +1955,19 @@ zgesv.$(SUFFIX) zgesv.$(PSUFFIX) : lapack/gesv.c xgesv.$(SUFFIX) xgesv.$(PSUFFIX) : gesv.c $(CC) -c $(CFLAGS) $< -o $(@F) -spotri.$(SUFFIX) spotri.$(PSUFFIX) : potri.c +spotri.$(SUFFIX) spotri.$(PSUFFIX) : lapack/potri.c $(CC) -c $(CFLAGS) $< -o $(@F) -dpotri.$(SUFFIX) dpotri.$(PSUFFIX) : potri.c +dpotri.$(SUFFIX) dpotri.$(PSUFFIX) : lapack/potri.c $(CC) -c $(CFLAGS) $< -o $(@F) qpotri.$(SUFFIX) qpotri.$(PSUFFIX) : potri.c $(CC) -c $(CFLAGS) $< -o $(@F) -cpotri.$(SUFFIX) cpotri.$(PSUFFIX) : zpotri.c +cpotri.$(SUFFIX) cpotri.$(PSUFFIX) : lapack/zpotri.c $(CC) -c $(CFLAGS) $< -o $(@F) -zpotri.$(SUFFIX) zpotri.$(PSUFFIX) : zpotri.c +zpotri.$(SUFFIX) zpotri.$(PSUFFIX) : lapack/zpotri.c $(CC) -c $(CFLAGS) $< -o $(@F) xpotri.$(SUFFIX) xpotri.$(PSUFFIX) : zpotri.c diff --git a/interface/lapack/potri.c.bad b/interface/lapack/potri.c similarity index 100% rename from interface/lapack/potri.c.bad rename to interface/lapack/potri.c diff --git a/interface/lapack/zpotri.c.bad b/interface/lapack/zpotri.c similarity index 100% rename from interface/lapack/zpotri.c.bad rename to interface/lapack/zpotri.c diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 8b275db3f..5d59c4b00 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -127,7 +127,7 @@ SLASRC = \ sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \ spbstf.o spbsv.o spbsvx.o \ spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \ - sposvx.o spotri.o spstrf.o spstf2.o \ + sposvx.o spstrf.o spstf2.o \ sppcon.o sppequ.o \ spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \ spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \ @@ -210,7 +210,7 @@ CLASRC = \ clasyf.o clasyf_rook.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \ clatzm.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \ - cposv.o cposvx.o cpotri.o cpstrf.o cpstf2.o \ + cposv.o cposvx.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ @@ -287,7 +287,7 @@ DLASRC = \ dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \ dpbstf.o dpbsv.o dpbsvx.o \ dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \ - dposvx.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \ + dposvx.o dpotrs.o dpstrf.o dpstf2.o \ dppcon.o dppequ.o \ dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \ dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \ @@ -372,7 +372,7 @@ ZLASRC = \ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o \ zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \ - zposv.o zposvx.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \ + zposv.o zposvx.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ From 56644455436fbb9da6d15825744222ddbe2bdba1 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 23 May 2014 17:26:50 +0200 Subject: [PATCH 94/98] changed threshold value for sep.in from 50.0 to 60.0 --- lapack-netlib/TESTING/sep.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack-netlib/TESTING/sep.in b/lapack-netlib/TESTING/sep.in index 7f9f54f52..e0ed58512 100644 --- a/lapack-netlib/TESTING/sep.in +++ b/lapack-netlib/TESTING/sep.in @@ -5,7 +5,7 @@ SEP: Data file for testing Symmetric Eigenvalue Problem routines 1 3 3 3 10 Values of NB (blocksize) 2 2 2 2 2 Values of NBMIN (minimum blocksize) 1 0 5 9 1 Values of NX (crossover point) -50.0 Threshold value +60.0 Threshold value T Put T to test the LAPACK routines T Put T to test the driver routines T Put T to test the error exits From 219bcb119dc6df63e23257ff7cbbe8fb59ca73f6 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sat, 24 May 2014 15:53:25 +0200 Subject: [PATCH 95/98] added lapack and lapacke timing libs by default --- Makefile | 11 ++++-- exports/gensymbol | 56 +++++++++++++++--------------- lapack-netlib/lapacke/src/Makefile | 4 +-- make.inc | 8 ++--- 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index d68e0882b..01bedaf4d 100644 --- a/Makefile +++ b/Makefile @@ -207,6 +207,7 @@ else netlib : lapack_prebuild ifndef NOFORTRAN @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib + @$(MAKE) -C $(NETLIB_LAPACK_DIR) tmglib endif ifndef NO_LAPACKE @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapackelib @@ -230,11 +231,18 @@ ifndef NOFORTRAN -@echo "ARCHFLAGS = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc + -@echo "TMGLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc + -@echo "BLASLIB = ../../../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "LAPACKELIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "SUFFIX = $(SUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "PSUFFIX = $(PSUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc -@echo "CEXTRALIB = $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc +ifeq ($(F_COMPILER), GFORTRAN) + -@echo "TIMER = INT_ETIME" >> $(NETLIB_LAPACK_DIR)/make.inc +else + -@echo "TIMER = NONE" >> $(NETLIB_LAPACK_DIR)/make.inc +endif -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc endif @@ -256,14 +264,12 @@ lapack-timing : large.tgz timing.tgz ifndef NOFORTRAN (cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING) (cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz ) - make -C $(NETLIB_LAPACK_DIR) tmglib make -C $(NETLIB_LAPACK_DIR)/TIMING endif lapack-test : (cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out) - make -j 1 -C $(NETLIB_LAPACK_DIR) tmglib make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc (cd $(NETLIB_LAPACK_DIR); ./lapack_testing.py -r ) @@ -293,5 +299,4 @@ endif @rm -f $(NETLIB_LAPACK_DIR)/make.inc $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_mangling.h @rm -f *.grd Makefile.conf_last config_last.h @(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt) - @rm -f $(NETLIB_LAPACK_DIR)/tmglib.a @echo Done. diff --git a/exports/gensymbol b/exports/gensymbol index 7e339c99e..58a309f9e 100644 --- a/exports/gensymbol +++ b/exports/gensymbol @@ -2667,34 +2667,34 @@ ## @(MATGEN_OBJ) from `lapack-3.4.1/lapacke/src/Makefile` ## Not exported: requires LAPACKE_TESTING to be set and depends on libtmg ## (see `lapack-3.4.1/TESTING/MATGEN`). - #LAPACKE_clatms, - #LAPACKE_clatms_work, - #LAPACKE_dlatms, - #LAPACKE_dlatms_work, - #LAPACKE_slatms, - #LAPACKE_slatms_work, - #LAPACKE_zlatms, - #LAPACKE_zlatms_work, - #LAPACKE_clagge, - #LAPACKE_clagge_work, - #LAPACKE_dlagge, - #LAPACKE_dlagge_work, - #LAPACKE_slagge, - #LAPACKE_slagge_work, - #LAPACKE_zlagge, - #LAPACKE_zlagge_work, - #LAPACKE_claghe, - #LAPACKE_claghe_work, - #LAPACKE_zlaghe, - #LAPACKE_zlaghe_work, - #LAPACKE_clagsy, - #LAPACKE_clagsy_work, - #LAPACKE_dlagsy, - #LAPACKE_dlagsy_work, - #LAPACKE_slagsy, - #LAPACKE_slagsy_work, - #LAPACKE_zlagsy, - #LAPACKE_zlagsy_work, + LAPACKE_clatms, + LAPACKE_clatms_work, + LAPACKE_dlatms, + LAPACKE_dlatms_work, + LAPACKE_slatms, + LAPACKE_slatms_work, + LAPACKE_zlatms, + LAPACKE_zlatms_work, + LAPACKE_clagge, + LAPACKE_clagge_work, + LAPACKE_dlagge, + LAPACKE_dlagge_work, + LAPACKE_slagge, + LAPACKE_slagge_work, + LAPACKE_zlagge, + LAPACKE_zlagge_work, + LAPACKE_claghe, + LAPACKE_claghe_work, + LAPACKE_zlaghe, + LAPACKE_zlaghe_work, + LAPACKE_clagsy, + LAPACKE_clagsy_work, + LAPACKE_dlagsy, + LAPACKE_dlagsy_work, + LAPACKE_slagsy, + LAPACKE_slagsy_work, + LAPACKE_zlagsy, + LAPACKE_zlagsy_work, ); #These function may need 2 underscores. diff --git a/lapack-netlib/lapacke/src/Makefile b/lapack-netlib/lapacke/src/Makefile index 09790d0c8..1d5d1d25b 100644 --- a/lapack-netlib/lapacke/src/Makefile +++ b/lapack-netlib/lapacke/src/Makefile @@ -2072,9 +2072,9 @@ SOBJ_FILES := $(SSRC_OBJ) DOBJ_FILES := $(DSRC_OBJ) ZOBJ_FILES := $(ZSRC_OBJ) -ifdef LAPACKE_TESTING +# ifdef LAPACKE_TESTING ZOBJ_FILES += $(MATGEN_OBJ) -endif +#endif ALLOBJ = $(COBJ_FILES) $(DOBJ_FILES) $(SOBJ_FILES) $(ZOBJ_FILES) $(OBJ_FILES) diff --git a/make.inc b/make.inc index d3f91cbaa..affae3a2d 100644 --- a/make.inc +++ b/make.inc @@ -1,11 +1,7 @@ SHELL = /bin/sh PLAT = _LINUX DRVOPTS = $(OPTS) -LOADER = $(FORTRAN) -TIMER = NONE +LOADER = $(FORTRAN) -pthread ARCHFLAGS= -ru #RANLIB = ranlib -BLASLIB = ../../../libopenblas.a -TMGLIB = tmglib.a -#EIGSRCLIB = eigsrc.a -#LINSRCLIB = linsrc.a + From 25e899b60b72f560103d47f1e2b4a79f15c2e2ca Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 25 May 2014 09:15:22 +0200 Subject: [PATCH 96/98] fixed function profile in zpotri.c --- interface/lapack/zpotri.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/lapack/zpotri.c b/interface/lapack/zpotri.c index df325424e..b777c111f 100644 --- a/interface/lapack/zpotri.c +++ b/interface/lapack/zpotri.c @@ -149,7 +149,10 @@ int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){ blas_memory_free(buffer); #endif - FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, args.m * args.n, 2. / 3. * args.m * args.n * args.n); + FUNCTION_PROFILE_END(COMPSIZE * COMPSIZE, .5 * args.n * args.n, + args.n * (1./3. + args.n * ( 1./2. + args.n * 1./6.)) + + args.n * (1./3. + args.n * (-1./2. + args.n * 1./6.))); + IDEBUG_END; From a40116de256c281b4766196b062d367a6ac50727 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Fri, 6 Jun 2014 16:13:08 +0800 Subject: [PATCH 97/98] Fixed generating DLL bug. --- Makefile.install | 3 ++- exports/Makefile | 2 +- lapack-netlib/SRC/Makefile | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile.install b/Makefile.install index e04112089..9fc8d7ad6 100644 --- a/Makefile.install +++ b/Makefile.install @@ -20,6 +20,7 @@ install : lib.grd @-mkdir -p $(DESTDIR)$(PREFIX) @-mkdir -p $(DESTDIR)$(OPENBLAS_INCLUDE_DIR) @-mkdir -p $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) + @-mkdir -p $(DESTDIR)$(OPENBLAS_BINARY_DIR) @echo Generating openblas_config.h in $(DESTDIR)$(OPENBLAS_INCLUDE_DIR) #for inc @echo \#ifndef OPENBLAS_CONFIG_H > $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/openblas_config.h @@ -82,7 +83,7 @@ ifeq ($(OSNAME), Darwin) endif ifeq ($(OSNAME), WINNT) @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) - @-cp $(LIBDLLNAME).a $(OPENBLAS_LIBRARY_DIR) + @-cp $(LIBPREFIX).lib $(OPENBLAS_LIBRARY_DIR) endif ifeq ($(OSNAME), CYGWIN_NT) @-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR) diff --git a/exports/Makefile b/exports/Makefile index ce28ab5cc..3ef20b336 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -84,7 +84,7 @@ dll : ../$(LIBDLLNAME) ../$(LIBDLLNAME) : ../$(LIBNAME) libopenblas.def dllinit.$(SUFFIX) $(RANLIB) ../$(LIBNAME) $(CC) $(CFLAGS) $(LDFLAGS) libopenblas.def dllinit.$(SUFFIX) \ - -shared -o ../$(LIBDLLNAME) -Wl,--out-implib,../$(LIBDLLNAME).a \ + -shared -o ../$(LIBDLLNAME) -Wl,--out-implib,../$(LIBPREFIX).lib \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) libopenblas.def : gensymbol diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 5d59c4b00..0db85763a 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -54,9 +54,9 @@ include ../make.inc # ####################################################################### -ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \ +ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla_array.o iparmq.o \ ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ - ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o + ../INSTALL/ilaver.o ../INSTALL/slamch.o SCLAUX = \ sbdsdc.o \ @@ -213,11 +213,11 @@ CLASRC = \ cposv.o cposvx.o cpstrf.o cpstf2.o \ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \ cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \ - crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \ + crot.o cspcon.o csprfs.o cspsv.o \ cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \ cstegr.o cstein.o csteqr.o \ - csycon.o csymv.o \ - csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \ + csycon.o \ + csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \ csyswapr.o csytrs.o csytrs2.o csyconv.o \ csytf2_rook.o csytrf_rook.o csytrs_rook.o \ csytri_rook.o csycon_rook.o csysv_rook.o \ @@ -375,11 +375,11 @@ ZLASRC = \ zposv.o zposvx.o zpotrs.o zpstrf.o zpstf2.o \ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \ - zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \ + zrot.o zspcon.o zsprfs.o zspsv.o \ zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \ zstegr.o zstein.o zsteqr.o \ - zsycon.o zsymv.o \ - zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \ + zsycon.o \ + zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \ zsyswapr.o zsytrs.o zsytrs2.o zsyconv.o \ zsytf2_rook.o zsytrf_rook.o zsytrs_rook.o \ zsytri_rook.o zsycon_rook.o zsysv_rook.o \ From 21a6b5f79e7f4d5ba1fac0b851bc46a0df53e042 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Tue, 10 Jun 2014 21:55:19 +0800 Subject: [PATCH 98/98] OpenBLAS 0.2.9 Version. --- Changelog.txt | 11 +++++++++++ Makefile.rule | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index f53cadc61..195d98b35 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,4 +1,15 @@ OpenBLAS ChangeLog +==================================================================== +Version 0.2.9 +10-Jun-2014 +common: + * Improved the result for LAPACK testing. (#372) + * Installed DLL to prefix/bin instead of prefix/lib. (#366) + * Build import library on Windows.(#374) +x86/x86-64: + * To improve LAPACK testing, we fallback some kernels. (#372) + https://github.com/xianyi/OpenBLAS/wiki/Fixed-optimized-kernels-To-do-List + ==================================================================== Version 0.2.9.rc2 06-Mar-2014 diff --git a/Makefile.rule b/Makefile.rule index cf631d843..5bbabe37a 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -3,7 +3,7 @@ # # This library's version -VERSION = 0.2.9.rc2 +VERSION = 0.2.9 # If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a # and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library