| @@ -0,0 +1,32 @@ | |||
| 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. | |||
| @@ -0,0 +1,93 @@ | |||
| Optimized GotoBLAS2 libraries version 1.13 | |||
| By Kazushige Goto <kgoto@tacc.utexas.edu> | |||
| # This is the last update and done on 5th Feb. 2010. | |||
| 0. License | |||
| See 00TACC_Research_License.txt. | |||
| 1. Supported OS | |||
| Linux | |||
| FreeBSD(Also it may work on NetBSD) | |||
| OSX | |||
| Soralis | |||
| Windows 2k, XP, Server 2003 and 2008(both 32bit and 64bit) | |||
| AIX | |||
| Tru64 UNIX | |||
| 2. Supported Architecture | |||
| X86 : Pentium3 Katmai | |||
| Coppermine | |||
| Athlon (not well optimized, though) | |||
| PentiumM Banias, Yonah | |||
| Pentium4 Northwood | |||
| Nocona (Prescott) | |||
| Core 2 Woodcrest | |||
| Core 2 Penryn | |||
| Nehalem-EP Corei{3,5,7} | |||
| Atom | |||
| AMD Opteron | |||
| AMD Barlcelona, Shanghai, Istanbul | |||
| VIA NANO | |||
| X86_64: Pentium4 Nocona | |||
| Core 2 Woodcrest | |||
| Core 2 Penryn | |||
| Nehalem | |||
| Atom | |||
| AMD Opteron | |||
| AMD Barlcelona, Shanghai, Istanbul | |||
| VIA NANO | |||
| IA64 : Itanium2 | |||
| Alpha : EV4, EV5, EV6 | |||
| POWER : POWER4 | |||
| PPC970/PPC970FX | |||
| PPC970MP | |||
| CELL (PPU only) | |||
| POWER5 | |||
| PPC440 (QCDOC) | |||
| PPC440FP2(BG/L) | |||
| POWERPC G4(PPC7450) | |||
| POWER6 | |||
| SPARC : SPARC IV | |||
| SPARC VI, VII (Fujitsu chip) | |||
| MIPS64/32: Sicortex | |||
| 3. Supported compiler | |||
| C compiler : GNU CC | |||
| Cygwin, MinGW | |||
| Other commercial compiler(especially for x86/x86_64) | |||
| Fortran Compiler : GNU G77, GFORTRAN | |||
| G95 | |||
| Open64 | |||
| Compaq | |||
| F2C | |||
| IBM | |||
| Intel | |||
| PathScale | |||
| PGI | |||
| SUN | |||
| Fujitsu | |||
| 4. Suported precision | |||
| Now x86/x86_64 version support 80bit FP precision in addition to | |||
| normal double presicion and single precision. Currently only | |||
| gfortran supports 80bit FP with "REAL*10". | |||
| 5. How to build library? | |||
| Please see 02QuickInstall.txt or just type "make". | |||
| @@ -0,0 +1,118 @@ | |||
| Quick installation for GotoBLAS2 | |||
| *************************************************************************** | |||
| *************************************************************************** | |||
| ** ** | |||
| ** ** | |||
| ** Just type "make" <<return>>. ** | |||
| ** ** | |||
| ** If you're not satisfied with this library, ** | |||
| ** please read following instruction and customize it. ** | |||
| ** ** | |||
| ** ** | |||
| *************************************************************************** | |||
| *************************************************************************** | |||
| 1. REALLY REALLY quick way to build library | |||
| Type "make" or "gmake". | |||
| $shell> make | |||
| The script will detect Fortran compiler, number of cores and | |||
| architecture which you're using. If default gcc binary type is | |||
| 64bit, 64 bit library will be created. Otherwise 32 bit library | |||
| will be created. | |||
| After finishing compile, you'll find various information about | |||
| generated library. | |||
| =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |||
| GotoBLAS2 build complete. | |||
| OS ... Linux | |||
| Architecture ... x86_64 | |||
| BINARY ... 64bit | |||
| C compiler ... GCC (command line : gcc) | |||
| Fortran compiler ... PATHSCALE (command line : pathf90) | |||
| Library Name ... libgoto_barcelonap-r1.27.a (Multi threaded; Max | |||
| num-threads is 16) | |||
| =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |||
| 2. Specifying 32bit or 64bit library | |||
| If you need 32bit binary, | |||
| $shell> make BINARY=32 | |||
| If you need 64bit binary, | |||
| $shell> make BINARY=64 | |||
| 3. Specifying target architecture | |||
| If you need library for different architecture, you can use TARGET | |||
| option. You can find current available options in top of getarch.c. | |||
| For example, if you need library for Intel core2 architecture, | |||
| you'll find FORCE_CORE2 option in getarch.c. Therefore you can | |||
| specify TARGET=CORE2 (get rid of FORCE_) with make. | |||
| $shell> make TARGET=CORE2 | |||
| Also if you want GotoBLAS2 to support multiple architecture, | |||
| $shell> make DYNAMIC_ARCH=1 | |||
| All kernel will be included in the library and dynamically switched | |||
| the best architecutre at run time. | |||
| 4. Specifying for enabling multi-threaded | |||
| Script will detect number of cores and will enable multi threaded | |||
| library if number of cores is more than two. If you still want to | |||
| create single threaded library, | |||
| $shell> make USE_THREAD=0 | |||
| Or if you need threaded library by force, | |||
| $shell> make USE_THREAD=1 | |||
| 5. Specifying target OS | |||
| Target architecture will be determined by the CC. If you | |||
| specify cross compiler for MIPS, you can create library for | |||
| MIPS architecture. | |||
| $shell> make CC=mips64el-linux-gcc TARGET=SICORTEX | |||
| Or you can specify your favorite C compiler with absolute path. | |||
| $shell> make CC=/opt/intel/cc/32/10.0.026/bin/icc TARGET=BARCELONA | |||
| Binary type (32bit/64bit) is determined by checking CC, you | |||
| can control binary type with this option. | |||
| $shell> make CC="pathcc -m32" | |||
| In this case, 32bit library will be created. | |||
| 6. Specifying Fortran compiler | |||
| If you need to support other Fortran compiler, you can specify with | |||
| FC option. | |||
| $shell> make FC=gfortran | |||
| 7. Other useful options | |||
| You'll find other useful options in Makefile.rule. | |||
| @@ -0,0 +1,119 @@ | |||
| GotoBLAS2 FAQ | |||
| 1. General | |||
| 1.1 Q Can I find useful paper about GotoBLAS2? | |||
| A You may check following URL. | |||
| http://www.cs.utexas.edu/users/flame/Publications/index.htm | |||
| 11. Kazushige Goto and Robert A. van de Geijn, " Anatomy of | |||
| High-Performance Matrix Multiplication," ACM Transactions on | |||
| Mathematical Software, accepted. | |||
| 15. Kazushige Goto and Robert van de Geijn, "High-Performance | |||
| Implementation of the Level-3 BLAS." ACM Transactions on | |||
| Mathematical Software, submitted. | |||
| 1.2 Q Does GotoBLAS2 work with Hyperthread (SMT)? | |||
| A Yes, it will work. GotoBLAS2 detects Hyperthread and | |||
| avoid scheduling on the same core. | |||
| 1.3 Q When I type "make", following error occured. What's wrong? | |||
| $shell> make | |||
| "./Makefile.rule", line 58: Missing dependency operator | |||
| "./Makefile.rule", line 61: Need an operator | |||
| ... | |||
| A This error occurs because you didn't use GNU make. Some binary | |||
| packages install GNU make as "gmake" and it's worth to try. | |||
| 1.4 Q Function "xxx" is slow. Why? | |||
| A Generally GotoBLAS2 has many well optimized functions, but it's | |||
| far and far from perfect. Especially Level 1/2 function | |||
| performance depends on how you call BLAS. You should understand | |||
| what happends between your function and GotoBLAS2 by using profile | |||
| enabled version or hardware performance counter. Again, please | |||
| don't regard GotoBLAS2 as a black box. | |||
| 1.5 Q I have a commercial C compiler and want to compile GotoBLAS2 with | |||
| it. Is it possible? | |||
| A All function that affects performance is written in assembler | |||
| and C code is just used for wrapper of assembler functions or | |||
| complicated functions. Also I use many inline assembler functions, | |||
| unfortunately most of commercial compiler can't handle inline | |||
| assembler. Therefore you should use gcc. | |||
| 1.6 Q I use OpenMP compiler. How can I use GotoBLAS2 with it? | |||
| A Please understand that OpenMP is a compromised method to use | |||
| thread. If you want to use OpenMP based code with GotoBLAS2, you | |||
| should enable "USE_OPENMP=1" in Makefile.rule. | |||
| 1.7 Q Could you tell me how to use profiled library? | |||
| A You need to build and link your application with -pg | |||
| option. After executing your application, "gmon.out" is | |||
| generated in your current directory. | |||
| $shell> gprof <your application name> gmon.out | |||
| Each sample counts as 0.01 seconds. | |||
| % cumulative self self total | |||
| time seconds seconds calls Ks/call Ks/call name | |||
| 89.86 975.02 975.02 79317 0.00 0.00 .dgemm_kernel | |||
| 4.19 1020.47 45.45 40 0.00 0.00 .dlaswp00N | |||
| 2.28 1045.16 24.69 2539 0.00 0.00 .dtrsm_kernel_LT | |||
| 1.19 1058.03 12.87 79317 0.00 0.00 .dgemm_otcopy | |||
| 1.05 1069.40 11.37 4999 0.00 0.00 .dgemm_oncopy | |||
| .... | |||
| I think profiled BLAS library is really useful for your | |||
| research. Please find bottleneck of your application and | |||
| improve it. | |||
| 1.8 Q Is number of thread limited? | |||
| A Basically, there is no limitation about number of threads. You | |||
| can specify number of threads as many as you want, but larger | |||
| number of threads will consume extra resource. I recommend you to | |||
| specify minimum number of threads. | |||
| 2. Architecture Specific issue or Implementation | |||
| 2.1 Q GotoBLAS2 seems to support any combination with OS and | |||
| architecture. Is it possible? | |||
| A Combination is limited by current OS and architecture. For | |||
| examble, the combination OSX with SPARC is impossible. But it | |||
| will be possible with slight modification if these combination | |||
| appears in front of us. | |||
| 2.2 Q I have POWER architecture systems. Do I need extra work? | |||
| A Although POWER architecture defined special instruction | |||
| like CPUID to detect correct architecture, it's privileged | |||
| and can't be accessed by user process. So you have to set | |||
| the architecture that you have manually in getarch.c. | |||
| 2.3 Q I can't create DLL on Cygwin (Error 53). What's wrong? | |||
| A You have to make sure if lib.exe and mspdb80.dll are in Microsoft | |||
| Studio PATH. The easiest way is to use 'which' command. | |||
| $shell> which lib.exe | |||
| /cygdrive/c/Program Files/Microsoft Visual Studio/VC98/bin/lib.exe | |||
| @@ -0,0 +1,13 @@ | |||
| Quick guide to build library for Windows 64bit. | |||
| 1. What you need | |||
| a. Windows Server 2003 or later | |||
| b. Cygwin environment(make, gcc, g77, perl, sed, wget) | |||
| c. MinGW64 compiler | |||
| d. Microsoft Visual Studio (lib.exe and mspdb80.dll are required to create dll) | |||
| 2. Do ./quickbuild.win64 | |||
| Good luck | |||
| @@ -0,0 +1,53 @@ | |||
| To enhance perfomance, I'd recommend you to enable large page on | |||
| your OS (root account is required). | |||
| A) Linux | |||
| x86 32bit ... (number of core) * 4 pages | |||
| x86 64bit ... (number of core) * 8 pages | |||
| POWER 32/64bit ... (number of core) * 1 pages | |||
| If you want to allocate 64 large pages, | |||
| $shell> echo 0 > /pros/sys/vm/nr_hugepages # need to be reset | |||
| $shell> echo 65 > /pros/sys/vm/nr_hugepages # add 1 extra page | |||
| $shell> echo 3355443200 > /pros/sys/kernel/shmmax # just large number | |||
| $shell> echo 3355443200 > /pros/sys/kernel/shmall | |||
| Also may add a few lines into /etc/security/limits.conf file. | |||
| * hard memlock unlimited | |||
| * soft memlock unlimited | |||
| Then restart sshd (/etc/init.d/sshd restart). | |||
| B) Solaris | |||
| You don't have to set up. | |||
| C) Windows (Windows Server 2003 or later, XP 64bit) | |||
| You have to assign memory lock operation to your account. | |||
| Control Panel -> Administrative Tools -> Local Security Policy -> | |||
| Local Policies -> User Rights Assignment -> Lock pages in memory | |||
| D) AIX | |||
| Ask your administrator | |||
| E) Tru64 UNIX | |||
| Assign shared memory at boot time. | |||
| F) Other aarchitecture which doesn't have Large TLB enhancement | |||
| If you have root permission, please install device driver which | |||
| located in drivers/mapper. | |||
| $shell> cd drivers/mapper | |||
| $shell> make | |||
| $shell> insmod mapper.ko | |||
| $shell> ./device_setup | |||
| Then enable DEVICEDRIVER_ALLOCATION = 1 in Makefile.rule. | |||
| @@ -0,0 +1,22 @@ | |||
| Weird Performance | |||
| 1. If you see serious performance loss (extremely low performance), | |||
| probably you created too many threads or process. Basically GotoBLAS | |||
| assumes that available cores that you specify are exclusively for | |||
| BLAS computation. Even one small thread/process conflicts with BLAS | |||
| threads, performance will become worse. | |||
| The best solution is to reduce your number of threads or insert | |||
| some synchronization mechanism and suspend your threads until BLAS | |||
| operation is finished. | |||
| 2. Simlar problem may happen under virtual machine. If supervisor | |||
| allocates different cores for each scheduling, BLAS performnace | |||
| will be bad. This is because BLAS also utilizes all cache, | |||
| unexpected re-schedule for different core may result of heavy | |||
| performance loss. | |||
| Anyway, if you see any weird performance loss, it means your code or | |||
| algorithm is not optimal. | |||
| @@ -0,0 +1,230 @@ | |||
| TOPDIR = . | |||
| include ./Makefile.system | |||
| BLASDIRS = interface driver/level2 driver/level3 driver/others | |||
| ifndef DYNAMIC_ARCH | |||
| BLASDIRS += kernel | |||
| endif | |||
| ifdef SANITY_CHECK | |||
| BLASDIRS += reference | |||
| endif | |||
| SUBDIRS = $(BLASDIRS) lapack | |||
| SUBDIRS_ALL = $(SUBDIRS) test ctest exports benchmark ../laswp ../bench | |||
| .PHONY : all libs netlib test ctest shared | |||
| .NOTPARALLEL : all libs prof lapack-test | |||
| all :: libs netlib tests shared | |||
| @echo | |||
| @echo " GotoBLAS build complete." | |||
| @echo | |||
| @echo " OS ... $(OSNAME) " | |||
| @echo " Architecture ... $(ARCH) " | |||
| ifndef BINARY64 | |||
| @echo " BINARY ... 32bit " | |||
| else | |||
| @echo " BINARY ... 64bit " | |||
| endif | |||
| @echo " C compiler ... $(C_COMPILER) (command line : $(CC))" | |||
| @echo " Fortran compiler ... $(F_COMPILER) (command line : $(FC))" | |||
| ifneq ($(OSNAME), AIX) | |||
| @echo -n " Library Name ... $(LIBNAME)" | |||
| else | |||
| @echo " Library Name ... $(LIBNAME)" | |||
| endif | |||
| ifndef SMP | |||
| @echo " (Single threaded) " | |||
| else | |||
| @echo " (Multi threaded; Max num-threads is $(NUM_THREADS))" | |||
| endif | |||
| @echo | |||
| shared : | |||
| ifeq ($(OSNAME), Linux) | |||
| $(MAKE) -C exports so | |||
| -ln -fs $(LIBSONAME) libgoto2.so | |||
| endif | |||
| ifeq ($(OSNAME), FreeBSD) | |||
| $(MAKE) -C exports so | |||
| -ln -fs $(LIBSONAME) libgoto2.so | |||
| endif | |||
| ifeq ($(OSNAME), NetBSD) | |||
| $(MAKE) -C exports so | |||
| -ln -fs $(LIBSONAME) libgoto2.so | |||
| endif | |||
| ifeq ($(OSNAME), Darwin) | |||
| $(MAKE) -C exports dyn | |||
| -ln -fs $(LIBDYNNAME) libgoto2.dylib | |||
| endif | |||
| ifeq ($(OSNAME), WINNT) | |||
| $(MAKE) -C exports dll | |||
| # -ln -fs $(LIBDLLNAME) libgoto2.dll | |||
| endif | |||
| ifeq ($(OSNAME), CYGWIN_NT) | |||
| $(MAKE) -C exports dll | |||
| -ln -fs $(LIBDLLNAME) libgoto2.dll | |||
| endif | |||
| tests : | |||
| ifndef NOFORTRAN | |||
| ifndef TARGET | |||
| ifndef CROSS | |||
| touch $(LIBNAME) | |||
| ifndef NO_FBLAS | |||
| $(MAKE) -C test all | |||
| endif | |||
| ifndef NO_CBLAS | |||
| $(MAKE) -C ctest all | |||
| endif | |||
| endif | |||
| endif | |||
| endif | |||
| libs : | |||
| -ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX) | |||
| for d in $(SUBDIRS) ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d $(@F) || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| ifdef DYNAMIC_ARCH | |||
| $(MAKE) -C kernel commonlibs || exit 1 | |||
| for d in $(DYNAMIC_CORE) ; \ | |||
| do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\ | |||
| done | |||
| endif | |||
| prof : prof_blas prof_lapack | |||
| prof_blas : | |||
| ln -fs $(LIBNAME_P) libgoto2_p.$(LIBSUFFIX) | |||
| for d in $(SUBDIRS) ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d prof || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| ifdef DYNAMIC_ARCH | |||
| $(MAKE) -C kernel commonprof || exit 1 | |||
| endif | |||
| blas : | |||
| ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX) | |||
| for d in $(BLASDIRS) ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d libs || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| hpl : | |||
| ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX) | |||
| for d in $(BLASDIRS) ../laswp exports ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d $(@F) || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| ifdef DYNAMIC_ARCH | |||
| $(MAKE) -C kernel commonlibs || exit 1 | |||
| for d in $(DYNAMIC_CORE) ; \ | |||
| do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\ | |||
| done | |||
| endif | |||
| hpl_p : | |||
| ln -fs $(LIBNAME_P) libgoto2_p.$(LIBSUFFIX) | |||
| for d in $(SUBDIRS) ../laswp exports ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d $(@F) || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| netlib : lapack-3.1.1 patch.for_lapack-3.1.1 lapack-3.1.1/make.inc | |||
| ifndef NOFORTRAN | |||
| -@$(MAKE) -C lapack-3.1.1 lapacklib | |||
| endif | |||
| prof_lapack : lapack-3.1.1 lapack-3.1.1/make.inc | |||
| -@$(MAKE) -C lapack-3.1.1 lapack_prof | |||
| lapack-3.1.1/make.inc : | |||
| ifndef NOFORTRAN | |||
| -@echo "FORTRAN = $(FC)" > lapack-3.1.1/make.inc | |||
| -@echo "OPTS = $(FFLAGS)" >> lapack-3.1.1/make.inc | |||
| -@echo "POPTS = $(FPFLAGS)" >> lapack-3.1.1/make.inc | |||
| -@echo "NOOPT = $(FFLAGS) -O0" >> lapack-3.1.1/make.inc | |||
| -@echo "PNOOPT = $(FPFLAGS) -O0" >> lapack-3.1.1/make.inc | |||
| -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> lapack-3.1.1/make.inc | |||
| -@echo "ARCH = $(AR)" >> lapack-3.1.1/make.inc | |||
| -@echo "RANLIB = $(RANLIB)" >> lapack-3.1.1/make.inc | |||
| -@echo "LAPACKLIB = ../$(LIBNAME)" >> lapack-3.1.1/make.inc | |||
| -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> lapack-3.1.1/make.inc | |||
| -@echo "SUFFIX = $(SUFFIX)" >> lapack-3.1.1/make.inc | |||
| -@echo "PSUFFIX = $(PSUFFIX)" >> lapack-3.1.1/make.inc | |||
| # -@echo "CEXTRALIB = $(CEXTRALIB)" >> lapack-3.1.1/make.inc | |||
| -@cat make.inc >> lapack-3.1.1/make.inc | |||
| endif | |||
| lapack-3.1.1 : lapack-3.1.1.tgz | |||
| ifndef NOFORTRAN | |||
| @if test `$(MD5SUM) lapack-3.1.1.tgz | $(AWK) '{print $$1}'` = 00b21551a899bcfbaa7b8443e1faeef9; then \ | |||
| echo $(TAR) zxf $< ;\ | |||
| $(TAR) zxf $< && (cd lapack-3.1.1; $(PATCH) -p1 < ../patch.for_lapack-3.1.1) ;\ | |||
| else \ | |||
| echo " lapack-3.1.1.tgz check sum is wrong (Please use orignal)." ;\ | |||
| rm -rf lapack-3.1.1 ;\ | |||
| fi | |||
| endif | |||
| lapack-3.1.1.tgz : | |||
| ifndef NOFORTRAN | |||
| -wget http://www.netlib.org/lapack/lapack-3.1.1.tgz | |||
| endif | |||
| large.tgz : | |||
| ifndef NOFORTRAN | |||
| -wget http://www.netlib.org/lapack/timing/large.tgz | |||
| endif | |||
| timing.tgz : | |||
| ifndef NOFORTRAN | |||
| -wget http://www.netlib.org/lapack/timing/timing.tgz | |||
| endif | |||
| lapack-timing : lapack-3.1.1 large.tgz timing.tgz | |||
| ifndef NOFORTRAN | |||
| (cd lapack-3.1.1; $(TAR) zxf ../timing.tgz TIMING) | |||
| (cd lapack-3.1.1/TIMING; $(TAR) zxf ../../large.tgz ) | |||
| make -C lapack-3.1.1 tmglib | |||
| make -C lapack-3.1.1/TIMING | |||
| endif | |||
| lapack-test : | |||
| $(MAKE) -C lapack-3.1.1 tmglib | |||
| $(MAKE) -C lapack-3.1.1/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintsts xlintstz xlintstzc | |||
| @rm -f lapack-3.1.1/TESTING/*.out | |||
| $(MAKE) -j 1 -C lapack-3.1.1/TESTING | |||
| $(GREP) failed lapack-3.1.1/TESTING/*.out | |||
| dummy : | |||
| clean :: | |||
| @for d in $(SUBDIRS_ALL) ; \ | |||
| do if test -d $$d; then \ | |||
| $(MAKE) -C $$d $(@F) || exit 1 ; \ | |||
| fi; \ | |||
| done | |||
| ifdef DYNAMIC_ARCH | |||
| @$(MAKE) -C kernel clean | |||
| endif | |||
| @rm -f *.$(LIBSUFFIX) *.so *~ *.exe getarch getarch_2nd *.dll *.lib *.$(SUFFIX) *.dwf libgoto2.$(LIBSUFFIX) libgoto2_p.$(LIBSUFFIX) *.lnk myconfig.h | |||
| @rm -f Makefile.conf config.h Makefile_kernel.conf config_kernel.h st* *.dylib | |||
| @if test -d lapack-3.1.1; then \ | |||
| echo deleting lapack-3.1.1; \ | |||
| rm -rf lapack-3.1.1 ;\ | |||
| fi | |||
| @echo Done. | |||
| @@ -0,0 +1,57 @@ | |||
| CPP = $(CC) -E | |||
| RANLIB = ranlib | |||
| ifeq ($(LIBSUBARCH), EV4) | |||
| LIBNAME = $(LIBPREFIX)_ev4.a | |||
| LIBNAME_P = $(LIBPREFIX)_ev4_p.a | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV5) | |||
| LIBNAME = $(LIBPREFIX)_ev5.a | |||
| LIBNAME_P = $(LIBPREFIX)_ev5_p.a | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV6) | |||
| LIBNAME = $(LIBPREFIX)_ev6.a | |||
| LIBNAME_P = $(LIBPREFIX)_ev6_p.a | |||
| endif | |||
| ifneq ($(COMPILER), NATIVE) | |||
| # GCC User | |||
| ifeq ($(LIBSUBARCH), EV4) | |||
| OPTION += -DEV4 -mcpu=ev4 | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV5) | |||
| OPTION += -DEV5 -mcpu=ev5 | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV6) | |||
| OPTION += -DEV6 -mcpu=ev6 | |||
| endif | |||
| else | |||
| # Compaq Compiler User | |||
| ifeq ($(LIBSUBARCH), EV4) | |||
| OPTION += -DEV4 -tune ev4 -arch ev4 | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV5) | |||
| OPTION += -DEV5 -tune ev5 -arch ev5 | |||
| endif | |||
| ifeq ($(LIBSUBARCH), EV6) | |||
| OPTION += -DEV6 -tune ev6 -arch ev6 | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| FCOMMON_OPT += -mieee | |||
| endif | |||
| ifeq ($(F_COMPILER), G77) | |||
| FCOMMON_OPT += -mieee | |||
| endif | |||
| ifndef SMP | |||
| LIBCXML = -lcxml -lots -lm | |||
| LIBATLAS = -L/usr/lib/atlas3.7.8 -lf77blas -latlas -lm | |||
| else | |||
| LIBCXML = -lcxmlp -lots -lm | |||
| LIBATLAS = -L/usr/lib/atlas3.7.8p -llapack -lptcblas -lptf77blas -latlas -lpthread -lm | |||
| endif | |||
| @@ -0,0 +1,6 @@ | |||
| COPT = -Wall -O2 # -DGEMMTEST | |||
| ifdef BINARY64 | |||
| else | |||
| # LDFLAGS = -m elf32ppc | |||
| LDFLAGS = -m elf_i386 | |||
| endif | |||
| @@ -0,0 +1,39 @@ | |||
| export BINARY | |||
| export USE_OPENMP | |||
| ifdef TARGET_CORE | |||
| TARGET_MAKE = Makefile_kernel.conf | |||
| TARGET_CONF = config_kernel.h | |||
| else | |||
| TARGET_MAKE = Makefile.conf | |||
| TARGET_CONF = config.h | |||
| endif | |||
| # CPUIDEMU = ../../cpuid/table.o | |||
| ifdef CPUIDEMU | |||
| EXFLAGS = -DCPUIDEMU -DVENDOR=99 | |||
| endif | |||
| all: getarch_2nd | |||
| ./getarch_2nd 0 >> $(TARGET_MAKE) | |||
| ./getarch_2nd 1 >> $(TARGET_CONF) | |||
| config.h : c_check f_check getarch | |||
| perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) | |||
| perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) | |||
| ./getarch 0 >> $(TARGET_MAKE) | |||
| ./getarch 1 >> $(TARGET_CONF) | |||
| getarch : getarch.c cpuid.S dummy $(CPUIDEMU) | |||
| $(HOSTCC) $(CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU) | |||
| getarch_2nd : getarch_2nd.c config.h dummy | |||
| ifndef TARGET_CORE | |||
| $(HOSTCC) -I. $(CFLAGS) -o $(@F) getarch_2nd.c | |||
| else | |||
| $(HOSTCC) -I. $(CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c | |||
| endif | |||
| dummy: | |||
| @@ -0,0 +1,22 @@ | |||
| CCOMMON_COPT += # -DUSE64BITINT # -DGEMMTEST | |||
| # CCOMMON_OPT += -DPARAMTEST | |||
| FLAMEPATH = $(HOME)/flame/lib/ia64 | |||
| ifndef SMP | |||
| LIBMKL = -L$(MKLPATH)/64 -Wl,-rpath,$(MKLPATH)/64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lguide -lpthread -lm | |||
| else | |||
| LIBMKL = -L$(MKLPATH)/64 -Wl,-rpath,$(MKLPATH)/64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread -lm | |||
| endif | |||
| LIBFLAME = -L$(FLAMEPATH) -llapack2flame -lflame $(TOPDIR)/$(LIBNAME) -lgfortran -lpthread -lm | |||
| LIBMLIB = ../../level1/others/libmisc.a -L/opt/intel/fc/ia64/9.1.040/lib -L/opt/mlib/lib \ | |||
| -llapack -lguide -lifcore -lm -lpthread | |||
| LIBSCSL = -L/opt/scsl/1.4.1.0/lib -Wl,-rpath,/opt/scsl/1.4.1.0/lib -lscs | |||
| ifndef SMP | |||
| LIBATLAS = -L/usr/lib/atlas3.6.0 -lf77blas -latlas -lm | |||
| else | |||
| LIBATLAS = -L$(HOME)/misc/lib -L/usr/lib/atlas3.6.0p -llapack -lptcblas -lptf77blas -latlas -lpthread -lm | |||
| endif | |||
| @@ -0,0 +1,3 @@ | |||
| ifdef BINARY64 | |||
| else | |||
| endif | |||
| @@ -0,0 +1,93 @@ | |||
| # CCOMMON_OPT += -DALLOC_SHM | |||
| FLAMEPATH = $(HOME)/flame/lib | |||
| #ifeq ($(CORE), CELL) | |||
| #CELL_SDK_ROOT = /opt/IBM/cell-sdk-1.1/sysroot/usr | |||
| #SPU_CC = spu-gcc | |||
| #EXTRALIB += -lspe | |||
| #endif | |||
| ifeq ($(OSNAME), Linux) | |||
| ifdef BINARY64 | |||
| # COMPILER_PREFIX = powerpc64-linux- | |||
| else | |||
| # COMPILER_PREFIX = powerpc-linux- | |||
| endif | |||
| endif | |||
| ifdef BINARY64 | |||
| ifeq ($(OSNAME), Linux) | |||
| LDFLAGS = -m elf64ppc | |||
| endif | |||
| ifeq ($(OSNAME), Darwin) | |||
| LDFLAGS = -arch ppc64 | |||
| endif | |||
| ifeq ($(OSNAME), AIX) | |||
| CCOMMON_OPT += -mpowerpc64 -maix64 | |||
| ifeq ($(COMPILER_F77), g77) | |||
| FCOMMON_OPT += -mpowerpc64 -maix64 | |||
| endif | |||
| ifeq ($(COMPILER_F77), xlf) | |||
| FCOMMON_OPT += -q64 | |||
| endif | |||
| ARFLAGS = -X 64 | |||
| LDFLAGS = -b64 | |||
| ASFLAGS = -a64 | |||
| endif | |||
| else | |||
| ifeq ($(OSNAME), Linux) | |||
| LDFLAGS = -m elf32ppc | |||
| endif | |||
| ifeq ($(OSNAME), AIX) | |||
| CCOMMON_OPT += -Wa,-a32 | |||
| ARFLAGS = -X 32 | |||
| LDFLAGS = -b32 | |||
| ASFLAGS = -a32 | |||
| endif | |||
| endif | |||
| # CCOMMON_OPT += -maltivec -mabi=altivec | |||
| LIBFLAME = -L$(FLAMEPATH) -llapack2flame -lflame-lapack -lflame-base $(LIBS) | |||
| ifeq ($(OSNAME), Darwin) | |||
| CCOMMON_OPT += -force_cpusubtype_ALL | |||
| endif | |||
| ifndef BINARY64 | |||
| ifeq ($(OSNAME), Linux) | |||
| ESSLPATH = -L/opt/ibmcmp/lib -L/opt/ibmcmp/xlf/11.1/lib -Wl,-rpath,/opt/ibmcmp/lib -Wl,-rpath,/opt/ibmcmp/xlf/11.1/lib -lxlf90_r -lxlomp_ser -lxlfmath -lxl -lpthread | |||
| else | |||
| ESSLPATH = -lxlf90_r | |||
| endif | |||
| LIBVECLIB = -framework VecLib | |||
| ifndef SMP | |||
| LIBATLAS = -L/usr/lib/atlas3.7.11 -lf77blas -latlas -lg2c -lm | |||
| LIBESSL = -lessl $(ESSLPATH) ../../level1/others/libmisc.a -lm | |||
| else | |||
| LIBATLAS = -L/usr/lib/atlas3.7.11p -lptf77blas -latlas -lm -lpthread | |||
| LIBESSL = -lesslsmp $(ESSLPATH) ../../level1/others/libmisc.a -lm | |||
| endif | |||
| else | |||
| ifeq ($(OSNAME), Linux) | |||
| ESSLPATH = -L/opt/ibmcmp/lib64 -Wl,-rpath,/opt/ibmcmp/lib64 -L/opt/ibmcmp/xlf/11.1/lib64 -Wl,-rpath,/opt/ibmcmp/xlf/11.1/lib64 -lxlf90_r -lxlomp_ser | |||
| else | |||
| ESSLPATH = -lxlf90_r | |||
| endif | |||
| LIBVECLIB = /System/Library/Frameworks/vecLib.framework/Versions/Current/vecLib | |||
| ifndef SMP | |||
| LIBATLAS = -L/usr/lib64/atlas3.7.11 -lf77blas -latlas -lg2c -lm | |||
| LIBESSL = -lessl $(ESSLPATH) -lm | |||
| else | |||
| LIBATLAS = -L/usr/lib64/atlas3.7.11p -lptf77blas -latlas -lm -lpthread | |||
| LIBESSL = -lesslsmp $(ESSLPATH) -lxlsmp -lm | |||
| endif | |||
| endif | |||
| @@ -0,0 +1,95 @@ | |||
| # | |||
| # Beginning of user configuration | |||
| # | |||
| # This library's version | |||
| VERSION = 1.13 | |||
| # You can specify the target architecture, otherwise it's | |||
| # automatically detected. | |||
| # TARGET = PENRYN | |||
| # If you want to support multiple architecture in one binary | |||
| # DYNAMIC_ARCH = 1 | |||
| # C compiler including binary type(32bit / 64bit). Default is gcc. | |||
| # Don't use Intel Compiler or PGI, it won't generate right codes as I expect. | |||
| # CC = gcc | |||
| # Fortran compiler. Default is g77. | |||
| # FC = gfortran | |||
| # Even you can specify cross compiler | |||
| # CC = x86_64-w64-mingw32-gcc | |||
| # FC = x86_64-w64-mingw32-gfortran | |||
| # If you need 32bit binary, define BINARY=32, otherwise define BINARY=64 | |||
| # BINARY=64 | |||
| # About threaded BLAS. It will be automatically detected if you don't | |||
| # specify it. | |||
| # For force setting for single threaded, specify USE_THREAD = 0 | |||
| # For force setting for multi threaded, specify USE_THREAD = 1 | |||
| # USE_THREAD = 0 | |||
| # If you're going to use this library with OpenMP, please comment it in. | |||
| # USE_OPENMP = 1 | |||
| # You can define maximum number of threads. Basically it should be | |||
| # less than actual number of cores. If you don't specify one, it's | |||
| # automatically detected by the the script. | |||
| # NUM_THREADS = 24 | |||
| # If you don't need CBLAS interface, please comment it in. | |||
| # NO_CBLAS = 1 | |||
| # If you want to use legacy threaded Level 3 implementation. | |||
| # USE_SIMPLE_THREADED_LEVEL3 = 1 | |||
| # If you want to drive whole 64bit region by BLAS. Not all Fortran | |||
| # compiler supports this. It's safe to keep comment it out if you | |||
| # are not sure(equivalent to "-i8" option). | |||
| # INTERFACE64 = 1 | |||
| # 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 | |||
| # If you want to disable CPU/Memory affinity on Linux. | |||
| # NO_AFFINITY = 1 | |||
| # If you would like to know minute performance report of GotoBLAS. | |||
| # FUNCTION_PROFILE = 1 | |||
| # Support for IEEE quad precision(it's *real* REAL*16)( under testing) | |||
| # QUAD_PRECISION = 1 | |||
| # Theads are still working for a while after finishing BLAS operation | |||
| # to reduce thread activate/deactivate overhead. You can determine | |||
| # time out to improve performance. This number should be from 4 to 30 | |||
| # which corresponds to (1 << n) cycles. For example, if you set to 26, | |||
| # thread will be running for (1 << 26) cycles(about 25ms on 3.0GHz | |||
| # system). Also you can control this mumber by GOTO_THREAD_TIMEOUT | |||
| # CCOMMON_OPT += -DTHREAD_TIMEOUT=26 | |||
| # Using special device driver for mapping physically contigous memory | |||
| # to the user space. If bigphysarea is enabled, it will use it. | |||
| # DEVICEDRIVER_ALLOCATION = 1 | |||
| # If you need to synchronize FP CSR between threads (for x86/x86_64 only). | |||
| # CONSISTENT_FPCSR = 1 | |||
| # If you need santy check by comparing reference BLAS. It'll be very | |||
| # slow (Not implemented yet). | |||
| # SANITY_CHECK = 1 | |||
| # Common Optimization Flag; -O2 is enough. | |||
| COMMON_OPT += -O2 | |||
| # Profiling flags | |||
| COMMON_PROF = -pg | |||
| # | |||
| # End of user configuration | |||
| # | |||
| @@ -0,0 +1,41 @@ | |||
| CPP = $(CC) -E | |||
| RANLIB = ranlib | |||
| ifdef BINARY64 | |||
| CCOMMON_OPT += -mcpu=v9 -m64 | |||
| ifeq ($(COMPILER_F77), g77) | |||
| FCOMMON_OPT += -mcpu=v9 -m64 | |||
| endif | |||
| ifeq ($(COMPILER_F77), f90) | |||
| FCOMMON_OPT += -xarch=v9 | |||
| endif | |||
| LDFLAGS = -64 | |||
| else | |||
| CCOMMON_OPT += -mcpu=v9 | |||
| ifeq ($(COMPILER_F77), g77) | |||
| FCOMMON_OPT += -mcpu=v9 | |||
| endif | |||
| ifeq ($(COMPILER_F77), f90) | |||
| FCOMMON_OPT += -xarch=v8plusb | |||
| endif | |||
| endif | |||
| LIBNAME = $(LIBPREFIX).a | |||
| ifndef SMP | |||
| LIBCXML = -L/opt/SUNWspro/lib/v9 | |||
| LIBATLAS = -L$(HOME)/misc/lib -lf77blas -latlas -lm | |||
| else | |||
| LIBCXML = -lcxmlp -lots -lm | |||
| endif | |||
| ifdef BINARY64 | |||
| LIBSUNPERF = -L/opt/SUNWspro/lib/v9 -L/opt/SUNWspro/prod/lib/v9 \ | |||
| -Wl,-R,/opt/SUNWspro/lib/v9 -lsunperf -lompstubs -lfui -lfsu -lsunmath | |||
| else | |||
| LIBSUNPERF = -L/opt/SUNWspro/lib -L/opt/SUNWspro/prod/lib \ | |||
| -Wl,-R,/opt/SUNWspro/lib -lsunperf -lompstubs -lfui -lfsu -lsunmath | |||
| endif | |||
| @@ -0,0 +1,753 @@ | |||
| # | |||
| # Include user definition | |||
| # | |||
| # TO suppress recursive includes | |||
| INCLUDED = 1 | |||
| ifndef TOPDIR | |||
| TOPDIR = . | |||
| endif | |||
| # Default C compiler | |||
| CC = gcc | |||
| ifndef MAKEFILE_RULE | |||
| include $(TOPDIR)/Makefile.rule | |||
| else | |||
| include $(TOPDIR)/$(MAKEFILE_RULE) | |||
| endif | |||
| # | |||
| # Beginning of system configuration | |||
| # | |||
| ifndef HOSTCC | |||
| HOSTCC = $(CC) | |||
| endif | |||
| ifdef TARGET | |||
| GETARCH_FLAGS += -DFORCE_$(TARGET) | |||
| endif | |||
| # This operation is expensive, so execution should be once. | |||
| ifndef GOTOBLAS_MAKEFILE | |||
| export GOTOBLAS_MAKEFILE = 1 | |||
| # Generating Makefile.conf and config.h | |||
| DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.getarch CC="$(CC)" FC="$(FC)" HOSTCC="$(HOSTCC)" CFLAGS=$(GETARCH_FLAGS) BINARY=$(BINARY) USE_OPENMP=$(USE_OPENMP) TARGET_CORE=$(TARGET_CORE) all) | |||
| ifndef TARGET_CORE | |||
| include $(TOPDIR)/Makefile.conf | |||
| else | |||
| include $(TOPDIR)/Makefile_kernel.conf | |||
| endif | |||
| endif | |||
| ifndef NUM_THREADS | |||
| NUM_THREADS = $(NUM_CORES) | |||
| endif | |||
| ifeq ($(NUM_THREADS), 1) | |||
| override USE_THREAD = 0 | |||
| endif | |||
| ifdef USE_THREAD | |||
| ifeq ($(USE_THREAD), 0) | |||
| SMP = | |||
| else | |||
| SMP = 1 | |||
| endif | |||
| else | |||
| ifeq ($(NUM_THREAD), 1) | |||
| SMP = | |||
| else | |||
| SMP = 1 | |||
| endif | |||
| endif | |||
| ifndef NEED_PIC | |||
| NEED_PIC = 1 | |||
| endif | |||
| ARFLAGS = | |||
| CPP = $(COMPILER) -E | |||
| AR = $(CROSS_SUFFIX)ar | |||
| AS = $(CROSS_SUFFIX)as | |||
| LD = $(CROSS_SUFFIX)ld | |||
| RANLIB = $(CROSS_SUFFIX)ranlib | |||
| NM = $(CROSS_SUFFIX)nm | |||
| DLLWRAP = $(CROSS_SUFFIX)dllwrap | |||
| # | |||
| # OS dependent settings | |||
| # | |||
| ifeq ($(OSNAME), Darwin) | |||
| EXTRALIB += -lSystemStubs | |||
| export MACOSX_DEPLOYMENT_TARGET=10.2 | |||
| endif | |||
| ifeq ($(OSNAME), Linux) | |||
| EXTRALIB += -lm | |||
| endif | |||
| ifeq ($(OSNAME), AIX) | |||
| EXTRALIB += -lm | |||
| endif | |||
| ifeq ($(OSNAME), WINNT) | |||
| NEED_PIC = 0 | |||
| NO_EXPRECISION = 1 | |||
| EXTRALIB += -defaultlib:advapi32 | |||
| SUFFIX = obj | |||
| PSUFFIX = pobj | |||
| LIBSUFFIX = lib | |||
| endif | |||
| ifeq ($(OSNAME), Interix) | |||
| NEED_PIC = 0 | |||
| NO_EXPRECISION = 1 | |||
| INTERIX_TOOL_DIR = /opt/gcc.3.3/i586-pc-interix3/bin | |||
| endif | |||
| ifeq ($(OSNAME), CYGWIN_NT) | |||
| NEED_PIC = 0 | |||
| NO_EXPRECISION = 1 | |||
| endif | |||
| ifneq ($(OSNAME), WINNT) | |||
| ifneq ($(OSNAME), CYGWIN_NT) | |||
| ifneq ($(OSNAME), Interix) | |||
| ifdef SMP | |||
| EXTRALIB += -lpthread | |||
| endif | |||
| endif | |||
| endif | |||
| endif | |||
| ifdef QUAD_PRECISION | |||
| CCOMMON_OPT += -DQUAD_PRECISION | |||
| NO_EXPRECISION = 1 | |||
| endif | |||
| ifneq ($(ARCH), x86) | |||
| ifneq ($(ARCH), x86_64) | |||
| NO_EXPRECISION = 1 | |||
| endif | |||
| endif | |||
| ifdef SANITY_CHECK | |||
| CCOMMON_OPT += -DSANITY_CHECK -DREFNAME=$(*F)f$(BU) | |||
| endif | |||
| # | |||
| # Architecture dependent settings | |||
| # | |||
| ifeq ($(ARCH), x86) | |||
| ifndef BINARY | |||
| NO_BINARY_MODE = 1 | |||
| endif | |||
| ifndef NO_EXPRECISION | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| ifeq ($(C_COMPILER), GCC) | |||
| EXPRECISION = 1 | |||
| CCOMMON_OPT += -DEXPRECISION -m128bit-long-double | |||
| FCOMMON_OPT += -m128bit-long-double | |||
| endif | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(ARCH), x86_64) | |||
| ifndef NO_EXPRECISION | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| ifeq ($(C_COMPILER), GCC) | |||
| EXPRECISION = 1 | |||
| CCOMMON_OPT += -DEXPRECISION -m128bit-long-double | |||
| FCOMMON_OPT += -m128bit-long-double | |||
| endif | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(C_COMPILER), INTEL) | |||
| CCOMMON_OPT += -wd981 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| ifeq ($(C_COMPILER), GCC) | |||
| CCOMMON_OPT += -fopenmp | |||
| endif | |||
| ifeq ($(C_COMPILER), INTEL) | |||
| CCOMMON_OPT += -openmp | |||
| endif | |||
| ifeq ($(C_COMPILER), PGI) | |||
| CCOMMON_OPT += -mp | |||
| endif | |||
| ifeq ($(C_COMPILER), OPEN64) | |||
| CCOMMON_OPT += -mp | |||
| CEXTRALIB += -lstdc++ | |||
| endif | |||
| ifeq ($(C_COMPILER), PATHSCALE) | |||
| CCOMMON_OPT += -mp | |||
| endif | |||
| endif | |||
| ifdef DYNAMIC_ARCH | |||
| ifeq ($(ARCH), x86) | |||
| DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \ | |||
| CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELONA ATOM NANO | |||
| endif | |||
| ifeq ($(ARCH), x86_64) | |||
| DYNAMIC_CORE = PRESCOTT CORE2 PENRYN DUNNINGTON NEHALEM OPTERON OPTERON_SSE3 BARCELONA ATOM NANO | |||
| endif | |||
| ifndef DYNAMIC_CORE | |||
| DYNAMIC_ARCH = | |||
| endif | |||
| endif | |||
| ifeq ($(ARCH), ia64) | |||
| NO_BINARY_MODE = 1 | |||
| BINARY_DEFINED = 1 | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| ifeq ($(C_COMPILER), GCC) | |||
| # EXPRECISION = 1 | |||
| # CCOMMON_OPT += -DEXPRECISION | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(ARCH), mips64) | |||
| NO_BINARY_MODE = 1 | |||
| endif | |||
| ifeq ($(ARCH), alpha) | |||
| NO_BINARY_MODE = 1 | |||
| BINARY_DEFINED = 1 | |||
| endif | |||
| # | |||
| # C Compiler dependent settings | |||
| # | |||
| ifeq ($(C_COMPILER), GCC) | |||
| CCOMMON_OPT += -Wall | |||
| COMMON_PROF += -fno-inline | |||
| NO_UNINITIALIZED_WARN = -Wno-uninitialized | |||
| ifdef NO_BINARY_MODE | |||
| ifeq ($(ARCH), mips64) | |||
| ifdef BINARY64 | |||
| CCOMMON_OPT += -mabi=64 | |||
| else | |||
| CCOMMON_OPT += -mabi=n32 | |||
| endif | |||
| BINARY_DEFINED = 1 | |||
| endif | |||
| ifeq ($(OSNAME), AIX) | |||
| BINARY_DEFINED = 1 | |||
| endif | |||
| endif | |||
| ifndef BINARY_DEFINED | |||
| ifdef BINARY64 | |||
| CCOMMON_OPT += -m64 | |||
| else | |||
| CCOMMON_OPT += -m32 | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(C_COMPILER), PGI) | |||
| ifdef BINARY64 | |||
| CCOMMON_OPT += -tp p7-64 | |||
| else | |||
| CCOMMON_OPT += -tp p7 | |||
| endif | |||
| endif | |||
| ifeq ($(C_COMPILER), PATHSCALE) | |||
| ifdef BINARY64 | |||
| CCOMMON_OPT += -m64 | |||
| else | |||
| CCOMMON_OPT += -m32 | |||
| endif | |||
| endif | |||
| # | |||
| # Fortran Compiler dependent settings | |||
| # | |||
| ifeq ($(F_COMPILER), G77) | |||
| CCOMMON_OPT += -DF_INTERFACE_G77 | |||
| FCOMMON_OPT += -Wall | |||
| ifndef NO_BINARY_MODE | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -m64 | |||
| else | |||
| FCOMMON_OPT += -m32 | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), G95) | |||
| CCOMMON_OPT += -DF_INTERFACE_G95 | |||
| FCOMMON_OPT += -Wall | |||
| ifndef NO_BINARY_MODE | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -m64 | |||
| else | |||
| FCOMMON_OPT += -m32 | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| CCOMMON_OPT += -DF_INTERFACE_GFORT | |||
| FCOMMON_OPT += -Wall | |||
| ifdef NO_BINARY_MODE | |||
| ifeq ($(ARCH), mips64) | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -mabi=64 | |||
| else | |||
| FCOMMON_OPT += -mabi=n32 | |||
| endif | |||
| endif | |||
| else | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -m64 | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -fdefault-integer-8 | |||
| endif | |||
| else | |||
| FCOMMON_OPT += -m32 | |||
| endif | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -fopenmp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), INTEL) | |||
| CCOMMON_OPT += -DF_INTERFACE_INTEL | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -i8 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -openmp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), FUJITSU) | |||
| CCOMMON_OPT += -DF_INTERFACE_FUJITSU | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -openmp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), IBM) | |||
| CCOMMON_OPT += -DF_INTERFACE_IBM | |||
| # FCOMMON_OPT += -qarch=440 | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -q64 | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -qintsize=8 | |||
| endif | |||
| else | |||
| FCOMMON_OPT += -q32 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -openmp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), PGI) | |||
| CCOMMON_OPT += -DF_INTERFACE_PGI | |||
| COMMON_PROF += -DPGICOMPILER | |||
| ifdef BINARY64 | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -i8 | |||
| endif | |||
| FCOMMON_OPT += -tp p7-64 | |||
| else | |||
| FCOMMON_OPT += -tp p7 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -mp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), PATHSCALE) | |||
| CCOMMON_OPT += -DF_INTERFACE_PATHSCALE | |||
| ifdef BINARY64 | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -i8 | |||
| endif | |||
| endif | |||
| ifneq ($(ARCH), mips64) | |||
| ifndef BINARY64 | |||
| FCOMMON_OPT += -m32 | |||
| else | |||
| FCOMMON_OPT += -m64 | |||
| endif | |||
| else | |||
| ifdef BINARY64 | |||
| FCOMMON_OPT += -mabi=64 | |||
| else | |||
| FCOMMON_OPT += -mabi=n32 | |||
| endif | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -mp | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), OPEN64) | |||
| CCOMMON_OPT += -DF_INTERFACE_OPEN64 | |||
| ifdef BINARY64 | |||
| ifdef INTERFACE64 | |||
| FCOMMON_OPT += -i8 | |||
| endif | |||
| endif | |||
| ifndef BINARY64 | |||
| FCOMMON_OPT += -m32 | |||
| else | |||
| FCOMMON_OPT += -m64 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FEXTRALIB += -lstdc++ | |||
| FCOMMON_OPT += -mp | |||
| endif | |||
| endif | |||
| ifeq ($(C_COMPILER), OPEN64) | |||
| ifndef BINARY64 | |||
| CCOMMON_OPT += -m32 | |||
| else | |||
| CCOMMON_OPT += -m64 | |||
| endif | |||
| endif | |||
| ifeq ($(C_COMPILER), SUN) | |||
| CCOMMON_OPT += -w | |||
| ifeq ($(ARCH), x86) | |||
| CCOMMON_OPT += -m32 | |||
| else | |||
| FCOMMON_OPT += -m64 | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), SUN) | |||
| CCOMMON_OPT += -DF_INTERFACE_SUN | |||
| ifeq ($(ARCH), x86) | |||
| FCOMMON_OPT += -m32 | |||
| else | |||
| FCOMMON_OPT += -m64 | |||
| endif | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -xopenmp=parallel | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), COMPAQ) | |||
| CCOMMON_OPT += -DF_INTERFACE_COMPAQ | |||
| ifdef USE_OPENMP | |||
| FCOMMON_OPT += -openmp | |||
| endif | |||
| endif | |||
| ifdef BINARY64 | |||
| ifdef INTERFACE64 | |||
| CCOMMON_OPT += -DUSE64BITINT | |||
| endif | |||
| endif | |||
| ifeq ($(NEED_PIC), 1) | |||
| ifeq ($(C_COMPILER), IBM) | |||
| CCOMMON_OPT += -qpic=large | |||
| else | |||
| CCOMMON_OPT += -fPIC | |||
| endif | |||
| ifeq ($(F_COMPILER), SUN) | |||
| FCOMMON_OPT += -pic | |||
| else | |||
| FCOMMON_OPT += -fPIC | |||
| endif | |||
| endif | |||
| ifeq ($(DYNAMIC_ARCH), 1) | |||
| CCOMMON_OPT += -DDYNAMIC_ARCH | |||
| endif | |||
| ifdef SMP | |||
| CCOMMON_OPT += -DSMP_SERVER | |||
| ifeq ($(ARCH), mips64) | |||
| USE_SIMPLE_THREADED_LEVEL3 = 1 | |||
| endif | |||
| ifeq ($(USE_OPENMP), 1) | |||
| # USE_SIMPLE_THREADED_LEVEL3 = 1 | |||
| # NO_AFFINITY = 1 | |||
| CCOMMON_OPT += -DUSE_OPENMP | |||
| endif | |||
| endif | |||
| ifeq ($(NO_WARMUP), 1) | |||
| CCOMMON_OPT += -DNO_WARMUP | |||
| endif | |||
| ifeq ($(CONSISTENT_FPCSR), 1) | |||
| CCOMMON_OPT += -DCONSISTENT_FPCSR | |||
| endif | |||
| # Only for development | |||
| # CCOMMON_OPT += -DPARAMTEST | |||
| # CCOMMON_OPT += -DPREFETCHTEST | |||
| # CCOMMON_OPT += -DNO_SWITCHING | |||
| # USE_PAPI = 1 | |||
| ifdef USE_PAPI | |||
| CCOMMON_OPT += -DUSE_PAPI | |||
| EXTRALIB += -lpapi -lperfctr | |||
| endif | |||
| ifdef DYNAMIC_THREADS | |||
| CCOMMON_OPT += -DDYNAMIC_THREADS | |||
| endif | |||
| CCOMMON_OPT += -DMAX_CPU_NUMBER=$(NUM_THREADS) | |||
| ifdef USE_SIMPLE_THREADED_LEVEL3 | |||
| CCOMMON_OPT += -DUSE_SIMPLE_THREADED_LEVEL3 | |||
| endif | |||
| LIBPREFIX = libgoto2 | |||
| KERNELDIR = $(TOPDIR)/kernel/$(ARCH) | |||
| include $(TOPDIR)/Makefile.$(ARCH) | |||
| CCOMMON_OPT += -DASMNAME=$(FU)$(*F) -DASMFNAME=$(FU)$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\" | |||
| ifeq ($(CORE), PPC440) | |||
| CCOMMON_OPT += -DALLOC_QALLOC | |||
| endif | |||
| ifeq ($(CORE), PPC440FP2) | |||
| STATIC_ALLOCATION = 1 | |||
| endif | |||
| ifneq ($(OSNAME), Linux) | |||
| NO_AFFINITY = 1 | |||
| endif | |||
| ifneq ($(ARCH), x86_64) | |||
| ifneq ($(ARCH), x86) | |||
| NO_AFFINITY = 1 | |||
| endif | |||
| endif | |||
| ifdef NO_AFFINITY | |||
| CCOMMON_OPT += -DNO_AFFINITY | |||
| endif | |||
| ifdef FUNCTION_PROFILE | |||
| CCOMMON_OPT += -DFUNCTION_PROFILE | |||
| endif | |||
| ifdef HUGETLB_ALLOCATION | |||
| CCOMMON_OPT += -DALLOC_HUGETLB | |||
| endif | |||
| ifdef HUGETLBFILE_ALLOCATION | |||
| CCOMMON_OPT += -DALLOC_HUGETLBFILE -DHUGETLB_FILE_NAME=$(HUGETLBFILE_ALLOCATION) | |||
| endif | |||
| ifdef STATIC_ALLOCATION | |||
| CCOMMON_OPT += -DALLOC_STATIC | |||
| endif | |||
| ifdef DEVICEDRIVER_ALLOCATION | |||
| CCOMMON_OPT += -DALLOC_DEVICEDRIVER -DDEVICEDRIVER_NAME=\"/dev/mapper\" | |||
| endif | |||
| ifdef MIXED_MEMORY_ALLOCATION | |||
| CCOMMON_OPT += -DMIXED_MEMORY_ALLOCATION | |||
| endif | |||
| ifeq ($(OSNAME), SunOS) | |||
| TAR = gtar | |||
| PATCH = gpatch | |||
| GREP = ggrep | |||
| else | |||
| TAR = tar | |||
| PATCH = patch | |||
| GREP = grep | |||
| endif | |||
| MD5SUM = md5sum | |||
| AWK = awk | |||
| REVISION = -r$(VERSION) | |||
| CFLAGS = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) | |||
| PFLAGS = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF) | |||
| FFLAGS = $(COMMON_OPT) $(FCOMMON_OPT) | |||
| FPFLAGS = $(COMMON_OPT) $(FCOMMON_OPT) $(COMMON_PROF) | |||
| ifndef SUFFIX | |||
| SUFFIX = o | |||
| endif | |||
| ifndef PSUFFIX | |||
| PSUFFIX = po | |||
| endif | |||
| ifndef LIBSUFFIX | |||
| LIBSUFFIX = a | |||
| endif | |||
| ifndef DYNAMIC_ARCH | |||
| ifndef SMP | |||
| LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX) | |||
| LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX) | |||
| else | |||
| LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX) | |||
| LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX) | |||
| endif | |||
| else | |||
| ifndef SMP | |||
| LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX) | |||
| LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX) | |||
| else | |||
| LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX) | |||
| LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX) | |||
| endif | |||
| endif | |||
| LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so) | |||
| LIBDLLNAME = $(LIBNAME:.$(LIBSUFFIX)=.dll) | |||
| LIBDYNNAME = $(LIBNAME:.$(LIBSUFFIX)=.dylib) | |||
| LIBDEFNAME = $(LIBNAME:.$(LIBSUFFIX)=.def) | |||
| LIBEXPNAME = $(LIBNAME:.$(LIBSUFFIX)=.exp) | |||
| LIBZIPNAME = $(LIBNAME:.$(LIBSUFFIX)=.zip) | |||
| LIBS = $(TOPDIR)/$(LIBNAME) | |||
| LIBS_P = $(TOPDIR)/$(LIBNAME_P) | |||
| export OSNAME | |||
| export ARCH | |||
| export CORE | |||
| export LIBCORE | |||
| export PGCPATH | |||
| export CONFIG | |||
| export CC | |||
| export FC | |||
| export BU | |||
| export FU | |||
| export USE_THREAD | |||
| export NUM_THREADS | |||
| export NUM_CORES | |||
| export SMP | |||
| export MAKEFILE_RULE | |||
| export NEED_PIC | |||
| export BINARY | |||
| export BINARY32 | |||
| export BINARY64 | |||
| export F_COMPILER | |||
| export C_COMPILER | |||
| export USE_OPENMP | |||
| export CROSS | |||
| export CROSS_SUFFIX | |||
| export NOFORTRAN | |||
| export EXTRALIB | |||
| export CEXTRALIB | |||
| export FEXTRALIB | |||
| export HAVE_SSE | |||
| export HAVE_SSE2 | |||
| export HAVE_SSE3 | |||
| export HAVE_SSSE3 | |||
| export HAVE_SSE4_1 | |||
| export HAVE_SSE4_2 | |||
| export HAVE_SSE4A | |||
| export HAVE_SSE5 | |||
| export KERNELDIR | |||
| export FUNCTION_PROFILE | |||
| export TARGET_CORE | |||
| export SGEMM_UNROLL_M | |||
| export SGEMM_UNROLL_N | |||
| export DGEMM_UNROLL_M | |||
| export DGEMM_UNROLL_N | |||
| export QGEMM_UNROLL_M | |||
| export QGEMM_UNROLL_N | |||
| export CGEMM_UNROLL_M | |||
| export CGEMM_UNROLL_N | |||
| export ZGEMM_UNROLL_M | |||
| export ZGEMM_UNROLL_N | |||
| export XGEMM_UNROLL_M | |||
| export XGEMM_UNROLL_N | |||
| ifdef USE_CUDA | |||
| export CUDADIR | |||
| export CUCC | |||
| export CUFLAGS | |||
| export CULIB | |||
| endif | |||
| .SUFFIXES: .$(PSUFFIX) .$(SUFFIX) .f | |||
| .f.$(SUFFIX): | |||
| $(FC) $(FFLAGS) -c $< -o $(@F) | |||
| .f.$(PSUFFIX): | |||
| $(FC) $(FPFLAGS) -pg -c $< -o $(@F) | |||
| ifdef BINARY64 | |||
| PATHSCALEPATH = /opt/pathscale/lib/3.1 | |||
| PGIPATH = /opt/pgi/linux86-64/7.1-5/lib | |||
| else | |||
| PATHSCALEPATH = /opt/pathscale/lib/3.1/32 | |||
| PGIPATH = /opt/pgi/linux86/7.1-5/lib | |||
| endif | |||
| ACMLPATH = /opt/acml/4.3.0 | |||
| ifneq ($(OSNAME), Darwin) | |||
| MKLPATH = /opt/intel/mkl/10.2.2.025/lib | |||
| else | |||
| MKLPATH = /Library/Frameworks/Intel_MKL.framework/Versions/10.0.1.014/lib | |||
| endif | |||
| ATLASPATH = /opt/atlas/3.9.17/opteron | |||
| FLAMEPATH = $(HOME)/flame/lib | |||
| ifneq ($(OSNAME), SunOS) | |||
| SUNPATH = /opt/sunstudio12.1 | |||
| else | |||
| SUNPATH = /opt/SUNWspro | |||
| endif | |||
| @@ -0,0 +1,617 @@ | |||
| SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| CBLASOBJS_P = $(CBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| ZBLASOBJS_P = $(ZBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| XBLASOBJS_P = $(XBLASOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX)) | |||
| BLASOBJS = $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) | |||
| BLASOBJS_P = $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) | |||
| ifdef EXPRECISION | |||
| BLASOBJS += $(QBLASOBJS) $(XBLASOBJS) | |||
| BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P) | |||
| endif | |||
| ifdef QUAD_PRECISION | |||
| BLASOBJS += $(QBLASOBJS) $(XBLASOBJS) | |||
| BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P) | |||
| endif | |||
| $(SBLASOBJS) $(SBLASOBJS_P) : CFLAGS += -UDOUBLE -UCOMPLEX | |||
| $(DBLASOBJS) $(DBLASOBJS_P) : CFLAGS += -DDOUBLE -UCOMPLEX | |||
| $(QBLASOBJS) $(QBLASOBJS_P) : CFLAGS += -DXDOUBLE -UCOMPLEX | |||
| $(CBLASOBJS) $(CBLASOBJS_P) : CFLAGS += -UDOUBLE -DCOMPLEX | |||
| $(ZBLASOBJS) $(ZBLASOBJS_P) : CFLAGS += -DDOUBLE -DCOMPLEX | |||
| $(XBLASOBJS) $(XBLASOBJS_P) : CFLAGS += -DXDOUBLE -DCOMPLEX | |||
| $(SBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| $(DBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| $(QBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| $(CBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| $(ZBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| $(XBLASOBJS_P) : CFLAGS += -DPROFILE $(COMMON_PROF) | |||
| libs :: $(BLASOBJS) $(COMMONOBJS) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^ | |||
| prof :: $(BLASOBJS_P) $(COMMONOBJS_P) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME_P) $^ | |||
| hpl :: $(HPLOBJS) $(COMMONOBJS) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^ | |||
| hpl_p :: $(HPLOBJS_P) $(COMMONOBJS_P) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME_P) $^ | |||
| kernel :: $(BLASOBJS) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^ | |||
| commonlibs :: $(COMMONOBJS) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^ | |||
| commonprof :: $(COMMONOBJS_P) | |||
| $(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME_P) $^ | |||
| quick : | |||
| $(MAKE) -C $(TOPDIR) libs | |||
| bms.$(SUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmd.$(SUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmd-k.$(SUFFIX):bm-k.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| ifdef QUAD_PRECISION | |||
| bmq.$(SUFFIX):bmq.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmx.$(SUFFIX):bmx.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| else | |||
| bmq.$(SUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmx.$(SUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| endif | |||
| bmc.$(SUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| bmz.$(SUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| bmd_nn.$(SUFFIX):bm_special.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -DNN -c $< -o $(@F) | |||
| bmd_nt.$(SUFFIX):bm_special.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -DNT -c $< -o $(@F) | |||
| bmd_tn.$(SUFFIX):bm_special.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -DTN -c $< -o $(@F) | |||
| bmd_tt.$(SUFFIX):bm_special.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -DTT -c $< -o $(@F) | |||
| bm-phy.$(SUFFIX):bm-phy.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bms.$(PSUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -UDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmd.$(PSUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| ifdef QUAD_PRECISION | |||
| bmq.$(PSUFFIX):bmq.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmx.$(PSUFFIX):bmx.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| else | |||
| bmq.$(PSUFFIX):bm.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| bmx.$(PSUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| endif | |||
| bmc.$(PSUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -UDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| bmz.$(PSUFFIX):bmz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(PFLAGS) -DDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| bms : bms.$(SUFFIX) $(SBLASOBJS) $(COMMONOBJS) $(SOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd : bmd.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) -lm | |||
| bmd-k : bmd-k.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) -lm | |||
| bmq : bmq.$(SUFFIX) $(QBLASOBJS) $(COMMONOBJS) $(QOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmc : bmc.$(SUFFIX) $(CBLASOBJS) $(COMMONOBJS) $(COBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) $(FEXTRALIB) | |||
| bmz : bmz.$(SUFFIX) $(ZBLASOBJS) $(COMMONOBJS) $(ZOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmx : bmx.$(SUFFIX) $(XBLASOBJS) $(COMMONOBJS) $(XOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd_nn : bmd_nn.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd_nt : bmd_nt.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd_tn : bmd_tn.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd_tt : bmd_tt.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bm-phy:bm-phy.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmcc : bmcc.$(SUFFIX) $(CBLASOBJS) $(COMMONOBJS) $(COBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmzc : bmzc.$(SUFFIX) $(ZBLASOBJS) $(COMMONOBJS) $(ZOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bms.prof : bms.$(PSUFFIX) $(SBLASOBJS_P) $(COMMONOBJS_P) $(SOBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmd.prof : bmd.$(PSUFFIX) $(DBLASOBJS_P) $(COMMONOBJS_P) $(DOBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmq.prof : bmq.$(PSUFFIX) $(QBLASOBJS_P) $(COMMONOBJS_P) $(QOBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmc.prof : bmc.$(PSUFFIX) $(CBLASOBJS_P) $(COMMONOBJS) $(COBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmz.prof : bmz.$(PSUFFIX) $(ZBLASOBJS_P) $(COMMONOBJS) $(ZOBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bmx.prof : bmz.$(PSUFFIX) $(XBLASOBJS_P) $(COMMONOBJS) $(XOBJS) $(OBJS) $(LIBS_P) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bms.cxml : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBCXML) | |||
| bmd.cxml : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBCXML) | |||
| bmc.cxml : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBCXML) | |||
| bmz.cxml : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBCXML) | |||
| bms.scsl : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSCSL) | |||
| bmd.scsl : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSCSL) | |||
| bmc.scsl : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSCSL) | |||
| bmz.scsl : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSCSL) | |||
| bms.acml : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| bmd.acml : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| bmc.acml : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| bmz.acml : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| bms.sun : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) $(EXTRALIB) $(CEXTRALIB) | |||
| bmd.sun : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) $(EXTRALIB) $(CEXTRALIB) | |||
| bmc.sun : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) $(EXTRALIB) $(CEXTRALIB) | |||
| bmz.sun : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) $(EXTRALIB) $(CEXTRALIB) | |||
| bms.atlas : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| bmd.atlas : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| bmc.atlas : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| bmz.atlas : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| bms.essl : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) $(FCOMMON_OPT) -o $(@F) $^ $(LIBESSL) | |||
| bmd.essl : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) $(CCOMMON_OPT) -o $(@F) $^ $(LIBESSL) | |||
| bmc.essl : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(F77) $(CCOMMON_OPT) -o $(@F) $^ $(LIBESSL) | |||
| bmz.essl : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) $(CCOMMON_OPT) -o $(@F) $^ $(LIBESSL) | |||
| bms.flame : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) | |||
| bmd.flame : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) | |||
| bmc.flame : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) | |||
| bmz.flame : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) | |||
| bms.flame.prof : bms.$(SUFFIX) $(SOBJS) $(OBJS_P) | |||
| $(F77) -o $(@F) $(PFLAGS) $^ $(LIBFLAME) | |||
| bmd.flame.prof : bmd.$(SUFFIX) $(DOBJS) $(OBJS_P) | |||
| $(F77) -o $(@F) $(PFLAGS) $^ $(LIBFLAME) | |||
| bmc.flame.prof : bmc.$(SUFFIX) $(COBJS) $(OBJS_P) | |||
| $(F77) -o $(@F) $(PFLAGS) $^ $(LIBFLAME) | |||
| bmz.flame.prof : bmz.$(SUFFIX) $(ZOBJS) $(OBJS_P) | |||
| $(F77) -o $(@F) $(PFLAGS) $^ $(LIBFLAME) | |||
| bms.mkl : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bmd.mkl : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -static -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bmc.mkl : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bmz.mkl : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bmq.mkl : bmq.$(SUFFIX) $(QOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bms.mkl.prof : bms.$(PSUFFIX) $(SOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(LIBMKL) | |||
| bmd.mkl.prof : bmd.$(PSUFFIX) $(DOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(LIBMKL) | |||
| bmc.mkl.prof : bmc.$(PSUFFIX) $(COBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(LIBMKL) | |||
| bmz.mkl.prof : bmz.$(PSUFFIX) $(ZOBJS) $(OBJS) | |||
| $(CC) -o $(@F) $(PFLAGS) $^ $(LIBMKL) | |||
| bms.mlib : bms.$(SUFFIX) $(SOBJS) $(OBJS) | |||
| $(F77) -o $(@F) $(CFLAGS) $^ $(LIBMLIB) | |||
| bmd.mlib : bmd.$(SUFFIX) $(DOBJS) $(OBJS) | |||
| $(F77) -o $(@F) $(CFLAGS) $^ $(LIBMLIB) | |||
| bmc.mlib : bmc.$(SUFFIX) $(COBJS) $(OBJS) | |||
| $(F77) -o $(@F) $(CFLAGS) $^ $(LIBMLIB) | |||
| bmz.mlib : bmz.$(SUFFIX) $(ZOBJS) $(OBJS) | |||
| $(F77) -o $(@F) $(CFLAGS) $^ $(LIBMLIB) | |||
| bms.veclib : bms.$(SUFFIX) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBVECLIB) | |||
| bmd.veclib : bmd.$(SUFFIX) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBVECLIB) | |||
| bmc.veclib : bmc.$(SUFFIX) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBVECLIB) | |||
| bmz.veclib : bmz.$(SUFFIX) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBVECLIB) | |||
| bms.fuji : bms.$(SUFFIX) $(SOBJS) | |||
| ifndef SMP | |||
| fcc -KV9FMADD -SSL2 -o $(@F) $^ | |||
| else | |||
| fcc -KV9FMADD -SSL2BLAMP -o $(@F) $^ | |||
| endif | |||
| bmd.fuji : bmd.$(SUFFIX) $(DOBJS) | |||
| ifndef SMP | |||
| fcc -KV9FMADD -SSL2 -o $(@F) $^ | |||
| else | |||
| fcc -KV9FMADD -SSL2BLAMP -o $(@F) $^ | |||
| endif | |||
| bmc.fuji : bmc.$(SUFFIX) $(COBJS) | |||
| ifndef SMP | |||
| fcc -KV9FMADD -SSL2 -o $(@F) $^ | |||
| else | |||
| fcc -KV9FMADD -SSL2BLAMP -o $(@F) $^ | |||
| endif | |||
| bmz.fuji : bmz.$(SUFFIX) $(ZOBJS) | |||
| ifndef SMP | |||
| fcc -KV9FMADD -SSL2 -o $(@F) $^ | |||
| else | |||
| fcc -KV9FMADD -SSL2BLAMP -o $(@F) $^ | |||
| endif | |||
| bench: bench.$(SUFFIX) $(BLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| bench.$(SUFFIX): bench.c | |||
| $(CC) -c -o $(@F) $(CFLAGS) $^ | |||
| bench_old: bench_old.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| kbench: kbench.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| prebench: prebench.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| kbench_rank_k: kbench_rank_k.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| smallbench: smallbench.$(SUFFIX) $(BLASOBJS) $(COMMONOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| smallbench.mkl: smallbench.$(SUFFIX) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.sun: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.cxml: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBCXML) | |||
| bench.atlas: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| bench.essl: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBESSL) ../../level1/others/libmisc.$(LIBSUFFIX) | |||
| bench.scsl: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSCSL) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.acml: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -static -o $(@F) $(CFLAGS) $^ $(LIBACML) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.flame: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) $(EXTRALIB) $(CEXTRALIB) | |||
| kbench.mkl: kbench.$(SUFFIX) $(OBJS) | |||
| $(CC) -static -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.mkl: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -static -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bench_old.mkl: bench_old.$(SUFFIX) $(OBJS) | |||
| $(CC) -static -o $(@F) $(CFLAGS) $^ $(LIBMKL) $(EXTRALIB) $(CEXTRALIB) | |||
| bench.mlib: bench.$(SUFFIX) $(OBJS) | |||
| $(F77) -o $(@F) $(CFLAGS) $^ $(LIBMLIB) | |||
| bench.veclib: bench.$(SUFFIX) $(OBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBVECLIB) | |||
| params : params.$(SUFFIX) $(SBLASOBJS) $(COMMONOBJS) $(SOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramd : paramd.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramq : paramq.$(SUFFIX) $(QBLASOBJS) $(COMMONOBJS) $(QOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramc : paramc.$(SUFFIX) $(CBLASOBJS) $(COMMONOBJS) $(COBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramz : paramz.$(SUFFIX) $(ZBLASOBJS) $(COMMONOBJS) $(ZOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramx : paramx.$(SUFFIX) $(XBLASOBJS) $(COMMONOBJS) $(XOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| params-ex : params-ex.$(SUFFIX) $(SBLASOBJS) $(COMMONOBJS) $(SOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramd-ex : paramd-ex.$(SUFFIX) $(DBLASOBJS) $(COMMONOBJS) $(DOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramq-ex : paramq-ex.$(SUFFIX) $(QBLASOBJS) $(COMMONOBJS) $(QOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramc-ex : paramc-ex.$(SUFFIX) $(CBLASOBJS) $(COMMONOBJS) $(COBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramz-ex : paramz-ex.$(SUFFIX) $(ZBLASOBJS) $(COMMONOBJS) $(ZOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| paramx-ex : paramx-ex.$(SUFFIX) $(XBLASOBJS) $(COMMONOBJS) $(XOBJS) $(OBJS) $(LIBS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(EXTRALIB) $(CEXTRALIB) | |||
| params.atlas : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| paramd.atlas : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| paramc.atlas : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| paramz.atlas : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBATLAS) | |||
| params.sun : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) | |||
| paramd.sun : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) | |||
| paramc.sun : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) | |||
| paramz.sun : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBSUNPERF) | |||
| params.essl : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBESSL) | |||
| paramd.essl : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBESSL) | |||
| paramc.essl : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBESSL) | |||
| paramz.essl : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBESSL) | |||
| params.mkl : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) | |||
| paramd.mkl : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) | |||
| paramc.mkl : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) | |||
| paramz.mkl : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBMKL) | |||
| params.acml : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| paramd.acml : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| paramc.acml : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| paramz.acml : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBACML) | |||
| params.flame : params.$(SUFFIX) $(OBJS) $(SOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) $(EXTRALIB) $(CEXTRALIB) | |||
| paramd.flame : paramd.$(SUFFIX) $(OBJS) $(DOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) $(EXTRALIB) $(CEXTRALIB) | |||
| paramc.flame : paramc.$(SUFFIX) $(OBJS) $(COBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) $(EXTRALIB) $(CEXTRALIB) | |||
| paramz.flame : paramz.$(SUFFIX) $(OBJS) $(ZOBJS) | |||
| $(CC) -o $(@F) $(CFLAGS) $^ $(LIBFLAME) $(EXTRALIB) $(CEXTRALIB) | |||
| params.$(SUFFIX):param.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramd.$(SUFFIX):param.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramq.$(SUFFIX):param.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramc.$(SUFFIX):paramz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| paramz.$(SUFFIX):paramz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| paramx.$(SUFFIX):paramz.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| params-ex.$(SUFFIX):param-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramd-ex.$(SUFFIX):param-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramq-ex.$(SUFFIX):param-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -UCOMPLEX -c $< -o $(@F) | |||
| paramc-ex.$(SUFFIX):paramz-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -UDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| paramz-ex.$(SUFFIX):paramz-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| paramx-ex.$(SUFFIX):paramz-ex.c $(TOPDIR)/../bench/bmcommon.h | |||
| $(CC) $(CFLAGS) -DXDOUBLE -DCOMPLEX -c $< -o $(@F) | |||
| gen_insn_flash.c : | |||
| echo '#include <stdio.h>' > gen_insn_flash.c | |||
| echo '#include <stdlib.h>' >> gen_insn_flash.c | |||
| echo '#define ICACHE_SIZE ( 256 << 10)' >> gen_insn_flash.c | |||
| echo 'int main(void){' >> gen_insn_flash.c | |||
| echo 'int i;' >> gen_insn_flash.c | |||
| echo '#ifdef __alpha' >> gen_insn_flash.c | |||
| echo 'printf(".set noat;.set noreorder;\n");' >> gen_insn_flash.c | |||
| echo 'printf(".arch ev6;.text;.align 5\n");' >> gen_insn_flash.c | |||
| echo 'printf(".globl insn_flash\n");' >> gen_insn_flash.c | |||
| echo 'printf(".ent insn_flash\n");' >> gen_insn_flash.c | |||
| echo 'printf("insn_flash:\n");' >> gen_insn_flash.c | |||
| echo 'for (i = 0; i < ICACHE_SIZE / 4; i++)' >> gen_insn_flash.c | |||
| echo 'printf("br 1f\n 1:\n");' >> gen_insn_flash.c | |||
| echo 'printf(".align 5;ret;.end insn_flash\n");'>> gen_insn_flash.c | |||
| echo '#else' >> gen_insn_flash.c | |||
| echo 'printf(".text;.align 32\n");' >> gen_insn_flash.c | |||
| echo 'printf(".globl insn_flash\n");' >> gen_insn_flash.c | |||
| echo 'printf("insn_flash:\n");' >> gen_insn_flash.c | |||
| echo 'for (i = 0; i < ICACHE_SIZE / 2; i++)' >> gen_insn_flash.c | |||
| echo 'printf("jmp 1f\n 1:\n");' >> gen_insn_flash.c | |||
| echo 'printf(".align 32;ret\n");' >> gen_insn_flash.c | |||
| echo '#endif' >> gen_insn_flash.c | |||
| echo 'return 0;' >> gen_insn_flash.c | |||
| echo '}' >> gen_insn_flash.c | |||
| insn_flash.$(SUFFIX) : gen_insn_flash | |||
| ./gen_insn_flash > temp.s | |||
| $(AS) -o $(@F) temp.s | |||
| rm -f temp.s | |||
| dummy : | |||
| clean :: | |||
| @if test -d $(ARCH); then \ | |||
| (cd $(ARCH) && $(MAKE) clean) \ | |||
| fi | |||
| @rm -rf *.a *.s *.o *.po *.obj *.i *.so core core.* gmon.out *.cso \ | |||
| *.csx *.is *~ *.exe *.flame *.pdb *.dwf \ | |||
| gen_insn_flash.c gen_insn_flash *.stackdump *.dll *.exp *.lib \ | |||
| *.pc *.pcl *.def *.i *.prof linktest.c \ | |||
| bms bmd bmc bmz bmq bmx \ | |||
| params paramd paramc paramz paramq paramx \ | |||
| params-ex paramd-ex paramc-ex paramz-ex paramq-ex paramx-ex \ | |||
| bench tpp kbench kbench2 \ | |||
| *.mkl *.sun *.acml *.cxml *.essl *.atlas *.scsl *.mlib *.veclib *.fuji | |||
| @@ -0,0 +1,59 @@ | |||
| # COMPILER_PREFIX = mingw32- | |||
| ifeq ($(OSNAME), Linux) | |||
| LDFLAGS = -melf_i386 | |||
| endif | |||
| ifeq ($(OSNAME), Interix) | |||
| ARFLAGS = -m x86 | |||
| endif | |||
| ifndef SMP | |||
| LIBMKL = -L$(MKLPATH)/32 -Wl,-rpath,$(MKLPATH)/32 -lmkl_intel -lmkl_sequential -lmkl_core -lguide -lpthread -lm | |||
| else | |||
| LIBMKL = -L$(MKLPATH)/32 -Wl,-rpath,$(MKLPATH)/32 -lmkl_intel -lmkl_intel_thread -lmkl_core -lguide -lpthread -lm | |||
| endif | |||
| # LIBMKL = -L$(MKLPATH)/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread -lm | |||
| ifndef SMP | |||
| LIBATLAS = -L$(ATLAS) -lf77blas -latlas -lg2c -lm | |||
| else | |||
| LIBATLAS = -L$(ATLAS) -lptf77blas -latlas -lpthread -lg2c -lm | |||
| endif | |||
| ifeq ($(COMPILER_F77), g77) | |||
| LIBACML = -L$(ACMLPATH)/gnu32/lib -Wl,-rpath,$(ACMLPATH)/gnu32/lib -lacml -lg2c | |||
| endif | |||
| LIBFLAME = -L$(FLAMEPATH) -llapack2flame -lflame-lapack -lflame-base $(LIBS) | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/gfortran32/lib -Wl,-rpath,$(ACMLPATH)/gfortran32/lib -lacml -lgfortran -lm | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/gfortran32_mp/lib -Wl,-rpath,$(ACMLPATH)/gfortran32_mp/lib -lacml_mp -lgfortran -lgomp -lm | |||
| endif | |||
| endif | |||
| ifeq ($(COMPILER_F77), pgf77) | |||
| LIBACML = -L$(ACMLPATH)/pgi32/lib -lacml -L/opt/pgi/linux86-64/5.2/lib -lpgftnrtl -lnspgc -lpgc | |||
| endif | |||
| ifeq ($(F_COMPILER), PATHSCALE) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/pathscale32/lib -Wl,-rpath,$(ACMLPATH)/pathscale32/lib -lacml -Wl,-rpath,$(PATHSCALEPATH) -L$(PATHSCALEPATH) -lpathfortran -lm | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/pathscale32_mp/lib -Wl,-rpath,$(ACMLPATH)/pathscale32_mp/lib -lacml_mp -Wl,-rpath,$(PATHSCALEPATH) -L$(PATHSCALEPATH) -lopenmp -lpathfortran -lm | |||
| endif | |||
| endif | |||
| LIBSUNPERF = -L/opt/SUNWspro/lib/sse2 -Wl,-R,/opt/SUNWspro/lib/sse2 -lsunperf | |||
| LIBVECLIB = /System/Library/Frameworks/vecLib.framework/Versions/Current/vecLib | |||
| ifndef SMP | |||
| LIBATLAS = -L$(ATLASPATH)/32 -lcblas -lf77blas -latlas -lm | |||
| else | |||
| LIBATLAS = -L$(ATLASPATH)/32 -lptf77blas -lptatlas -lpthread -lm | |||
| endif | |||
| @@ -0,0 +1,102 @@ | |||
| # CCOMMON_OPT += -DFASTCPU | |||
| ifeq ($(OSNAME), SunOS) | |||
| ifdef BINARY64 | |||
| LDFLAGS = -64 | |||
| ifeq ($(F_COMPILER), SUN) | |||
| FCOMMON_OPT += -m64 | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(OSNAME), FreeBSD) | |||
| LDFLAGS = -m elf_x86_64_fbsd | |||
| endif | |||
| ifeq ($(OSNAME), Linux) | |||
| LDFLAGS = -m elf_x86_64 | |||
| endif | |||
| ifeq ($(OSNAME), Darwin) | |||
| LDFLAGS = | |||
| endif | |||
| ifeq ($(OSNAME), Interix) | |||
| ARFLAGS = -m x64 | |||
| endif | |||
| ifeq ($(OSNAME), Darwin) | |||
| ifndef SMP | |||
| LIBMKL = -L$(MKLPATH)/em64t -Wl,-rpath,$(MKLPATH)/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lguide -lpthread -lm | |||
| else | |||
| LIBMKL = -L$(MKLPATH)/em64t -Wl,-rpath,$(MKLPATH)/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread -lm | |||
| endif | |||
| else | |||
| ifndef SMP | |||
| LIBMKL = -L$(MKLPATH)/em64t -Wl,-rpath,$(MKLPATH)/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lguide -lpthread -lm | |||
| else | |||
| LIBMKL = -L$(MKLPATH)/em64t -Wl,-rpath,$(MKLPATH)/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread -lm | |||
| endif | |||
| endif | |||
| ifndef SMP | |||
| LIBATLAS = -L$(ATLASPATH)64 -llapack -lcblas -lf77blas -latlas -lm | |||
| else | |||
| LIBATLAS = -L$(ATLASPATH)64 -llapack -lptcblas -lptf77blas -latlas -lpthread -lm | |||
| endif | |||
| LIBFLAME = -L$(FLAMEPATH) -llapack2flame -lflame $(TOPDIR)/$(LIBNAME) -lgfortran -lpthread -lm | |||
| ifeq ($(F_COMPILER), g77) | |||
| LIBACML = -L$(ACMLPATH)/gnu64/lib -Wl,-rpath,$(ACMLPATH)/gnu64/lib -lacml -lacml_mv -lg2c -lm | |||
| endif | |||
| ifeq ($(F_COMPILER), GFORTRAN) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/gfortran64/lib -Wl,-rpath,$(ACMLPATH)/gfortran64/lib -lacml -lacml_mv -lgfortran -lm | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/gfortran64_mp/lib -Wl,-rpath,$(ACMLPATH)/gfortran64_mp/lib -lacml_mp -lacml_mv -lgfortran -lgomp -lm | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), INTEL) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/ifort64/lib -Wl,-rpath,$(ACMLPATH)/ifort64/lib -lacml -lacml_mv -lifcoremt_pic -lirc -lm -lpthread -ldl | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/ifort64_mp/lib -Wl,-rpath,$(ACMLPATH)/ifort64_mp/lib -lacml_mp -lacml_mv -lifcoremt_pic -liomp5 -lirc -lm -lpthread -ldl | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), OPEN64) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/open64/lib -Wl,-rpath,$(ACMLPATH)/open64/lib -lacml -lacml_mv -lm | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/open64_mp/lib -Wl,-rpath,$(ACMLPATH)/open64_mp/lib -lacml_mp -lacml_mv -lm -lpthread | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), pgf77) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/pgi64/lib -Wl,-rpath,$(ACMLPATH)/pgi64/lib -lacml -lacml_mv -L$(PGIPATH) -Wl,-rpath,$(PGIPATH) -lpgftnrtl -lnspgc -lpgmp -lpgc | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/pgi64_mp/lib -Wl,-rpath,$(ACMLPATH)/pgi64_mp/lib -lacml -lacml_mv -L$(PGIPATH) -Wl,-rpath,$(PGIPATH) -lpgftnrtl -lnspgc -lpgmp -lpgc | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), PATHSCALE) | |||
| ifndef SMP | |||
| LIBACML = -L$(ACMLPATH)/pathscale64/lib -Wl,-rpath,$(ACMLPATH)/pathscale64/lib -lacml -lacml_mv -Wl,-rpath,$(PATHSCALEPATH) -L$(PATHSCALEPATH) -lpathfortran -lm | |||
| else | |||
| LIBACML = -L$(ACMLPATH)/pathscale64_mp/lib -Wl,-rpath,$(ACMLPATH)/pathscale64_mp/lib -lacml_mp -lacml_mv -Wl,-rpath,$(PATHSCALEPATH) -L$(PATHSCALEPATH) -lopenmp -lpathfortran -lm | |||
| endif | |||
| endif | |||
| ifeq ($(F_COMPILER), f90) | |||
| LIBACML = -L$(ACMLPATH)/sun64/lib -Wl,-R,$(ACMLPATH)/sun64/lib -L$(SUNPATH)/lib/amd64 -Wl,-R,$(SUNPATH)/lib/amd64 -lacml -lacml_mv -lfsu | |||
| endif | |||
| LIBSUNPERF = -L$(SUNPATH)/lib/amd64 -L$(SUNPATH)/rtlibs/amd64 -Wl,-R,$(SUNPATH)/lib/amd64 -Wl,-R,$(SUNPATH)/rtlibs/amd64 -lsunperf -lfui -lfsu -lmtsk | |||
| LIBVECLIB = /System/Library/Frameworks/vecLib.framework/Versions/Current/vecLib | |||
| @@ -0,0 +1,195 @@ | |||
| TOPDIR = .. | |||
| include $(TOPDIR)/Makefile.system | |||
| CULA_INC = -I/usr/local/cula/include | |||
| CULA_LIB = -L/usr/local/cula/lib64 -Wl,-rpath,/usr/local/cula/lib64 -lcula_fortran -lcula -lcublas | |||
| all :: dlinpack.goto dlinpack.mkl dlinpack.acml dcholesky.goto dcholesky.mkl dcholesky.acml | |||
| ./dlinpack.goto 4000 4000 1 | |||
| -./dlinpack.mkl 4000 4000 1 | |||
| -./dlinpack.acml 4000 4000 1 | |||
| ./dcholesky.goto 4000 4000 1 | |||
| -./dcholesky.mkl 4000 4000 1 | |||
| -./dcholesky.acml 4000 4000 1 | |||
| slinpack.goto : slinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| dlinpack.goto : dlinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| qlinpack.goto : qlinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| clinpack.goto : clinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| zlinpack.goto : zlinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| xlinpack.goto : xlinpack.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| scholesky.goto : scholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| dcholesky.goto : dcholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| qcholesky.goto : qcholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| ccholesky.goto : ccholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| zcholesky.goto : zcholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| xcholesky.goto : xcholesky.$(SUFFIX) ../$(LIBNAME) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) -lm | |||
| slinpack.mkl : slinpack.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dlinpack.mkl : dlinpack.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| clinpack.mkl : clinpack.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zlinpack.mkl : zlinpack.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| scholesky.mkl : scholesky.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dcholesky.mkl : dcholesky.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| ccholesky.mkl : ccholesky.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zcholesky.mkl : zcholesky.$(SUFFIX) | |||
| -$(CC) -static $(CFLAGS) -o $(@F) $^ $(LIBMKL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| slinpack.acml : slinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dlinpack.acml : dlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| clinpack.acml : clinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zlinpack.acml : zlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| scholesky.acml : scholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dcholesky.acml : dcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| ccholesky.acml : ccholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zcholesky.acml : zcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| slinpack.flame : slinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dlinpack.flame : dlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| clinpack.flame : clinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zlinpack.flame : zlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| scholesky.flame : scholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dcholesky.flame : dcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| ccholesky.flame : ccholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zcholesky.flame : zcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBFLAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| slinpack.sun : slinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dlinpack.sun : dlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| clinpack.sun : clinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zlinpack.sun : zlinpack.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| scholesky.sun : scholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| dcholesky.sun : dcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| ccholesky.sun : ccholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| zcholesky.sun : zcholesky.$(SUFFIX) | |||
| -$(CC) $(CFLAGS) -o $(@F) $^ $(LIBSUNPERF) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| slinpack.cula : slinpack.$(SUFFIX) cula_wrapper.$(SUFFIX) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CULA_LIB) ../$(LIBNAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| clinpack.cula : clinpack.$(SUFFIX) cula_wrapper.$(SUFFIX) | |||
| $(CC) $(CFLAGS) -o $(@F) $^ $(CULA_LIB) ../$(LIBNAME) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) | |||
| cula_wrapper.$(SUFFIX) : cula_wrapper.c | |||
| $(CC) $(CFLAGS) -c $(CULA_INC) -o $(@F) $^ | |||
| slinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^ | |||
| dlinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^ | |||
| qlinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -DXDOUBLE -o $(@F) $^ | |||
| clinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^ | |||
| zlinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^ | |||
| xlinpack.$(SUFFIX) : linpack.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -DXDOUBLE -o $(@F) $^ | |||
| scholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^ | |||
| dcholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^ | |||
| qcholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -UCOMPLEX -DXDOUBLE -o $(@F) $^ | |||
| ccholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^ | |||
| zcholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^ | |||
| xcholesky.$(SUFFIX) : cholesky.c | |||
| $(CC) $(CFLAGS) -c -DCOMPLEX -DXDOUBLE -o $(@F) $^ | |||
| clean :: | |||
| @rm -f *.goto *.mkl *.acml *.sun *.cula | |||
| include $(TOPDIR)/Makefile.tail | |||
| @@ -0,0 +1,272 @@ | |||
| /*********************************************************************/ | |||
| /* 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 <stdio.h> | |||
| #include <stdlib.h> | |||
| #ifdef __CYGWIN32__ | |||
| #include <sys/time.h> | |||
| #endif | |||
| #include "common.h" | |||
| double fabs(double); | |||
| #undef POTRF | |||
| #ifndef COMPLEX | |||
| #ifdef XDOUBLE | |||
| #define POTRF BLASFUNC(qpotrf) | |||
| #define SYRK BLASFUNC(qsyrk) | |||
| #elif defined(DOUBLE) | |||
| #define POTRF BLASFUNC(dpotrf) | |||
| #define SYRK BLASFUNC(dsyrk) | |||
| #else | |||
| #define POTRF BLASFUNC(spotrf) | |||
| #define SYRK BLASFUNC(ssyrk) | |||
| #endif | |||
| #else | |||
| #ifdef XDOUBLE | |||
| #define POTRF BLASFUNC(xpotrf) | |||
| #define SYRK BLASFUNC(xherk) | |||
| #elif defined(DOUBLE) | |||
| #define POTRF BLASFUNC(zpotrf) | |||
| #define SYRK BLASFUNC(zherk) | |||
| #else | |||
| #define POTRF BLASFUNC(cpotrf) | |||
| #define SYRK BLASFUNC(cherk) | |||
| #endif | |||
| #endif | |||
| #if defined(__WIN32__) || defined(__WIN64__) | |||
| int gettimeofday(struct timeval *tv, void *tz){ | |||
| FILETIME ft; | |||
| unsigned __int64 tmpres = 0; | |||
| static int tzflag; | |||
| if (NULL != tv) | |||
| { | |||
| GetSystemTimeAsFileTime(&ft); | |||
| tmpres |= ft.dwHighDateTime; | |||
| tmpres <<= 32; | |||
| tmpres |= ft.dwLowDateTime; | |||
| /*converting file time to unix epoch*/ | |||
| tmpres /= 10; /*convert into microseconds*/ | |||
| tmpres -= DELTA_EPOCH_IN_MICROSECS; | |||
| tv->tv_sec = (long)(tmpres / 1000000UL); | |||
| tv->tv_usec = (long)(tmpres % 1000000UL); | |||
| } | |||
| return 0; | |||
| } | |||
| #endif | |||
| static __inline double getmflops(int ratio, int m, double secs){ | |||
| double mm = (double)m; | |||
| double mulflops, addflops; | |||
| if (secs==0.) return 0.; | |||
| mulflops = mm * (1./3. + mm * (1./2. + mm * 1./6.)); | |||
| addflops = 1./6. * mm * (mm * mm - 1); | |||
| if (ratio == 1) { | |||
| return (mulflops + addflops) / secs * 1.e-6; | |||
| } else { | |||
| return (2. * mulflops + 6. * addflops) / secs * 1.e-6; | |||
| } | |||
| } | |||
| int MAIN__(int argc, char *argv[]){ | |||
| char *trans[] = {"T", "N"}; | |||
| char *uplo[] = {"U", "L"}; | |||
| FLOAT alpha[] = {1.0, 0.0}; | |||
| FLOAT beta [] = {0.0, 0.0}; | |||
| FLOAT *a, *b; | |||
| blasint m, i, j, info, uplos; | |||
| int from = 1; | |||
| int to = 200; | |||
| int step = 1; | |||
| FLOAT maxerr; | |||
| struct timeval start, stop; | |||
| double time1; | |||
| argc--;argv++; | |||
| if (argc > 0) { from = atol(*argv); argc--; argv++;} | |||
| if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;} | |||
| if (argc > 0) { step = atol(*argv); argc--; argv++;} | |||
| fprintf(stderr, "From : %3d To : %3d Step = %3d\n", from, to, step); | |||
| if (( a = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL){ | |||
| fprintf(stderr,"Out of Memory!!\n");exit(1); | |||
| } | |||
| if (( b = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL){ | |||
| fprintf(stderr,"Out of Memory!!\n");exit(1); | |||
| } | |||
| for(m = from; m <= to; m += step){ | |||
| fprintf(stderr, "M = %6d : ", (int)m); | |||
| for (uplos = 0; uplos < 2; uplos ++) { | |||
| #ifndef COMPLEX | |||
| if (uplos & 1) { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = 0; i < j; i++) a[i + j * m] = 0.; | |||
| a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.; | |||
| for(i = j + 1; i < m; i++) a[i + j * m] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| } | |||
| } else { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = 0; i < j; i++) a[i + j * m] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.; | |||
| for(i = j + 1; i < m; i++) a[i + j * m] = 0.; | |||
| } | |||
| } | |||
| #else | |||
| if (uplos & 1) { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = 0; i < j; i++) { | |||
| a[(i + j * m) * 2 + 0] = 0.; | |||
| a[(i + j * m) * 2 + 1] = 0.; | |||
| } | |||
| a[(j + j * m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) + 8.; | |||
| a[(j + j * m) * 2 + 1] = 0.; | |||
| for(i = j + 1; i < m; i++) { | |||
| a[(i + j * m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| a[(i + j * m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| } | |||
| } | |||
| } else { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = 0; i < j; i++) { | |||
| a[(i + j * m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| a[(i + j * m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5; | |||
| } | |||
| a[(j + j * m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) + 8.; | |||
| a[(j + j * m) * 2 + 1] = 0.; | |||
| for(i = j + 1; i < m; i++) { | |||
| a[(i + j * m) * 2 + 0] = 0.; | |||
| a[(i + j * m) * 2 + 1] = 0.; | |||
| } | |||
| } | |||
| } | |||
| #endif | |||
| SYRK(uplo[uplos], trans[uplos], &m, &m, alpha, a, &m, beta, b, &m); | |||
| gettimeofday( &start, (struct timezone *)0); | |||
| POTRF(uplo[uplos], &m, b, &m, &info); | |||
| gettimeofday( &stop, (struct timezone *)0); | |||
| if (info != 0) { | |||
| fprintf(stderr, "Info = %d\n", info); | |||
| exit(1); | |||
| } | |||
| time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6; | |||
| maxerr = 0.; | |||
| if (!(uplos & 1)) { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = 0; i <= j; i++) { | |||
| #ifndef COMPLEX | |||
| if (maxerr < fabs(a[i + j * m] - b[i + j * m])) maxerr = fabs(a[i + j * m] - b[i + j * m]); | |||
| #else | |||
| if (maxerr < fabs(a[(i + j * m) * 2 + 0] - b[(i + j * m) * 2 + 0])) maxerr = fabs(a[(i + j * m) * 2 + 0] - b[(i + j * m) * 2 + 0]); | |||
| if (maxerr < fabs(a[(i + j * m) * 2 + 1] - b[(i + j * m) * 2 + 1])) maxerr = fabs(a[(i + j * m) * 2 + 1] - b[(i + j * m) * 2 + 1]); | |||
| #endif | |||
| } | |||
| } | |||
| } else { | |||
| for (j = 0; j < m; j++) { | |||
| for(i = j; i < m; i++) { | |||
| #ifndef COMPLEX | |||
| if (maxerr < fabs(a[i + j * m] - b[i + j * m])) maxerr = fabs(a[i + j * m] - b[i + j * m]); | |||
| #else | |||
| if (maxerr < fabs(a[(i + j * m) * 2 + 0] - b[(i + j * m) * 2 + 0])) maxerr = fabs(a[(i + j * m) * 2 + 0] - b[(i + j * m) * 2 + 0]); | |||
| if (maxerr < fabs(a[(i + j * m) * 2 + 1] - b[(i + j * m) * 2 + 1])) maxerr = fabs(a[(i + j * m) * 2 + 1] - b[(i + j * m) * 2 + 1]); | |||
| #endif | |||
| } | |||
| } | |||
| } | |||
| fprintf(stderr, | |||
| #ifdef XDOUBLE | |||
| " %Le %10.3f MFlops", maxerr, | |||
| #else | |||
| " %e %10.3f MFlops", maxerr, | |||
| #endif | |||
| getmflops(COMPSIZE * COMPSIZE, m, time1)); | |||
| if (maxerr > 1.e-3) { | |||
| fprintf(stderr, "Hmm, probably it has bug.\n"); | |||
| exit(1); | |||
| } | |||
| } | |||
| fprintf(stderr, "\n"); | |||
| } | |||
| return 0; | |||
| } | |||
| void main(int argc, char *argv[]) __attribute__((weak, alias("MAIN__"))); | |||
| @@ -0,0 +1,28 @@ | |||
| #include <stdio.h> | |||
| #include "culapack.h" | |||
| static int initialized = 0; | |||
| int sgetrf_(int *m, int *n, float *a, int *lda, int *ipiv, int *info) { | |||
| if (!initialized) { | |||
| culaInitialize(); | |||
| initialized = 1; | |||
| } | |||
| *info = culaSgetrf(*m, *m, a, *lda, ipiv); | |||
| return 0; | |||
| } | |||
| int cgetrf_(int *m, int *n, float *a, int *lda, int *ipiv, int *info) { | |||
| if (!initialized) { | |||
| culaInitialize(); | |||
| initialized = 1; | |||
| } | |||
| *info = culaCgetrf(*m, *m, (culaFloatComplex *)a, *lda, ipiv); | |||
| return 0; | |||
| } | |||
| @@ -0,0 +1,273 @@ | |||
| /*********************************************************************/ | |||
| /* 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 <stdio.h> | |||
| #include <stdlib.h> | |||
| #ifdef __CYGWIN32__ | |||
| #include <sys/time.h> | |||
| #endif | |||
| #include "common.h" | |||
| double fabs(double); | |||
| #undef GETRF | |||
| #undef GETRS | |||
| #ifndef COMPLEX | |||
| #ifdef XDOUBLE | |||
| #define GETRF BLASFUNC(qgetrf) | |||
| #define GETRS BLASFUNC(qgetrs) | |||
| #elif defined(DOUBLE) | |||
| #define GETRF BLASFUNC(dgetrf) | |||
| #define GETRS BLASFUNC(dgetrs) | |||
| #else | |||
| #define GETRF BLASFUNC(sgetrf) | |||
| #define GETRS BLASFUNC(sgetrs) | |||
| #endif | |||
| #else | |||
| #ifdef XDOUBLE | |||
| #define GETRF BLASFUNC(xgetrf) | |||
| #define GETRS BLASFUNC(xgetrs) | |||
| #elif defined(DOUBLE) | |||
| #define GETRF BLASFUNC(zgetrf) | |||
| #define GETRS BLASFUNC(zgetrs) | |||
| #else | |||
| #define GETRF BLASFUNC(cgetrf) | |||
| #define GETRS BLASFUNC(cgetrs) | |||
| #endif | |||
| #endif | |||
| #if defined(__WIN32__) || defined(__WIN64__) | |||
| #ifndef DELTA_EPOCH_IN_MICROSECS | |||
| #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL | |||
| #endif | |||
| int gettimeofday(struct timeval *tv, void *tz){ | |||
| FILETIME ft; | |||
| unsigned __int64 tmpres = 0; | |||
| static int tzflag; | |||
| if (NULL != tv) | |||
| { | |||
| GetSystemTimeAsFileTime(&ft); | |||
| tmpres |= ft.dwHighDateTime; | |||
| tmpres <<= 32; | |||
| tmpres |= ft.dwLowDateTime; | |||
| /*converting file time to unix epoch*/ | |||
| tmpres /= 10; /*convert into microseconds*/ | |||
| tmpres -= DELTA_EPOCH_IN_MICROSECS; | |||
| tv->tv_sec = (long)(tmpres / 1000000UL); | |||
| tv->tv_usec = (long)(tmpres % 1000000UL); | |||
| } | |||
| return 0; | |||
| } | |||
| #endif | |||
| #if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0 | |||
| static void *huge_malloc(BLASLONG size){ | |||
| int shmid; | |||
| void *address; | |||
| #ifndef SHM_HUGETLB | |||
| #define SHM_HUGETLB 04000 | |||
| #endif | |||
| if ((shmid =shmget(IPC_PRIVATE, | |||
| (size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1), | |||
| SHM_HUGETLB | IPC_CREAT |0600)) < 0) { | |||
| printf( "Memory allocation failed(shmget).\n"); | |||
| exit(1); | |||
| } | |||
| address = shmat(shmid, NULL, SHM_RND); | |||
| if ((BLASLONG)address == -1){ | |||
| printf( "Memory allocation failed(shmat).\n"); | |||
| exit(1); | |||
| } | |||
| shmctl(shmid, IPC_RMID, 0); | |||
| return address; | |||
| } | |||
| #define malloc huge_malloc | |||
| #endif | |||
| int MAIN__(int argc, char *argv[]){ | |||
| FLOAT *a, *b; | |||
| blasint *ipiv; | |||
| blasint m, i, j, info; | |||
| blasint unit = 1; | |||
| int from = 1; | |||
| int to = 200; | |||
| int step = 1; | |||
| FLOAT maxerr; | |||
| struct timeval start, stop; | |||
| double time1, time2; | |||
| argc--;argv++; | |||
| if (argc > 0) { from = atol(*argv); argc--; argv++;} | |||
| if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;} | |||
| if (argc > 0) { step = atol(*argv); argc--; argv++;} | |||
| fprintf(stderr, "From : %3d To : %3d Step = %3d\n", from, to, step); | |||
| if (( a = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL){ | |||
| fprintf(stderr,"Out of Memory!!\n");exit(1); | |||
| } | |||
| if (( b = (FLOAT *)malloc(sizeof(FLOAT) * to * COMPSIZE)) == NULL){ | |||
| fprintf(stderr,"Out of Memory!!\n");exit(1); | |||
| } | |||
| if (( ipiv = (blasint *)malloc(sizeof(blasint) * to * COMPSIZE)) == NULL){ | |||
| fprintf(stderr,"Out of Memory!!\n");exit(1); | |||
| } | |||
| #ifdef linux | |||
| srandom(getpid()); | |||
| #endif | |||
| fprintf(stderr, " SIZE Residual Decompose Solve Total\n"); | |||
| for(m = from; m <= to; m += step){ | |||
| fprintf(stderr, " %6d : ", (int)m); | |||
| for(j = 0; j < m; j++){ | |||
| for(i = 0; i < m * COMPSIZE; i++){ | |||
| a[i + j * m * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5; | |||
| } | |||
| } | |||
| for (i = 0; i < m * COMPSIZE; ++i) b[i] = 0.; | |||
| for (j = 0; j < m; ++j) { | |||
| for (i = 0; i < m * COMPSIZE; ++i) { | |||
| b[i] += a[i + j * m * COMPSIZE]; | |||
| } | |||
| } | |||
| gettimeofday( &start, (struct timezone *)0); | |||
| GETRF (&m, &m, a, &m, ipiv, &info); | |||
| gettimeofday( &stop, (struct timezone *)0); | |||
| if (info) { | |||
| fprintf(stderr, "Matrix is not singular .. %d\n", info); | |||
| exit(1); | |||
| } | |||
| time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6; | |||
| gettimeofday( &start, (struct timezone *)0); | |||
| GETRS("N", &m, &unit, a, &m, ipiv, b, &m, &info); | |||
| gettimeofday( &stop, (struct timezone *)0); | |||
| if (info) { | |||
| fprintf(stderr, "Matrix is not singular .. %d\n", info); | |||
| exit(1); | |||
| } | |||
| time2 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6; | |||
| maxerr = 0.; | |||
| for(i = 0; i < m; i++){ | |||
| #ifndef XDOUBLE | |||
| if (maxerr < fabs(b[i * COMPSIZE] - 1.0)) maxerr = fabs(b[i * COMPSIZE] - 1.0); | |||
| #ifdef COMPLEX | |||
| if (maxerr < fabs(b[i * COMPSIZE] + 1)) maxerr = fabs(b[i * COMPSIZE + 1]); | |||
| #endif | |||
| #else | |||
| if (maxerr < fabsl(b[i * COMPSIZE] - 1.0L)) maxerr = fabsl(b[i * COMPSIZE] - 1.0L); | |||
| #ifdef COMPLEX | |||
| if (maxerr < fabsl(b[i * COMPSIZE] + 1)) maxerr = fabsl(b[i * COMPSIZE + 1]); | |||
| #endif | |||
| #endif | |||
| } | |||
| #ifdef XDOUBLE | |||
| fprintf(stderr," %Le ", maxerr); | |||
| #else | |||
| fprintf(stderr," %e ", maxerr); | |||
| #endif | |||
| fprintf(stderr, | |||
| " %10.2f MFlops %10.2f MFlops %10.2f MFlops\n", | |||
| COMPSIZE * COMPSIZE * 2. / 3. * (double)m * (double)m * (double)m / time1 * 1.e-6, | |||
| COMPSIZE * COMPSIZE * 2. * (double)m * (double)m / time2 * 1.e-6, | |||
| COMPSIZE * COMPSIZE * (2. / 3. * (double)m * (double)m * (double)m + 2. * (double)m * (double)m) / (time1 + time2) * 1.e-6); | |||
| #if 0 | |||
| if ( | |||
| #ifdef DOUBLE | |||
| maxerr > 1.e-8 | |||
| #else | |||
| maxerr > 1.e-1 | |||
| #endif | |||
| ) { | |||
| fprintf(stderr, "Error is too large.\n"); | |||
| exit(1); | |||
| } | |||
| #endif | |||
| } | |||
| return 0; | |||
| } | |||
| void main(int argc, char *argv[]) __attribute__((weak, alias("MAIN__"))); | |||
| @@ -0,0 +1,254 @@ | |||
| #!/usr/bin/perl | |||
| # Checking cross compile | |||
| $hostos = `uname -s | sed -e s/\-.*//`; chop($hostos); | |||
| $hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch); | |||
| $binary = $ENV{"BINARY"}; | |||
| $makefile = shift(@ARGV); | |||
| $config = shift(@ARGV); | |||
| $compiler_name = join(" ", @ARGV); | |||
| # First, we need to know the target OS and compiler name | |||
| $data = `$compiler_name -E ctest.c`; | |||
| if ($?) { | |||
| printf STDERR "C Compiler ($compiler_name) is something wrong.\n"; | |||
| die 1; | |||
| } | |||
| $cross_suffix = ""; | |||
| if ($ARGV[0] =~ /(.*)(-[.\d]+)/) { | |||
| if ($1 =~ /(.*-)(.*)/) { | |||
| $cross_suffix = $1; | |||
| } | |||
| } else { | |||
| if ($ARGV[0] =~ /(.*-)(.*)/) { | |||
| $cross_suffix = $1; | |||
| } | |||
| } | |||
| $compiler = ""; | |||
| $compiler = PGI if ($data =~ /COMPILER_PGI/); | |||
| $compiler = PATHSCALE if ($data =~ /COMPILER_PATHSCALE/); | |||
| $compiler = INTEL if ($data =~ /COMPILER_INTEL/); | |||
| $compiler = OPEN64 if ($data =~ /COMPILER_OPEN64/); | |||
| $compiler = SUN if ($data =~ /COMPILER_SUN/); | |||
| $compiler = IBM if ($data =~ /COMPILER_IBM/); | |||
| $compiler = DEC if ($data =~ /COMPILER_DEC/); | |||
| $compiler = GCC if ($compiler eq ""); | |||
| $os = Linux if ($data =~ /OS_LINUX/); | |||
| $os = FreeBSD if ($data =~ /OS_FreeBSD/); | |||
| $os = NetBSD if ($data =~ /OS_NetBSD/); | |||
| $os = Darwin if ($data =~ /OS_Darwin/); | |||
| $os = SunOS if ($data =~ /OS_SunOS/); | |||
| $os = AIX if ($data =~ /OS_AIX/); | |||
| $os = osf if ($data =~ /OS_OSF/); | |||
| $os = WINNT if ($data =~ /OS_WINNT/); | |||
| $os = CYGWIN_NT if ($data =~ /OS_CYGWIN/); | |||
| $os = Interix if ($data =~ /OS_INTERIX/); | |||
| $architecture = x86 if ($data =~ /ARCH_X86/); | |||
| $architecture = x86_64 if ($data =~ /ARCH_X86_64/); | |||
| $architecture = power if ($data =~ /ARCH_POWER/); | |||
| $architecture = mips32 if ($data =~ /ARCH_MIPS32/); | |||
| $architecture = mips64 if ($data =~ /ARCH_MIPS64/); | |||
| $architecture = alpha if ($data =~ /ARCH_ALPHA/); | |||
| $architecture = sparc if ($data =~ /ARCH_SPARC/); | |||
| $architecture = ia64 if ($data =~ /ARCH_IA64/); | |||
| $defined = 0; | |||
| if ($os eq "AIX") { | |||
| $compiler_name .= " -maix32" if ($binary eq "32"); | |||
| $compiler_name .= " -maix64" if ($binary eq "64"); | |||
| $defined = 1; | |||
| } | |||
| if (($architecture eq "mips32") || ($architecture eq "mips64")) { | |||
| $compiler_name .= " -mabi=n32" if ($binary eq "32"); | |||
| $compiler_name .= " -mabi=64" if ($binary eq "64"); | |||
| $defined = 1; | |||
| } | |||
| if ($architecture eq "alpha") { | |||
| $defined = 1; | |||
| $binary = 64; | |||
| } | |||
| if ($architecture eq "ia64") { | |||
| $defined = 1; | |||
| $binary = 64; | |||
| } | |||
| if (($architecture eq "x86") && ($os ne Darwin) && ($os ne SunOS)) { | |||
| $defined = 1; | |||
| $binary =32; | |||
| } | |||
| if ($compiler eq "PGI") { | |||
| $compiler_name .= " -tp p7" if ($binary eq "32"); | |||
| $compiler_name .= " -tp p7-64" if ($binary eq "64"); | |||
| $openmp = "-mp"; | |||
| $defined = 1; | |||
| } | |||
| if ($compiler eq "IBM") { | |||
| $compiler_name .= " -q32" if ($binary eq "32"); | |||
| $compiler_name .= " -q64" if ($binary eq "64"); | |||
| $openmp = "-qsmp=omp"; | |||
| $defined = 1; | |||
| } | |||
| if ($compiler eq "INTEL") { | |||
| $openmp = "-openmp"; | |||
| } | |||
| if ($compiler eq "PATHSCALE") { | |||
| $openmp = "-mp"; | |||
| } | |||
| if ($compiler eq "OPEN64") { | |||
| $openmp = "-mp"; | |||
| } | |||
| if ($compiler eq "GCC") { | |||
| $openmp = "-fopenmp"; | |||
| } | |||
| if ($defined == 0) { | |||
| $compiler_name .= " -m32" if ($binary eq "32"); | |||
| $compiler_name .= " -m64" if ($binary eq "64"); | |||
| } | |||
| # Do again | |||
| $data = `$compiler_name -E ctest.c`; | |||
| if ($?) { | |||
| printf STDERR "C Compiler ($compiler_name) is something wrong.\n"; | |||
| die 1; | |||
| } | |||
| $architecture = x86 if ($data =~ /ARCH_X86/); | |||
| $architecture = x86_64 if ($data =~ /ARCH_X86_64/); | |||
| $architecture = power if ($data =~ /ARCH_POWER/); | |||
| $architecture = mips32 if ($data =~ /ARCH_MIPS32/); | |||
| $architecture = mips64 if ($data =~ /ARCH_MIPS64/); | |||
| $architecture = alpha if ($data =~ /ARCH_ALPHA/); | |||
| $architecture = sparc if ($data =~ /ARCH_SPARC/); | |||
| $architecture = ia64 if ($data =~ /ARCH_IA64/); | |||
| $binformat = bin32; | |||
| $binformat = bin64 if ($data =~ /BINARY_64/); | |||
| $data = `$compiler_name -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`; | |||
| $data =~ /globl\ ([_\.]*)(.*)/; | |||
| $need_fu = $1; | |||
| $cross = 0; | |||
| $cross = 1 if ($os ne $hostos); | |||
| if ($architecture ne $hostarch) { | |||
| $cross = 1; | |||
| $cross = 0 if (($hostarch eq "x86_64") && ($architecture eq "x86")); | |||
| $cross = 0 if (($hostarch eq "mips64") && ($architecture eq "mips")); | |||
| } | |||
| $openmp = "" if $ENV{USE_OPENMP} != 1; | |||
| $linker_L = ""; | |||
| $linker_l = ""; | |||
| $linker_a = ""; | |||
| { | |||
| $link = `$compiler_name -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $openmp -v ctest2.o -o ctest2 2>&1 && rm -f ctest2.o ctest2 ctest2.exe`; | |||
| $link =~ s/\-Y\sP\,/\-Y/g; | |||
| @flags = split(/[\s\,\n]/, $link); | |||
| foreach $flags (@flags) { | |||
| if ( | |||
| ($flags =~ /^\-L/) | |||
| && ($flags !~ /^-LIST:/) | |||
| && ($flags !~ /^-LANG:/) | |||
| ) { | |||
| $linker_L .= $flags . " " | |||
| } | |||
| if ($flags =~ /^\-Y/) { | |||
| $linker_L .= "-Wl,". $flags . " " | |||
| } | |||
| if ( | |||
| ($flags =~ /^\-l/) | |||
| && ($flags !~ /gfortranbegin/) | |||
| && ($flags !~ /frtbegin/) | |||
| && ($flags !~ /pathfstart/) | |||
| && ($flags !~ /numa/) | |||
| && ($flags !~ /crt[0-9]/) | |||
| && ($flags !~ /gcc/) | |||
| && ($flags !~ /user32/) | |||
| && ($flags !~ /kernel32/) | |||
| && ($flags !~ /advapi32/) | |||
| && ($flags !~ /shell32/) | |||
| ) { | |||
| $linker_l .= $flags . " " | |||
| } | |||
| $linker_a .= $flags . " " if $flags =~ /\.a$/; | |||
| } | |||
| } | |||
| open(MAKEFILE, "> $makefile") || die "Can't create $makefile"; | |||
| open(CONFFILE, "> $config" ) || die "Can't create $config"; | |||
| # print $data, "\n"; | |||
| print MAKEFILE "OSNAME=$os\n"; | |||
| print MAKEFILE "ARCH=$architecture\n"; | |||
| print MAKEFILE "C_COMPILER=$compiler\n"; | |||
| print MAKEFILE "BINARY32=\n" if $binformat ne bin32; | |||
| print MAKEFILE "BINARY64=\n" if $binformat ne bin64; | |||
| print MAKEFILE "BINARY32=1\n" if $binformat eq bin32; | |||
| print MAKEFILE "BINARY64=1\n" if $binformat eq bin64; | |||
| print MAKEFILE "FU=$need_fu\n" if $need_fu ne ""; | |||
| print MAKEFILE "CROSS_SUFFIX=$cross_suffix\n" if $cross_suffix ne ""; | |||
| print MAKEFILE "CROSS=1\n" if $cross != 0; | |||
| print MAKEFILE "CEXTRALIB=$linker_L $linker_l $linker_a\n"; | |||
| $os =~ tr/[a-z]/[A-Z]/; | |||
| $architecture =~ tr/[a-z]/[A-Z]/; | |||
| $compiler =~ tr/[a-z]/[A-Z]/; | |||
| print CONFFILE "#define OS_$os\t1\n"; | |||
| print CONFFILE "#define ARCH_$architecture\t1\n"; | |||
| print CONFFILE "#define C_$compiler\t1\n"; | |||
| print CONFFILE "#define __32BIT__\t1\n" if $binformat eq bin32; | |||
| print CONFFILE "#define __64BIT__\t1\n" if $binformat eq bin64; | |||
| print CONFFILE "#define FUNDERSCORE\t$need_fu\n" if $need_fu ne ""; | |||
| if ($os eq "LINUX") { | |||
| @pthread = split(/\s+/, `nm /lib/libpthread.so* | grep _pthread_create`); | |||
| if ($pthread[2] ne "") { | |||
| print CONFFILE "#define PTHREAD_CREATE_FUNC $pthread[2]\n"; | |||
| } else { | |||
| print CONFFILE "#define PTHREAD_CREATE_FUNC pthread_create\n"; | |||
| } | |||
| } else { | |||
| print CONFFILE "#define PTHREAD_CREATE_FUNC pthread_create\n"; | |||
| } | |||
| close(MAKEFILE); | |||
| close(CONFFILE); | |||
| @@ -0,0 +1,273 @@ | |||
| #ifndef CBLAS_H | |||
| #define CBLAS_H | |||
| #define CBLAS_INDEX size_t | |||
| enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102}; | |||
| enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; | |||
| enum CBLAS_UPLO {CblasUpper=121, CblasLower=122}; | |||
| enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132}; | |||
| enum CBLAS_SIDE {CblasLeft=141, CblasRight=142}; | |||
| float cblas_sdsdot(blasint n, float, float *x, blasint incx, float *y, blasint incy); | |||
| double cblas_dsdot (blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| float cblas_sdot(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| double cblas_ddot(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| float _Complex cblas_cdotu(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| float _Complex cblas_cdotc(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| double _Complex cblas_zdotu(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| double _Complex cblas_zdotc(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_cdotu_sub(blasint n, float *x, blasint incx, float *y, blasint incy, float _Complex *ret); | |||
| void cblas_cdotc_sub(blasint n, float *x, blasint incx, float *y, blasint incy, float _Complex *ret); | |||
| void cblas_zdotu_sub(blasint n, double *x, blasint incx, double *y, blasint incy, double _Complex *ret); | |||
| void cblas_zdotc_sub(blasint n, double *x, blasint incx, double *y, blasint incy, double _Complex *ret); | |||
| float cblas_sasum (blasint n, float *x, blasint incx); | |||
| double cblas_dasum (blasint n, double *x, blasint incx); | |||
| float cblas_scasum(blasint n, float *x, blasint incx); | |||
| double cblas_dzasum(blasint n, double *x, blasint incx); | |||
| float cblas_snrm2 (blasint N, float *X, blasint incX); | |||
| double cblas_dnrm2 (blasint N, double *X, blasint incX); | |||
| float cblas_scnrm2(blasint N, float *X, blasint incX); | |||
| double cblas_dznrm2(blasint N, double *X, blasint incX); | |||
| CBLAS_INDEX cblas_isamax(blasint n, float *x, blasint incx); | |||
| CBLAS_INDEX cblas_idamax(blasint n, double *x, blasint incx); | |||
| CBLAS_INDEX cblas_icamax(blasint n, float *x, blasint incx); | |||
| CBLAS_INDEX cblas_izamax(blasint n, double *x, blasint incx); | |||
| void cblas_saxpy(blasint n, float, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_daxpy(blasint n, double, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_caxpy(blasint n, float *, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_zaxpy(blasint n, double *, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_scopy(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_dcopy(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_ccopy(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_zcopy(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_sswap(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_dswap(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_cswap(blasint n, float *x, blasint incx, float *y, blasint incy); | |||
| void cblas_zswap(blasint n, double *x, blasint incx, double *y, blasint incy); | |||
| void cblas_srot(blasint N, float *X, blasint incX, float *Y, blasint incY, float c, float s); | |||
| void cblas_drot(blasint N, double *X, blasint incX, double *Y, blasint incY, double c, double s); | |||
| void cblas_srotg(float *a, float *b, float *c, float *s); | |||
| void cblas_drotg(double *a, double *b, double *c, double *s); | |||
| void cblas_srotm(blasint N, float *X, blasint incX, float *Y, blasint incY, float *P); | |||
| void cblas_drotm(blasint N, double *X, blasint incX, double *Y, blasint incY, double *P); | |||
| void cblas_srotmg(float *d1, float *d2, float *b1, float b2, float *P); | |||
| void cblas_drotmg(double *d1, double *d2, double *b1, double b2, double *P); | |||
| void cblas_sscal(blasint N, float alpha, float *X, blasint incX); | |||
| void cblas_dscal(blasint N, double alpha, double *X, blasint incX); | |||
| void cblas_cscal(blasint N, float *alpha, float *X, blasint incX); | |||
| void cblas_zscal(blasint N, double *alpha, double *X, blasint incX); | |||
| void cblas_csscal(blasint N, float alpha, float *X, blasint incX); | |||
| void cblas_zdscal(blasint N, double alpha, double *X, blasint incX); | |||
| void cblas_sgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, | |||
| float alpha, float *a, blasint lda, float *x, blasint incx, float beta, float *y, blasint incy); | |||
| void cblas_dgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, | |||
| double alpha, double *a, blasint lda, double *x, blasint incx, double beta, double *y, blasint incy); | |||
| void cblas_cgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, | |||
| float *alpha, float *a, blasint lda, float *x, blasint incx, float *beta, float *y, blasint incy); | |||
| void cblas_zgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, | |||
| double *alpha, double *a, blasint lda, double *x, blasint incx, double *beta, double *y, blasint incy); | |||
| void cblas_sger (enum CBLAS_ORDER order, blasint M, blasint N, float alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); | |||
| void cblas_dger (enum CBLAS_ORDER order, blasint M, blasint N, double alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); | |||
| void cblas_cgeru(enum CBLAS_ORDER order, blasint M, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); | |||
| void cblas_cgerc(enum CBLAS_ORDER order, blasint M, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); | |||
| void cblas_zgeru(enum CBLAS_ORDER order, blasint M, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); | |||
| void cblas_zgerc(enum CBLAS_ORDER order, blasint M, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); | |||
| void cblas_strsv(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); | |||
| void cblas_dtrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_ctrsv(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); | |||
| void cblas_ztrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_strmv(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); | |||
| void cblas_dtrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_ctrmv(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); | |||
| void cblas_ztrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_ssyr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A, blasint lda); | |||
| void cblas_dsyr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *A, blasint lda); | |||
| void cblas_cher(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A, blasint lda); | |||
| void cblas_zher(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *A, blasint lda); | |||
| void cblas_ssyr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,blasint N, float alpha, float *X, | |||
| blasint incX, float *Y, blasint incY, float *A, blasint lda); | |||
| void cblas_dsyr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, | |||
| blasint incX, double *Y, blasint incY, double *A, blasint lda); | |||
| void cblas_cher2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float *alpha, float *X, blasint incX, | |||
| float *Y, blasint incY, float *A, blasint lda); | |||
| void cblas_zher2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *X, blasint incX, | |||
| double *Y, blasint incY, double *A, blasint lda); | |||
| void cblas_sgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, | |||
| blasint KL, blasint KU, float alpha, float *A, blasint lda, float *X, blasint incX, float beta, float *Y, blasint incY); | |||
| void cblas_dgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, | |||
| blasint KL, blasint KU, double alpha, double *A, blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); | |||
| void cblas_cgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, | |||
| blasint KL, blasint KU, float *alpha, float *A, blasint lda, float *X, blasint incX, float *beta, float *Y, blasint incY); | |||
| void cblas_zgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, | |||
| blasint KL, blasint KU, double *alpha, double *A, blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); | |||
| void cblas_ssbmv(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); | |||
| void cblas_dsbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, double alpha, double *A, | |||
| blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); | |||
| void cblas_stbmv(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); | |||
| void cblas_dtbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_ctbmv(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); | |||
| void cblas_ztbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_stbsv(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); | |||
| void cblas_dtbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_ctbsv(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); | |||
| void cblas_ztbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); | |||
| void cblas_stpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, float *Ap, float *X, blasint incX); | |||
| void cblas_dtpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, double *Ap, double *X, blasint incX); | |||
| void cblas_ctpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, float *Ap, float *X, blasint incX); | |||
| void cblas_ztpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, double *Ap, double *X, blasint incX); | |||
| void cblas_stpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, float *Ap, float *X, blasint incX); | |||
| void cblas_dtpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, double *Ap, double *X, blasint incX); | |||
| void cblas_ctpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, float *Ap, float *X, blasint incX); | |||
| void cblas_ztpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, | |||
| blasint N, double *Ap, double *X, blasint incX); | |||
| void cblas_ssymv(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); | |||
| void cblas_dsymv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *A, | |||
| blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); | |||
| void cblas_chemv(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); | |||
| void cblas_zhemv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *A, | |||
| blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); | |||
| void cblas_sspmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *Ap, | |||
| float *X, blasint incX, float beta, float *Y, blasint incY); | |||
| void cblas_dspmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *Ap, | |||
| double *X, blasint incX, double beta, double *Y, blasint incY); | |||
| void cblas_sspr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *Ap); | |||
| void cblas_dspr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *Ap); | |||
| void cblas_chpr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A); | |||
| void cblas_zhpr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X,blasint incX, double *A); | |||
| void cblas_sspr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *Y, blasint incY, float *A); | |||
| void cblas_dspr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *Y, blasint incY, double *A); | |||
| void cblas_chpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *Ap); | |||
| void cblas_zhpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *Ap); | |||
| void cblas_chbmv(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); | |||
| void cblas_zhbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, | |||
| double *alpha, double *A, blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); | |||
| void cblas_chpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, | |||
| float *alpha, float *Ap, float *X, blasint incX, float *beta, float *Y, blasint incY); | |||
| void cblas_zhpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, | |||
| double *alpha, double *Ap, double *X, blasint incX, double *beta, double *Y, blasint incY); | |||
| void cblas_sgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, | |||
| float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); | |||
| void cblas_dgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, | |||
| double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); | |||
| void cblas_cgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, | |||
| float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); | |||
| void cblas_zgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, | |||
| double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); | |||
| void cblas_ssymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); | |||
| void cblas_dsymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); | |||
| void cblas_csymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); | |||
| void cblas_zsymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); | |||
| void cblas_ssyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, float alpha, float *A, blasint lda, float beta, float *C, blasint ldc); | |||
| void cblas_dsyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, double alpha, double *A, blasint lda, double beta, double *C, blasint ldc); | |||
| void cblas_csyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, float *alpha, float *A, blasint lda, float *beta, float *C, blasint ldc); | |||
| void cblas_zsyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, double *alpha, double *A, blasint lda, double *beta, double *C, blasint ldc); | |||
| void cblas_ssyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); | |||
| void cblas_dsyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); | |||
| void cblas_csyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); | |||
| void cblas_zsyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, | |||
| blasint N, blasint K, double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); | |||
| void cblas_strmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, float alpha, float *A, blasint lda, float *B, blasint ldb); | |||
| void cblas_dtrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, double alpha, double *A, blasint lda, double *B, blasint ldb); | |||
| void cblas_ctrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, float *alpha, float *A, blasint lda, float *B, blasint ldb); | |||
| void cblas_ztrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, double *alpha, double *A, blasint lda, double *B, blasint ldb); | |||
| void cblas_strsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, float alpha, float *A, blasint lda, float *B, blasint ldb); | |||
| void cblas_dtrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, double alpha, double *A, blasint lda, double *B, blasint ldb); | |||
| void cblas_ctrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, float *alpha, float *A, blasint lda, float *B, blasint ldb); | |||
| void cblas_ztrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, | |||
| enum CBLAS_DIAG Diag, blasint M, blasint N, double *alpha, double *A, blasint lda, double *B, blasint ldb); | |||
| void cblas_chemm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); | |||
| void cblas_zhemm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, | |||
| double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); | |||
| void cblas_cherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, | |||
| float alpha, float *A, blasint lda, float beta, float *C, blasint ldc); | |||
| void cblas_zherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, | |||
| double alpha, double *A, blasint lda, double beta, double *C, blasint ldc); | |||
| void cblas_cher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, | |||
| float *alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); | |||
| void cblas_zher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, | |||
| double *alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); | |||
| void cblas_xerbla(blasint p, char *rout, char *form, ...); | |||
| #endif | |||
| @@ -0,0 +1,610 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_H | |||
| #define COMMON_H | |||
| #ifndef _GNU_SOURCE | |||
| #define _GNU_SOURCE | |||
| #endif | |||
| #ifndef __USE_XOPEN | |||
| #define __USE_XOPEN | |||
| #endif | |||
| #ifndef __USE_SVID | |||
| #define __USE_SVID | |||
| #endif | |||
| #ifdef BUILD_KERNEL | |||
| #include "config_kernel.h" | |||
| #else | |||
| #include "config.h" | |||
| #endif | |||
| #undef ENABLE_SSE_EXCEPTION | |||
| #if defined(SMP_SERVER) || defined(SMP_ONDEMAND) | |||
| #define SMP | |||
| #endif | |||
| #if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_Interix) | |||
| #define WINDOWS_ABI | |||
| #define OS_WINDOWS | |||
| #ifdef DOUBLE | |||
| #define DOUBLE_DEFINED DOUBLE | |||
| #undef DOUBLE | |||
| #endif | |||
| #endif | |||
| #if !defined(NOINCLUDE) && !defined(ASSEMBLER) | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <unistd.h> | |||
| #ifdef OS_LINUX | |||
| #include <malloc.h> | |||
| #include <sched.h> | |||
| #endif | |||
| #ifdef OS_WINDOWS | |||
| #ifdef ATOM | |||
| #define GOTO_ATOM ATOM | |||
| #undef ATOM | |||
| #endif | |||
| #include <windows.h> | |||
| #include <math.h> | |||
| #ifdef GOTO_ATOM | |||
| #define ATOM GOTO_ATOM | |||
| #undef GOTO_ATOM | |||
| #endif | |||
| #else | |||
| #include <sys/mman.h> | |||
| #include <sys/shm.h> | |||
| #include <sys/time.h> | |||
| #include <unistd.h> | |||
| #include <math.h> | |||
| #ifdef SMP | |||
| #include <pthread.h> | |||
| #endif | |||
| #endif | |||
| #if defined(OS_SUNOS) | |||
| #include <thread.h> | |||
| #endif | |||
| #ifdef __DECC | |||
| #include <c_asm.h> | |||
| #include <machine/builtins.h> | |||
| #endif | |||
| #if defined(ARCH_IA64) && defined(ENABLE_SSE_EXCEPTION) | |||
| #include <fenv.h> | |||
| #endif | |||
| #endif | |||
| #if defined(OS_WINDOWS) && defined(DOUBLE_DEFINED) | |||
| #define DOUBLE DOUBLE_DEFINED | |||
| #undef DOUBLE_DEFINED | |||
| #endif | |||
| #undef DEBUG_INFO | |||
| #define SMP_DEBUG | |||
| #undef MALLOC_DEBUG | |||
| #undef SMP_ALLOC_DEBUG | |||
| #ifndef ZERO | |||
| #ifdef XDOUBLE | |||
| #define ZERO 0.e0L | |||
| #elif defined DOUBLE | |||
| #define ZERO 0.e0 | |||
| #else | |||
| #define ZERO 0.e0f | |||
| #endif | |||
| #endif | |||
| #ifndef ONE | |||
| #ifdef XDOUBLE | |||
| #define ONE 1.e0L | |||
| #elif defined DOUBLE | |||
| #define ONE 1.e0 | |||
| #else | |||
| #define ONE 1.e0f | |||
| #endif | |||
| #endif | |||
| #define BITMASK(a, b, c) ((((a) >> (b)) & (c))) | |||
| #define ALLOCA_ALIGN 63UL | |||
| #define NUM_BUFFERS (MAX_CPU_NUMBER * 2) | |||
| #ifdef NEEDBUNDERSCORE | |||
| #define BLASFUNC(FUNC) FUNC##_ | |||
| #else | |||
| #define BLASFUNC(FUNC) FUNC | |||
| #endif | |||
| #undef USE_PTHREAD_LOCK | |||
| #undef USE_PTHREAD_SPINLOCK | |||
| #if defined(USE_PTHREAD_LOCK) && defined(USE_PTHREAD_SPINLOCK) | |||
| #error "You can't specify both LOCK operation!" | |||
| #endif | |||
| #ifdef SMP | |||
| #define USE_PTHREAD_LOCK | |||
| #undef USE_PTHREAD_SPINLOCK | |||
| #endif | |||
| #ifdef OS_WINDOWS | |||
| #undef USE_PTHREAD_LOCK | |||
| #undef USE_PTHREAD_SPINLOCK | |||
| #endif | |||
| #if defined(USE_PTHREAD_LOCK) | |||
| #define LOCK_COMMAND(x) pthread_mutex_lock(x) | |||
| #define UNLOCK_COMMAND(x) pthread_mutex_unlock(x) | |||
| #elif defined(USE_PTHREAD_SPINLOCK) | |||
| #ifndef ASSEMBLER | |||
| typedef volatile int pthread_spinlock_t; | |||
| int pthread_spin_lock (pthread_spinlock_t *__lock); | |||
| int pthread_spin_unlock (pthread_spinlock_t *__lock); | |||
| #endif | |||
| #define LOCK_COMMAND(x) pthread_spin_lock(x) | |||
| #define UNLOCK_COMMAND(x) pthread_spin_unlock(x) | |||
| #else | |||
| #define LOCK_COMMAND(x) blas_lock(x) | |||
| #define UNLOCK_COMMAND(x) blas_unlock(x) | |||
| #endif | |||
| #define GOTO_SHMID 0x510510 | |||
| #if 0 | |||
| #ifndef __CUDACC__ | |||
| #define __global__ | |||
| #define __device__ | |||
| #define __host__ | |||
| #define __shared__ | |||
| #endif | |||
| #endif | |||
| #ifndef ASSEMBLER | |||
| #ifdef QUAD_PRECISION | |||
| typedef struct { | |||
| unsigned long x[2]; | |||
| } xdouble; | |||
| #elif defined EXPRECISION | |||
| #define xdouble long double | |||
| #else | |||
| #define xdouble double | |||
| #endif | |||
| #if defined(OS_WINDOWS) && defined(__64BIT__) | |||
| typedef long long BLASLONG; | |||
| typedef unsigned long long BLASULONG; | |||
| #else | |||
| typedef long BLASLONG; | |||
| typedef unsigned long BLASULONG; | |||
| #endif | |||
| #ifdef USE64BITINT | |||
| typedef BLASLONG blasint; | |||
| #else | |||
| typedef int blasint; | |||
| #endif | |||
| #else | |||
| #ifdef USE64BITINT | |||
| #define INTSHIFT 3 | |||
| #define INTSIZE 8 | |||
| #else | |||
| #define INTSHIFT 2 | |||
| #define INTSIZE 4 | |||
| #endif | |||
| #endif | |||
| #ifdef XDOUBLE | |||
| #define FLOAT xdouble | |||
| #ifdef QUAD_PRECISION | |||
| #define XFLOAT xidouble | |||
| #endif | |||
| #ifdef QUAD_PRECISION | |||
| #define SIZE 32 | |||
| #define BASE_SHIFT 5 | |||
| #define ZBASE_SHIFT 6 | |||
| #else | |||
| #define SIZE 16 | |||
| #define BASE_SHIFT 4 | |||
| #define ZBASE_SHIFT 5 | |||
| #endif | |||
| #elif defined(DOUBLE) | |||
| #define FLOAT double | |||
| #define SIZE 8 | |||
| #define BASE_SHIFT 3 | |||
| #define ZBASE_SHIFT 4 | |||
| #else | |||
| #define FLOAT float | |||
| #define SIZE 4 | |||
| #define BASE_SHIFT 2 | |||
| #define ZBASE_SHIFT 3 | |||
| #endif | |||
| #ifndef XFLOAT | |||
| #define XFLOAT FLOAT | |||
| #endif | |||
| #ifndef COMPLEX | |||
| #define COMPSIZE 1 | |||
| #else | |||
| #define COMPSIZE 2 | |||
| #endif | |||
| #if defined(C_PGI) || defined(C_SUN) | |||
| #define CREAL(X) (*((FLOAT *)&X + 0)) | |||
| #define CIMAG(X) (*((FLOAT *)&X + 1)) | |||
| #else | |||
| #define CREAL __real__ | |||
| #define CIMAG __imag__ | |||
| #endif | |||
| #define Address_H(x) (((x)+(1<<15))>>16) | |||
| #define Address_L(x) ((x)-((Address_H(x))<<16)) | |||
| #ifndef MAX_CPU_NUMBER | |||
| #define MAX_CPU_NUMBER 2 | |||
| #endif | |||
| #if defined(OS_SUNOS) | |||
| #define YIELDING thr_yield() | |||
| #endif | |||
| #if defined(OS_WINDOWS) | |||
| #define YIELDING SwitchToThread() | |||
| #endif | |||
| #ifndef YIELDING | |||
| #define YIELDING sched_yield() | |||
| #endif | |||
| #ifdef QUAD_PRECISION | |||
| #include "common_quad.h" | |||
| #endif | |||
| #ifdef ARCH_ALPHA | |||
| #include "common_alpha.h" | |||
| #endif | |||
| #ifdef ARCH_X86 | |||
| #include "common_x86.h" | |||
| #endif | |||
| #ifdef ARCH_X86_64 | |||
| #include "common_x86_64.h" | |||
| #endif | |||
| #ifdef ARCH_IA64 | |||
| #include "common_ia64.h" | |||
| #endif | |||
| #ifdef ARCH_POWER | |||
| #include "common_power.h" | |||
| #endif | |||
| #ifdef sparc | |||
| #include "common_sparc.h" | |||
| #endif | |||
| #ifdef ARCH_MIPS64 | |||
| #include "common_mips64.h" | |||
| #endif | |||
| #ifdef OS_LINUX | |||
| #include "common_linux.h" | |||
| #endif | |||
| #define MMAP_ACCESS (PROT_READ | PROT_WRITE) | |||
| #define MMAP_POLICY (MAP_PRIVATE | MAP_ANONYMOUS) | |||
| #include "param.h" | |||
| #include "common_param.h" | |||
| #ifndef STDERR | |||
| #define STDERR stderr | |||
| #endif | |||
| #ifndef MASK | |||
| #define MASK(a, b) (((a) + ((b) - 1)) & ~((b) - 1)) | |||
| #endif | |||
| #if defined(XDOUBLE) || defined(DOUBLE) | |||
| #define FLOATRET FLOAT | |||
| #else | |||
| #ifdef NEED_F2CCONV | |||
| #define FLOATRET double | |||
| #else | |||
| #define FLOATRET float | |||
| #endif | |||
| #endif | |||
| #ifndef IFLUSH | |||
| #define IFLUSH | |||
| #endif | |||
| #ifndef IFLUSH_HALF | |||
| #define IFLUSH_HALF | |||
| #endif | |||
| #if defined(C_GCC) && (( __GNUC__ <= 3) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2))) | |||
| #ifdef USE_OPENMP | |||
| #undef USE_OPENMP | |||
| #endif | |||
| #endif | |||
| #ifndef ASSEMBLER | |||
| #ifndef MIN | |||
| #define MIN(a,b) (a>b? b:a) | |||
| #endif | |||
| #ifndef MAX | |||
| #define MAX(a,b) (a<b? b:a) | |||
| #endif | |||
| #define TOUPPER(a) {if ((a) > 0x60) (a) -= 0x20;} | |||
| #if defined(__FreeBSD__) || defined(__APPLE__) | |||
| #define MAP_ANONYMOUS MAP_ANON | |||
| #endif | |||
| /* Common Memory Management Routine */ | |||
| void blas_set_parameter(void); | |||
| int blas_get_cpu_number(void); | |||
| void *blas_memory_alloc (int); | |||
| void blas_memory_free (void *); | |||
| int get_num_procs (void); | |||
| #if defined(OS_LINUX) && defined(SMP) && !defined(NO_AFFINITY) | |||
| int get_num_nodes (void); | |||
| int get_num_proc (int); | |||
| int get_node_equal (void); | |||
| #endif | |||
| void goto_set_num_threads(int); | |||
| void gotoblas_affinity_init(void); | |||
| void gotoblas_affinity_quit(void); | |||
| void gotoblas_dynamic_init(void); | |||
| void gotoblas_dynamic_quit(void); | |||
| void gotoblas_profile_init(void); | |||
| void gotoblas_profile_quit(void); | |||
| #ifdef USE_OPENMP | |||
| int omp_in_parallel(void); | |||
| int omp_get_num_procs(void); | |||
| #else | |||
| #ifdef __ELF__ | |||
| int omp_in_parallel (void) __attribute__ ((weak)); | |||
| int omp_get_num_procs(void) __attribute__ ((weak)); | |||
| #endif | |||
| #endif | |||
| static __inline void blas_unlock(volatile BLASULONG *address){ | |||
| MB; | |||
| *address = 0; | |||
| } | |||
| static __inline int readenv(char *env) { | |||
| char *p; | |||
| p = getenv(env); | |||
| if (p == NULL) return 0; else return atoi(p); | |||
| } | |||
| #if !defined(XDOUBLE) || !defined(QUAD_PRECISION) | |||
| static __inline void compinv(FLOAT *b, FLOAT ar, FLOAT ai){ | |||
| #ifndef UNIT | |||
| FLOAT ratio, den; | |||
| if ( | |||
| #ifdef XDOUBLE | |||
| (fabsl(ar)) >= (fabsl(ai)) | |||
| #elif defined DOUBLE | |||
| (fabs (ar)) >= (fabs (ai)) | |||
| #else | |||
| (fabsf(ar)) >= (fabsf(ai)) | |||
| #endif | |||
| ) { | |||
| ratio = ai / ar; | |||
| den = (FLOAT)(ONE / (ar * (ONE + ratio * ratio))); | |||
| ar = den; | |||
| ai = -ratio * den; | |||
| } else { | |||
| ratio = ar / ai; | |||
| den = (FLOAT)(ONE /(ai * (ONE + ratio * ratio))); | |||
| ar = ratio * den; | |||
| ai = -den; | |||
| } | |||
| b[0] = ar; | |||
| b[1] = ai; | |||
| #else | |||
| b[0] = ONE; | |||
| b[1] = ZERO; | |||
| #endif | |||
| } | |||
| #endif | |||
| #ifdef MALLOC_DEBUG | |||
| void *blas_debug_alloc(int); | |||
| void *blas_debug_free(void *); | |||
| #undef malloc | |||
| #undef free | |||
| #define malloc(a) blas_debug_alloc(a) | |||
| #define free(a) blas_debug_free (a) | |||
| #endif | |||
| #ifndef COPYOVERHEAD | |||
| #define GEMMRETTYPE int | |||
| #else | |||
| typedef struct { | |||
| double outercopy; | |||
| double innercopy; | |||
| double kernel; | |||
| double mflops; | |||
| } copyoverhead_t; | |||
| #define GEMMRETTYPE copyoverhead_t | |||
| #endif | |||
| #endif | |||
| #ifndef BUILD_KERNEL | |||
| #define KNAME(A, B) A | |||
| #else | |||
| #define KNAME(A, B) A##B | |||
| #endif | |||
| #include "common_interface.h" | |||
| #ifdef SANITY_CHECK | |||
| #include "common_reference.h" | |||
| #endif | |||
| #include "common_macro.h" | |||
| #include "common_level1.h" | |||
| #include "common_level2.h" | |||
| #include "common_level3.h" | |||
| #include "common_lapack.h" | |||
| #ifdef CBLAS | |||
| #include "cblas.h" | |||
| #endif | |||
| #ifndef ASSEMBLER | |||
| #if 0 | |||
| #include "symcopy.h" | |||
| #endif | |||
| #if defined(SMP_SERVER) && defined(SMP_ONDEMAND) | |||
| #error Both SMP_SERVER and SMP_ONDEMAND are specified. | |||
| #endif | |||
| #if defined(SMP_SERVER) || defined(SMP_ONDEMAND) | |||
| #include "common_thread.h" | |||
| #endif | |||
| #endif | |||
| #define INFO_NUM 99 | |||
| #ifndef DEFAULT_CPU_NUMBER | |||
| #define DEFAULT_CPU_NUMBER 4 | |||
| #endif | |||
| #ifndef IDEBUG_START | |||
| #define IDEBUG_START | |||
| #endif | |||
| #ifndef IDEBUG_END | |||
| #define IDEBUG_END | |||
| #endif | |||
| #if !defined(ASSEMBLER) && defined(FUNCTION_PROFILE) | |||
| typedef struct { | |||
| int func; | |||
| unsigned long long calls, fops, area, cycles, tcycles; | |||
| } func_profile_t; | |||
| extern func_profile_t function_profile_table[]; | |||
| extern int gotoblas_profile; | |||
| #ifdef XDOUBLE | |||
| #define NUMOPT QNUMOPT | |||
| #elif defined DOUBLE | |||
| #define NUMOPT DNUMOPT | |||
| #else | |||
| #define NUMOPT SNUMOPT | |||
| #endif | |||
| #define FUNCTION_PROFILE_START() { unsigned long long profile_start = rpcc(), profile_end; | |||
| #ifdef SMP | |||
| #define FUNCTION_PROFILE_END(COMP, AREA, OPS) \ | |||
| if (gotoblas_profile) { \ | |||
| profile_end = rpcc(); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].calls ++; \ | |||
| function_profile_table[PROFILE_FUNC_NAME].area += SIZE * COMPSIZE * (AREA); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].fops += (COMP) * (OPS) / NUMOPT; \ | |||
| function_profile_table[PROFILE_FUNC_NAME].cycles += (profile_end - profile_start); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].tcycles += blas_cpu_number * (profile_end - profile_start); \ | |||
| } \ | |||
| } | |||
| #else | |||
| #define FUNCTION_PROFILE_END(COMP, AREA, OPS) \ | |||
| if (gotoblas_profile) { \ | |||
| profile_end = rpcc(); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].calls ++; \ | |||
| function_profile_table[PROFILE_FUNC_NAME].area += SIZE * COMPSIZE * (AREA); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].fops += (COMP) * (OPS) / NUMOPT; \ | |||
| function_profile_table[PROFILE_FUNC_NAME].cycles += (profile_end - profile_start); \ | |||
| function_profile_table[PROFILE_FUNC_NAME].tcycles += (profile_end - profile_start); \ | |||
| } \ | |||
| } | |||
| #endif | |||
| #else | |||
| #define FUNCTION_PROFILE_START() | |||
| #define FUNCTION_PROFILE_END(COMP, AREA, OPS) | |||
| #endif | |||
| #if 1 | |||
| #define PRINT_DEBUG_CNAME | |||
| #define PRINT_DEBUG_NAME | |||
| #else | |||
| #define PRINT_DEBUG_CNAME if (readenv("GOTO_DEBUG")) fprintf(stderr, "GotoBLAS : %s\n", CHAR_CNAME) | |||
| #define PRINT_DEBUG_NAME if (readenv("GOTO_DEBUG")) fprintf(stderr, "GotoBLAS : %s\n", CHAR_NAME) | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,179 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_ALPHA | |||
| #define COMMON_ALPHA | |||
| #ifndef ASSEMBLER | |||
| #define MB asm("mb") | |||
| #define WMB asm("wmb") | |||
| static void __inline blas_lock(unsigned long *address){ | |||
| #ifndef __DECC | |||
| unsigned long tmp1, tmp2; | |||
| asm volatile( | |||
| "1: ldq %1, %0\n" | |||
| " bne %1, 2f\n" | |||
| " ldq_l %1, %0\n" | |||
| " bne %1, 2f\n" | |||
| " or %1, 1, %2\n" | |||
| " stq_c %2, %0\n" | |||
| " beq %2, 2f\n" | |||
| " mb\n " | |||
| " br $31, 3f\n" | |||
| "2: br $31, 1b\n" | |||
| "3:\n" : "=m"(*address), "=&r"(tmp1), "=&r"(tmp2) : : "memory"); | |||
| #else | |||
| asm ( | |||
| "10:" | |||
| " ldq %t0, 0(%a0); " | |||
| " bne %t0, 20f; " | |||
| " ldq_l %t0, 0(%a0); " | |||
| " bne %t0, 20f; " | |||
| " or %t0, 1, %t1;" | |||
| " stq_c %t1, 0(%a0); " | |||
| " beq %t1, 20f; " | |||
| " mb; " | |||
| " br %r31,30f; " | |||
| "20: " | |||
| " br %r31,10b; " | |||
| "30:", address); | |||
| #endif | |||
| } | |||
| static __inline unsigned int rpcc(void){ | |||
| unsigned int r0; | |||
| #ifndef __DECC | |||
| asm __volatile__("rpcc %0" : "=r"(r0) : : "memory"); | |||
| #else | |||
| r0 = asm("rpcc %v0"); | |||
| #endif | |||
| return r0; | |||
| } | |||
| #define HALT ldq $0, 0($0) | |||
| #ifndef __DECC | |||
| #define GET_IMAGE(res) asm __volatile__("fmov $f1, %0" : "=f"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) res = dasm("fmov $f1, %f0") | |||
| #endif | |||
| #ifdef SMP | |||
| #ifdef USE64BITINT | |||
| static __inline long blas_quickdivide(long x, long y){ | |||
| return x/y; | |||
| } | |||
| #else | |||
| extern unsigned int blas_quick_divide_table[]; | |||
| static __inline int blas_quickdivide(unsigned int x, unsigned int y){ | |||
| if (y <= 1) return x; | |||
| return (int)((x * (unsigned long)blas_quick_divide_table[y]) >> 32); | |||
| } | |||
| #endif | |||
| #endif | |||
| #define BASE_ADDRESS ((0x1b0UL << 33) | (0x1c0UL << 23) | (0x000UL << 13)) | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE ( 8UL << 10) | |||
| #define HUGE_PAGESIZE ( 4 << 20) | |||
| #endif | |||
| #define BUFFER_SIZE (32UL << 20) | |||
| #else | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #define PROLOGUE \ | |||
| .arch ev6; \ | |||
| .set noat; \ | |||
| .set noreorder; \ | |||
| .text; \ | |||
| .align 5; \ | |||
| .globl REALNAME; \ | |||
| .ent REALNAME; \ | |||
| REALNAME: | |||
| #ifdef PROFILE | |||
| #define PROFCODE \ | |||
| ldgp $gp, 0($27); \ | |||
| lda $28, _mcount; \ | |||
| jsr $28, ($28), _mcount; \ | |||
| .prologue 1 | |||
| #else | |||
| #define PROFCODE .prologue 0 | |||
| #endif | |||
| #define EPILOGUE \ | |||
| .end REALNAME; \ | |||
| .ident VERSION | |||
| #endif | |||
| #ifdef DOUBLE | |||
| #define SXADDQ s8addq | |||
| #define SXSUBL s8subl | |||
| #define LD ldt | |||
| #define ST stt | |||
| #define STQ stq | |||
| #define ADD addt/su | |||
| #define SUB subt/su | |||
| #define MUL mult/su | |||
| #define DIV divt/su | |||
| #else | |||
| #define SXADDQ s4addq | |||
| #define SXSUBL s4subl | |||
| #define LD lds | |||
| #define ST sts | |||
| #define STQ stl | |||
| #define ADD adds/su | |||
| #define SUB subs/su | |||
| #define MUL muls/su | |||
| #define DIV divs/su | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,611 @@ | |||
| #ifndef COMMON_C_H | |||
| #define COMMON_C_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define CAMAX_K camax_k | |||
| #define CAMIN_K camin_k | |||
| #define CMAX_K cmax_k | |||
| #define CMIN_K cmin_k | |||
| #define ICAMAX_K icamax_k | |||
| #define ICAMIN_K icamin_k | |||
| #define ICMAX_K icmax_k | |||
| #define ICMIN_K icmin_k | |||
| #define CASUM_K casum_k | |||
| #define CAXPYU_K caxpy_k | |||
| #define CAXPYC_K caxpyc_k | |||
| #define CCOPY_K ccopy_k | |||
| #define CDOTU_K cdotu_k | |||
| #define CDOTC_K cdotc_k | |||
| #define CNRM2_K cnrm2_k | |||
| #define CSCAL_K cscal_k | |||
| #define CSWAP_K cswap_k | |||
| #define CROT_K csrot_k | |||
| #define CGEMV_N cgemv_n | |||
| #define CGEMV_T cgemv_t | |||
| #define CGEMV_R cgemv_r | |||
| #define CGEMV_C cgemv_c | |||
| #define CGEMV_O cgemv_o | |||
| #define CGEMV_U cgemv_u | |||
| #define CGEMV_S cgemv_s | |||
| #define CGEMV_D cgemv_d | |||
| #define CGERU_K cgeru_k | |||
| #define CGERC_K cgerc_k | |||
| #define CGERV_K cgerv_k | |||
| #define CGERD_K cgerd_k | |||
| #define CSYMV_U csymv_U | |||
| #define CSYMV_L csymv_L | |||
| #define CHEMV_U chemv_U | |||
| #define CHEMV_L chemv_L | |||
| #define CHEMV_V chemv_V | |||
| #define CHEMV_M chemv_M | |||
| #define CSYMV_THREAD_U csymv_thread_U | |||
| #define CSYMV_THREAD_L csymv_thread_L | |||
| #define CHEMV_THREAD_U chemv_thread_U | |||
| #define CHEMV_THREAD_L chemv_thread_L | |||
| #define CHEMV_THREAD_V chemv_thread_V | |||
| #define CHEMV_THREAD_M chemv_thread_M | |||
| #define CGEMM_ONCOPY cgemm_oncopy | |||
| #define CGEMM_OTCOPY cgemm_otcopy | |||
| #if CGEMM_DEFAULT_UNROLL_M == CGEMM_DEFAULT_UNROLL_N | |||
| #define CGEMM_INCOPY cgemm_oncopy | |||
| #define CGEMM_ITCOPY cgemm_otcopy | |||
| #else | |||
| #define CGEMM_INCOPY cgemm_incopy | |||
| #define CGEMM_ITCOPY cgemm_itcopy | |||
| #endif | |||
| #define CTRMM_OUNUCOPY ctrmm_ounucopy | |||
| #define CTRMM_OUNNCOPY ctrmm_ounncopy | |||
| #define CTRMM_OUTUCOPY ctrmm_outucopy | |||
| #define CTRMM_OUTNCOPY ctrmm_outncopy | |||
| #define CTRMM_OLNUCOPY ctrmm_olnucopy | |||
| #define CTRMM_OLNNCOPY ctrmm_olnncopy | |||
| #define CTRMM_OLTUCOPY ctrmm_oltucopy | |||
| #define CTRMM_OLTNCOPY ctrmm_oltncopy | |||
| #define CTRSM_OUNUCOPY ctrsm_ounucopy | |||
| #define CTRSM_OUNNCOPY ctrsm_ounncopy | |||
| #define CTRSM_OUTUCOPY ctrsm_outucopy | |||
| #define CTRSM_OUTNCOPY ctrsm_outncopy | |||
| #define CTRSM_OLNUCOPY ctrsm_olnucopy | |||
| #define CTRSM_OLNNCOPY ctrsm_olnncopy | |||
| #define CTRSM_OLTUCOPY ctrsm_oltucopy | |||
| #define CTRSM_OLTNCOPY ctrsm_oltncopy | |||
| #if CGEMM_DEFAULT_UNROLL_M == CGEMM_DEFAULT_UNROLL_N | |||
| #define CTRMM_IUNUCOPY ctrmm_ounucopy | |||
| #define CTRMM_IUNNCOPY ctrmm_ounncopy | |||
| #define CTRMM_IUTUCOPY ctrmm_outucopy | |||
| #define CTRMM_IUTNCOPY ctrmm_outncopy | |||
| #define CTRMM_ILNUCOPY ctrmm_olnucopy | |||
| #define CTRMM_ILNNCOPY ctrmm_olnncopy | |||
| #define CTRMM_ILTUCOPY ctrmm_oltucopy | |||
| #define CTRMM_ILTNCOPY ctrmm_oltncopy | |||
| #define CTRSM_IUNUCOPY ctrsm_ounucopy | |||
| #define CTRSM_IUNNCOPY ctrsm_ounncopy | |||
| #define CTRSM_IUTUCOPY ctrsm_outucopy | |||
| #define CTRSM_IUTNCOPY ctrsm_outncopy | |||
| #define CTRSM_ILNUCOPY ctrsm_olnucopy | |||
| #define CTRSM_ILNNCOPY ctrsm_olnncopy | |||
| #define CTRSM_ILTUCOPY ctrsm_oltucopy | |||
| #define CTRSM_ILTNCOPY ctrsm_oltncopy | |||
| #else | |||
| #define CTRMM_IUNUCOPY ctrmm_iunucopy | |||
| #define CTRMM_IUNNCOPY ctrmm_iunncopy | |||
| #define CTRMM_IUTUCOPY ctrmm_iutucopy | |||
| #define CTRMM_IUTNCOPY ctrmm_iutncopy | |||
| #define CTRMM_ILNUCOPY ctrmm_ilnucopy | |||
| #define CTRMM_ILNNCOPY ctrmm_ilnncopy | |||
| #define CTRMM_ILTUCOPY ctrmm_iltucopy | |||
| #define CTRMM_ILTNCOPY ctrmm_iltncopy | |||
| #define CTRSM_IUNUCOPY ctrsm_iunucopy | |||
| #define CTRSM_IUNNCOPY ctrsm_iunncopy | |||
| #define CTRSM_IUTUCOPY ctrsm_iutucopy | |||
| #define CTRSM_IUTNCOPY ctrsm_iutncopy | |||
| #define CTRSM_ILNUCOPY ctrsm_ilnucopy | |||
| #define CTRSM_ILNNCOPY ctrsm_ilnncopy | |||
| #define CTRSM_ILTUCOPY ctrsm_iltucopy | |||
| #define CTRSM_ILTNCOPY ctrsm_iltncopy | |||
| #endif | |||
| #define CGEMM_BETA cgemm_beta | |||
| #define CGEMM_KERNEL_N cgemm_kernel_n | |||
| #define CGEMM_KERNEL_L cgemm_kernel_l | |||
| #define CGEMM_KERNEL_R cgemm_kernel_r | |||
| #define CGEMM_KERNEL_B cgemm_kernel_b | |||
| #define CTRMM_KERNEL_LN ctrmm_kernel_LN | |||
| #define CTRMM_KERNEL_LT ctrmm_kernel_LT | |||
| #define CTRMM_KERNEL_LR ctrmm_kernel_LR | |||
| #define CTRMM_KERNEL_LC ctrmm_kernel_LC | |||
| #define CTRMM_KERNEL_RN ctrmm_kernel_RN | |||
| #define CTRMM_KERNEL_RT ctrmm_kernel_RT | |||
| #define CTRMM_KERNEL_RR ctrmm_kernel_RR | |||
| #define CTRMM_KERNEL_RC ctrmm_kernel_RC | |||
| #define CTRSM_KERNEL_LN ctrsm_kernel_LN | |||
| #define CTRSM_KERNEL_LT ctrsm_kernel_LT | |||
| #define CTRSM_KERNEL_LR ctrsm_kernel_LR | |||
| #define CTRSM_KERNEL_LC ctrsm_kernel_LC | |||
| #define CTRSM_KERNEL_RN ctrsm_kernel_RN | |||
| #define CTRSM_KERNEL_RT ctrsm_kernel_RT | |||
| #define CTRSM_KERNEL_RR ctrsm_kernel_RR | |||
| #define CTRSM_KERNEL_RC ctrsm_kernel_RC | |||
| #define CSYMM_OUTCOPY csymm_outcopy | |||
| #define CSYMM_OLTCOPY csymm_oltcopy | |||
| #if CGEMM_DEFAULT_UNROLL_M == CGEMM_DEFAULT_UNROLL_N | |||
| #define CSYMM_IUTCOPY csymm_outcopy | |||
| #define CSYMM_ILTCOPY csymm_oltcopy | |||
| #else | |||
| #define CSYMM_IUTCOPY csymm_iutcopy | |||
| #define CSYMM_ILTCOPY csymm_iltcopy | |||
| #endif | |||
| #define CHEMM_OUTCOPY chemm_outcopy | |||
| #define CHEMM_OLTCOPY chemm_oltcopy | |||
| #if CGEMM_DEFAULT_UNROLL_M == CGEMM_DEFAULT_UNROLL_N | |||
| #define CHEMM_IUTCOPY chemm_outcopy | |||
| #define CHEMM_ILTCOPY chemm_oltcopy | |||
| #else | |||
| #define CHEMM_IUTCOPY chemm_iutcopy | |||
| #define CHEMM_ILTCOPY chemm_iltcopy | |||
| #endif | |||
| #define CGEMM3M_ONCOPYB cgemm3m_oncopyb | |||
| #define CGEMM3M_ONCOPYR cgemm3m_oncopyr | |||
| #define CGEMM3M_ONCOPYI cgemm3m_oncopyi | |||
| #define CGEMM3M_OTCOPYB cgemm3m_otcopyb | |||
| #define CGEMM3M_OTCOPYR cgemm3m_otcopyr | |||
| #define CGEMM3M_OTCOPYI cgemm3m_otcopyi | |||
| #define CGEMM3M_INCOPYB cgemm3m_incopyb | |||
| #define CGEMM3M_INCOPYR cgemm3m_incopyr | |||
| #define CGEMM3M_INCOPYI cgemm3m_incopyi | |||
| #define CGEMM3M_ITCOPYB cgemm3m_itcopyb | |||
| #define CGEMM3M_ITCOPYR cgemm3m_itcopyr | |||
| #define CGEMM3M_ITCOPYI cgemm3m_itcopyi | |||
| #define CSYMM3M_ILCOPYB csymm3m_ilcopyb | |||
| #define CSYMM3M_IUCOPYB csymm3m_iucopyb | |||
| #define CSYMM3M_ILCOPYR csymm3m_ilcopyr | |||
| #define CSYMM3M_IUCOPYR csymm3m_iucopyr | |||
| #define CSYMM3M_ILCOPYI csymm3m_ilcopyi | |||
| #define CSYMM3M_IUCOPYI csymm3m_iucopyi | |||
| #define CSYMM3M_OLCOPYB csymm3m_olcopyb | |||
| #define CSYMM3M_OUCOPYB csymm3m_oucopyb | |||
| #define CSYMM3M_OLCOPYR csymm3m_olcopyr | |||
| #define CSYMM3M_OUCOPYR csymm3m_oucopyr | |||
| #define CSYMM3M_OLCOPYI csymm3m_olcopyi | |||
| #define CSYMM3M_OUCOPYI csymm3m_oucopyi | |||
| #define CHEMM3M_ILCOPYB chemm3m_ilcopyb | |||
| #define CHEMM3M_IUCOPYB chemm3m_iucopyb | |||
| #define CHEMM3M_ILCOPYR chemm3m_ilcopyr | |||
| #define CHEMM3M_IUCOPYR chemm3m_iucopyr | |||
| #define CHEMM3M_ILCOPYI chemm3m_ilcopyi | |||
| #define CHEMM3M_IUCOPYI chemm3m_iucopyi | |||
| #define CHEMM3M_OLCOPYB chemm3m_olcopyb | |||
| #define CHEMM3M_OUCOPYB chemm3m_oucopyb | |||
| #define CHEMM3M_OLCOPYR chemm3m_olcopyr | |||
| #define CHEMM3M_OUCOPYR chemm3m_oucopyr | |||
| #define CHEMM3M_OLCOPYI chemm3m_olcopyi | |||
| #define CHEMM3M_OUCOPYI chemm3m_oucopyi | |||
| #define CGEMM3M_KERNEL cgemm3m_kernel | |||
| #define CNEG_TCOPY cneg_tcopy | |||
| #define CLASWP_NCOPY claswp_ncopy | |||
| #else | |||
| #define CAMAX_K gotoblas -> camax_k | |||
| #define CAMIN_K gotoblas -> camin_k | |||
| #define CMAX_K gotoblas -> cmax_k | |||
| #define CMIN_K gotoblas -> cmin_k | |||
| #define ICAMAX_K gotoblas -> icamax_k | |||
| #define ICAMIN_K gotoblas -> icamin_k | |||
| #define ICMAX_K gotoblas -> icmax_k | |||
| #define ICMIN_K gotoblas -> icmin_k | |||
| #define CASUM_K gotoblas -> casum_k | |||
| #define CAXPYU_K gotoblas -> caxpy_k | |||
| #define CAXPYC_K gotoblas -> caxpyc_k | |||
| #define CCOPY_K gotoblas -> ccopy_k | |||
| #define CDOTU_K gotoblas -> cdotu_k | |||
| #define CDOTC_K gotoblas -> cdotc_k | |||
| #define CNRM2_K gotoblas -> cnrm2_k | |||
| #define CSCAL_K gotoblas -> cscal_k | |||
| #define CSWAP_K gotoblas -> cswap_k | |||
| #define CROT_K gotoblas -> csrot_k | |||
| #define CGEMV_N gotoblas -> cgemv_n | |||
| #define CGEMV_T gotoblas -> cgemv_t | |||
| #define CGEMV_R gotoblas -> cgemv_r | |||
| #define CGEMV_C gotoblas -> cgemv_c | |||
| #define CGEMV_O gotoblas -> cgemv_o | |||
| #define CGEMV_U gotoblas -> cgemv_u | |||
| #define CGEMV_S gotoblas -> cgemv_s | |||
| #define CGEMV_D gotoblas -> cgemv_d | |||
| #define CGERU_K gotoblas -> cgeru_k | |||
| #define CGERC_K gotoblas -> cgerc_k | |||
| #define CGERV_K gotoblas -> cgerv_k | |||
| #define CGERD_K gotoblas -> cgerd_k | |||
| #define CSYMV_U gotoblas -> csymv_U | |||
| #define CSYMV_L gotoblas -> csymv_L | |||
| #define CHEMV_U gotoblas -> chemv_U | |||
| #define CHEMV_L gotoblas -> chemv_L | |||
| #define CHEMV_V gotoblas -> chemv_V | |||
| #define CHEMV_M gotoblas -> chemv_M | |||
| #define CSYMV_THREAD_U csymv_thread_U | |||
| #define CSYMV_THREAD_L csymv_thread_L | |||
| #define CHEMV_THREAD_U chemv_thread_U | |||
| #define CHEMV_THREAD_L chemv_thread_L | |||
| #define CHEMV_THREAD_V chemv_thread_V | |||
| #define CHEMV_THREAD_M chemv_thread_M | |||
| #define CGEMM_ONCOPY gotoblas -> cgemm_oncopy | |||
| #define CGEMM_OTCOPY gotoblas -> cgemm_otcopy | |||
| #define CGEMM_INCOPY gotoblas -> cgemm_incopy | |||
| #define CGEMM_ITCOPY gotoblas -> cgemm_itcopy | |||
| #define CTRMM_OUNUCOPY gotoblas -> ctrmm_ounucopy | |||
| #define CTRMM_OUTUCOPY gotoblas -> ctrmm_outucopy | |||
| #define CTRMM_OLNUCOPY gotoblas -> ctrmm_olnucopy | |||
| #define CTRMM_OLTUCOPY gotoblas -> ctrmm_oltucopy | |||
| #define CTRSM_OUNUCOPY gotoblas -> ctrsm_ounucopy | |||
| #define CTRSM_OUTUCOPY gotoblas -> ctrsm_outucopy | |||
| #define CTRSM_OLNUCOPY gotoblas -> ctrsm_olnucopy | |||
| #define CTRSM_OLTUCOPY gotoblas -> ctrsm_oltucopy | |||
| #define CTRMM_IUNUCOPY gotoblas -> ctrmm_iunucopy | |||
| #define CTRMM_IUTUCOPY gotoblas -> ctrmm_iutucopy | |||
| #define CTRMM_ILNUCOPY gotoblas -> ctrmm_ilnucopy | |||
| #define CTRMM_ILTUCOPY gotoblas -> ctrmm_iltucopy | |||
| #define CTRSM_IUNUCOPY gotoblas -> ctrsm_iunucopy | |||
| #define CTRSM_IUTUCOPY gotoblas -> ctrsm_iutucopy | |||
| #define CTRSM_ILNUCOPY gotoblas -> ctrsm_ilnucopy | |||
| #define CTRSM_ILTUCOPY gotoblas -> ctrsm_iltucopy | |||
| #define CTRMM_OUNNCOPY gotoblas -> ctrmm_ounncopy | |||
| #define CTRMM_OUTNCOPY gotoblas -> ctrmm_outncopy | |||
| #define CTRMM_OLNNCOPY gotoblas -> ctrmm_olnncopy | |||
| #define CTRMM_OLTNCOPY gotoblas -> ctrmm_oltncopy | |||
| #define CTRSM_OUNNCOPY gotoblas -> ctrsm_ounncopy | |||
| #define CTRSM_OUTNCOPY gotoblas -> ctrsm_outncopy | |||
| #define CTRSM_OLNNCOPY gotoblas -> ctrsm_olnncopy | |||
| #define CTRSM_OLTNCOPY gotoblas -> ctrsm_oltncopy | |||
| #define CTRMM_IUNNCOPY gotoblas -> ctrmm_iunncopy | |||
| #define CTRMM_IUTNCOPY gotoblas -> ctrmm_iutncopy | |||
| #define CTRMM_ILNNCOPY gotoblas -> ctrmm_ilnncopy | |||
| #define CTRMM_ILTNCOPY gotoblas -> ctrmm_iltncopy | |||
| #define CTRSM_IUNNCOPY gotoblas -> ctrsm_iunncopy | |||
| #define CTRSM_IUTNCOPY gotoblas -> ctrsm_iutncopy | |||
| #define CTRSM_ILNNCOPY gotoblas -> ctrsm_ilnncopy | |||
| #define CTRSM_ILTNCOPY gotoblas -> ctrsm_iltncopy | |||
| #define CGEMM_BETA gotoblas -> cgemm_beta | |||
| #define CGEMM_KERNEL_N gotoblas -> cgemm_kernel_n | |||
| #define CGEMM_KERNEL_L gotoblas -> cgemm_kernel_l | |||
| #define CGEMM_KERNEL_R gotoblas -> cgemm_kernel_r | |||
| #define CGEMM_KERNEL_B gotoblas -> cgemm_kernel_b | |||
| #define CTRMM_KERNEL_LN gotoblas -> ctrmm_kernel_LN | |||
| #define CTRMM_KERNEL_LT gotoblas -> ctrmm_kernel_LT | |||
| #define CTRMM_KERNEL_LR gotoblas -> ctrmm_kernel_LR | |||
| #define CTRMM_KERNEL_LC gotoblas -> ctrmm_kernel_LC | |||
| #define CTRMM_KERNEL_RN gotoblas -> ctrmm_kernel_RN | |||
| #define CTRMM_KERNEL_RT gotoblas -> ctrmm_kernel_RT | |||
| #define CTRMM_KERNEL_RR gotoblas -> ctrmm_kernel_RR | |||
| #define CTRMM_KERNEL_RC gotoblas -> ctrmm_kernel_RC | |||
| #define CTRSM_KERNEL_LN gotoblas -> ctrsm_kernel_LN | |||
| #define CTRSM_KERNEL_LT gotoblas -> ctrsm_kernel_LT | |||
| #define CTRSM_KERNEL_LR gotoblas -> ctrsm_kernel_LR | |||
| #define CTRSM_KERNEL_LC gotoblas -> ctrsm_kernel_LC | |||
| #define CTRSM_KERNEL_RN gotoblas -> ctrsm_kernel_RN | |||
| #define CTRSM_KERNEL_RT gotoblas -> ctrsm_kernel_RT | |||
| #define CTRSM_KERNEL_RR gotoblas -> ctrsm_kernel_RR | |||
| #define CTRSM_KERNEL_RC gotoblas -> ctrsm_kernel_RC | |||
| #define CSYMM_IUTCOPY gotoblas -> csymm_iutcopy | |||
| #define CSYMM_ILTCOPY gotoblas -> csymm_iltcopy | |||
| #define CSYMM_OUTCOPY gotoblas -> csymm_outcopy | |||
| #define CSYMM_OLTCOPY gotoblas -> csymm_oltcopy | |||
| #define CHEMM_OUTCOPY gotoblas -> chemm_outcopy | |||
| #define CHEMM_OLTCOPY gotoblas -> chemm_oltcopy | |||
| #define CHEMM_IUTCOPY gotoblas -> chemm_iutcopy | |||
| #define CHEMM_ILTCOPY gotoblas -> chemm_iltcopy | |||
| #define CGEMM3M_ONCOPYB gotoblas -> cgemm3m_oncopyb | |||
| #define CGEMM3M_ONCOPYR gotoblas -> cgemm3m_oncopyr | |||
| #define CGEMM3M_ONCOPYI gotoblas -> cgemm3m_oncopyi | |||
| #define CGEMM3M_OTCOPYB gotoblas -> cgemm3m_otcopyb | |||
| #define CGEMM3M_OTCOPYR gotoblas -> cgemm3m_otcopyr | |||
| #define CGEMM3M_OTCOPYI gotoblas -> cgemm3m_otcopyi | |||
| #define CGEMM3M_INCOPYB gotoblas -> cgemm3m_incopyb | |||
| #define CGEMM3M_INCOPYR gotoblas -> cgemm3m_incopyr | |||
| #define CGEMM3M_INCOPYI gotoblas -> cgemm3m_incopyi | |||
| #define CGEMM3M_ITCOPYB gotoblas -> cgemm3m_itcopyb | |||
| #define CGEMM3M_ITCOPYR gotoblas -> cgemm3m_itcopyr | |||
| #define CGEMM3M_ITCOPYI gotoblas -> cgemm3m_itcopyi | |||
| #define CSYMM3M_ILCOPYB gotoblas -> csymm3m_ilcopyb | |||
| #define CSYMM3M_IUCOPYB gotoblas -> csymm3m_iucopyb | |||
| #define CSYMM3M_ILCOPYR gotoblas -> csymm3m_ilcopyr | |||
| #define CSYMM3M_IUCOPYR gotoblas -> csymm3m_iucopyr | |||
| #define CSYMM3M_ILCOPYI gotoblas -> csymm3m_ilcopyi | |||
| #define CSYMM3M_IUCOPYI gotoblas -> csymm3m_iucopyi | |||
| #define CSYMM3M_OLCOPYB gotoblas -> csymm3m_olcopyb | |||
| #define CSYMM3M_OUCOPYB gotoblas -> csymm3m_oucopyb | |||
| #define CSYMM3M_OLCOPYR gotoblas -> csymm3m_olcopyr | |||
| #define CSYMM3M_OUCOPYR gotoblas -> csymm3m_oucopyr | |||
| #define CSYMM3M_OLCOPYI gotoblas -> csymm3m_olcopyi | |||
| #define CSYMM3M_OUCOPYI gotoblas -> csymm3m_oucopyi | |||
| #define CHEMM3M_ILCOPYB gotoblas -> chemm3m_ilcopyb | |||
| #define CHEMM3M_IUCOPYB gotoblas -> chemm3m_iucopyb | |||
| #define CHEMM3M_ILCOPYR gotoblas -> chemm3m_ilcopyr | |||
| #define CHEMM3M_IUCOPYR gotoblas -> chemm3m_iucopyr | |||
| #define CHEMM3M_ILCOPYI gotoblas -> chemm3m_ilcopyi | |||
| #define CHEMM3M_IUCOPYI gotoblas -> chemm3m_iucopyi | |||
| #define CHEMM3M_OLCOPYB gotoblas -> chemm3m_olcopyb | |||
| #define CHEMM3M_OUCOPYB gotoblas -> chemm3m_oucopyb | |||
| #define CHEMM3M_OLCOPYR gotoblas -> chemm3m_olcopyr | |||
| #define CHEMM3M_OUCOPYR gotoblas -> chemm3m_oucopyr | |||
| #define CHEMM3M_OLCOPYI gotoblas -> chemm3m_olcopyi | |||
| #define CHEMM3M_OUCOPYI gotoblas -> chemm3m_oucopyi | |||
| #define CGEMM3M_KERNEL gotoblas -> cgemm3m_kernel | |||
| #define CNEG_TCOPY gotoblas -> cneg_tcopy | |||
| #define CLASWP_NCOPY gotoblas -> claswp_ncopy | |||
| #endif | |||
| #define CGEMM_NN cgemm_nn | |||
| #define CGEMM_CN cgemm_cn | |||
| #define CGEMM_TN cgemm_tn | |||
| #define CGEMM_NC cgemm_nc | |||
| #define CGEMM_NT cgemm_nt | |||
| #define CGEMM_CC cgemm_cc | |||
| #define CGEMM_CT cgemm_ct | |||
| #define CGEMM_TC cgemm_tc | |||
| #define CGEMM_TT cgemm_tt | |||
| #define CGEMM_NR cgemm_nr | |||
| #define CGEMM_TR cgemm_tr | |||
| #define CGEMM_CR cgemm_cr | |||
| #define CGEMM_RN cgemm_rn | |||
| #define CGEMM_RT cgemm_rt | |||
| #define CGEMM_RC cgemm_rc | |||
| #define CGEMM_RR cgemm_rr | |||
| #define CSYMM_LU csymm_LU | |||
| #define CSYMM_LL csymm_LL | |||
| #define CSYMM_RU csymm_RU | |||
| #define CSYMM_RL csymm_RL | |||
| #define CHEMM_LU chemm_LU | |||
| #define CHEMM_LL chemm_LL | |||
| #define CHEMM_RU chemm_RU | |||
| #define CHEMM_RL chemm_RL | |||
| #define CSYRK_UN csyrk_UN | |||
| #define CSYRK_UT csyrk_UT | |||
| #define CSYRK_LN csyrk_LN | |||
| #define CSYRK_LT csyrk_LT | |||
| #define CSYRK_UR csyrk_UN | |||
| #define CSYRK_UC csyrk_UT | |||
| #define CSYRK_LR csyrk_LN | |||
| #define CSYRK_LC csyrk_LT | |||
| #define CSYRK_KERNEL_U csyrk_kernel_U | |||
| #define CSYRK_KERNEL_L csyrk_kernel_L | |||
| #define CHERK_UN cherk_UN | |||
| #define CHERK_LN cherk_LN | |||
| #define CHERK_UC cherk_UC | |||
| #define CHERK_LC cherk_LC | |||
| #define CHER2K_UN cher2k_UN | |||
| #define CHER2K_LN cher2k_LN | |||
| #define CHER2K_UC cher2k_UC | |||
| #define CHER2K_LC cher2k_LC | |||
| #define CSYR2K_UN csyr2k_UN | |||
| #define CSYR2K_UT csyr2k_UT | |||
| #define CSYR2K_LN csyr2k_LN | |||
| #define CSYR2K_LT csyr2k_LT | |||
| #define CSYR2K_UR csyr2k_UN | |||
| #define CSYR2K_UC csyr2k_UT | |||
| #define CSYR2K_LR csyr2k_LN | |||
| #define CSYR2K_LC csyr2k_LT | |||
| #define CSYR2K_KERNEL_U csyr2k_kernel_U | |||
| #define CSYR2K_KERNEL_L csyr2k_kernel_L | |||
| #define CTRMM_LNUU ctrmm_LNUU | |||
| #define CTRMM_LNUN ctrmm_LNUN | |||
| #define CTRMM_LNLU ctrmm_LNLU | |||
| #define CTRMM_LNLN ctrmm_LNLN | |||
| #define CTRMM_LTUU ctrmm_LTUU | |||
| #define CTRMM_LTUN ctrmm_LTUN | |||
| #define CTRMM_LTLU ctrmm_LTLU | |||
| #define CTRMM_LTLN ctrmm_LTLN | |||
| #define CTRMM_LRUU ctrmm_LRUU | |||
| #define CTRMM_LRUN ctrmm_LRUN | |||
| #define CTRMM_LRLU ctrmm_LRLU | |||
| #define CTRMM_LRLN ctrmm_LRLN | |||
| #define CTRMM_LCUU ctrmm_LCUU | |||
| #define CTRMM_LCUN ctrmm_LCUN | |||
| #define CTRMM_LCLU ctrmm_LCLU | |||
| #define CTRMM_LCLN ctrmm_LCLN | |||
| #define CTRMM_RNUU ctrmm_RNUU | |||
| #define CTRMM_RNUN ctrmm_RNUN | |||
| #define CTRMM_RNLU ctrmm_RNLU | |||
| #define CTRMM_RNLN ctrmm_RNLN | |||
| #define CTRMM_RTUU ctrmm_RTUU | |||
| #define CTRMM_RTUN ctrmm_RTUN | |||
| #define CTRMM_RTLU ctrmm_RTLU | |||
| #define CTRMM_RTLN ctrmm_RTLN | |||
| #define CTRMM_RRUU ctrmm_RRUU | |||
| #define CTRMM_RRUN ctrmm_RRUN | |||
| #define CTRMM_RRLU ctrmm_RRLU | |||
| #define CTRMM_RRLN ctrmm_RRLN | |||
| #define CTRMM_RCUU ctrmm_RCUU | |||
| #define CTRMM_RCUN ctrmm_RCUN | |||
| #define CTRMM_RCLU ctrmm_RCLU | |||
| #define CTRMM_RCLN ctrmm_RCLN | |||
| #define CTRSM_LNUU ctrsm_LNUU | |||
| #define CTRSM_LNUN ctrsm_LNUN | |||
| #define CTRSM_LNLU ctrsm_LNLU | |||
| #define CTRSM_LNLN ctrsm_LNLN | |||
| #define CTRSM_LTUU ctrsm_LTUU | |||
| #define CTRSM_LTUN ctrsm_LTUN | |||
| #define CTRSM_LTLU ctrsm_LTLU | |||
| #define CTRSM_LTLN ctrsm_LTLN | |||
| #define CTRSM_LRUU ctrsm_LRUU | |||
| #define CTRSM_LRUN ctrsm_LRUN | |||
| #define CTRSM_LRLU ctrsm_LRLU | |||
| #define CTRSM_LRLN ctrsm_LRLN | |||
| #define CTRSM_LCUU ctrsm_LCUU | |||
| #define CTRSM_LCUN ctrsm_LCUN | |||
| #define CTRSM_LCLU ctrsm_LCLU | |||
| #define CTRSM_LCLN ctrsm_LCLN | |||
| #define CTRSM_RNUU ctrsm_RNUU | |||
| #define CTRSM_RNUN ctrsm_RNUN | |||
| #define CTRSM_RNLU ctrsm_RNLU | |||
| #define CTRSM_RNLN ctrsm_RNLN | |||
| #define CTRSM_RTUU ctrsm_RTUU | |||
| #define CTRSM_RTUN ctrsm_RTUN | |||
| #define CTRSM_RTLU ctrsm_RTLU | |||
| #define CTRSM_RTLN ctrsm_RTLN | |||
| #define CTRSM_RRUU ctrsm_RRUU | |||
| #define CTRSM_RRUN ctrsm_RRUN | |||
| #define CTRSM_RRLU ctrsm_RRLU | |||
| #define CTRSM_RRLN ctrsm_RRLN | |||
| #define CTRSM_RCUU ctrsm_RCUU | |||
| #define CTRSM_RCUN ctrsm_RCUN | |||
| #define CTRSM_RCLU ctrsm_RCLU | |||
| #define CTRSM_RCLN ctrsm_RCLN | |||
| #define CGEMM_THREAD_NN cgemm_thread_nn | |||
| #define CGEMM_THREAD_CN cgemm_thread_cn | |||
| #define CGEMM_THREAD_TN cgemm_thread_tn | |||
| #define CGEMM_THREAD_NC cgemm_thread_nc | |||
| #define CGEMM_THREAD_NT cgemm_thread_nt | |||
| #define CGEMM_THREAD_CC cgemm_thread_cc | |||
| #define CGEMM_THREAD_CT cgemm_thread_ct | |||
| #define CGEMM_THREAD_TC cgemm_thread_tc | |||
| #define CGEMM_THREAD_TT cgemm_thread_tt | |||
| #define CGEMM_THREAD_NR cgemm_thread_nr | |||
| #define CGEMM_THREAD_TR cgemm_thread_tr | |||
| #define CGEMM_THREAD_CR cgemm_thread_cr | |||
| #define CGEMM_THREAD_RN cgemm_thread_rn | |||
| #define CGEMM_THREAD_RT cgemm_thread_rt | |||
| #define CGEMM_THREAD_RC cgemm_thread_rc | |||
| #define CGEMM_THREAD_RR cgemm_thread_rr | |||
| #define CSYMM_THREAD_LU csymm_thread_LU | |||
| #define CSYMM_THREAD_LL csymm_thread_LL | |||
| #define CSYMM_THREAD_RU csymm_thread_RU | |||
| #define CSYMM_THREAD_RL csymm_thread_RL | |||
| #define CHEMM_THREAD_LU chemm_thread_LU | |||
| #define CHEMM_THREAD_LL chemm_thread_LL | |||
| #define CHEMM_THREAD_RU chemm_thread_RU | |||
| #define CHEMM_THREAD_RL chemm_thread_RL | |||
| #define CSYRK_THREAD_UN csyrk_thread_UN | |||
| #define CSYRK_THREAD_UT csyrk_thread_UT | |||
| #define CSYRK_THREAD_LN csyrk_thread_LN | |||
| #define CSYRK_THREAD_LT csyrk_thread_LT | |||
| #define CSYRK_THREAD_UR csyrk_thread_UN | |||
| #define CSYRK_THREAD_UC csyrk_thread_UT | |||
| #define CSYRK_THREAD_LR csyrk_thread_LN | |||
| #define CSYRK_THREAD_LC csyrk_thread_LT | |||
| #define CHERK_THREAD_UN cherk_thread_UN | |||
| #define CHERK_THREAD_UT cherk_thread_UT | |||
| #define CHERK_THREAD_LN cherk_thread_LN | |||
| #define CHERK_THREAD_LT cherk_thread_LT | |||
| #define CHERK_THREAD_UR cherk_thread_UR | |||
| #define CHERK_THREAD_UC cherk_thread_UC | |||
| #define CHERK_THREAD_LR cherk_thread_LR | |||
| #define CHERK_THREAD_LC cherk_thread_LC | |||
| #define CGEMM3M_NN cgemm3m_nn | |||
| #define CGEMM3M_CN cgemm3m_cn | |||
| #define CGEMM3M_TN cgemm3m_tn | |||
| #define CGEMM3M_NC cgemm3m_nc | |||
| #define CGEMM3M_NT cgemm3m_nt | |||
| #define CGEMM3M_CC cgemm3m_cc | |||
| #define CGEMM3M_CT cgemm3m_ct | |||
| #define CGEMM3M_TC cgemm3m_tc | |||
| #define CGEMM3M_TT cgemm3m_tt | |||
| #define CGEMM3M_NR cgemm3m_nr | |||
| #define CGEMM3M_TR cgemm3m_tr | |||
| #define CGEMM3M_CR cgemm3m_cr | |||
| #define CGEMM3M_RN cgemm3m_rn | |||
| #define CGEMM3M_RT cgemm3m_rt | |||
| #define CGEMM3M_RC cgemm3m_rc | |||
| #define CGEMM3M_RR cgemm3m_rr | |||
| #define CGEMM3M_THREAD_NN cgemm3m_thread_nn | |||
| #define CGEMM3M_THREAD_CN cgemm3m_thread_cn | |||
| #define CGEMM3M_THREAD_TN cgemm3m_thread_tn | |||
| #define CGEMM3M_THREAD_NC cgemm3m_thread_nc | |||
| #define CGEMM3M_THREAD_NT cgemm3m_thread_nt | |||
| #define CGEMM3M_THREAD_CC cgemm3m_thread_cc | |||
| #define CGEMM3M_THREAD_CT cgemm3m_thread_ct | |||
| #define CGEMM3M_THREAD_TC cgemm3m_thread_tc | |||
| #define CGEMM3M_THREAD_TT cgemm3m_thread_tt | |||
| #define CGEMM3M_THREAD_NR cgemm3m_thread_nr | |||
| #define CGEMM3M_THREAD_TR cgemm3m_thread_tr | |||
| #define CGEMM3M_THREAD_CR cgemm3m_thread_cr | |||
| #define CGEMM3M_THREAD_RN cgemm3m_thread_rn | |||
| #define CGEMM3M_THREAD_RT cgemm3m_thread_rt | |||
| #define CGEMM3M_THREAD_RC cgemm3m_thread_rc | |||
| #define CGEMM3M_THREAD_RR cgemm3m_thread_rr | |||
| #define CSYMM3M_LU csymm3m_LU | |||
| #define CSYMM3M_LL csymm3m_LL | |||
| #define CSYMM3M_RU csymm3m_RU | |||
| #define CSYMM3M_RL csymm3m_RL | |||
| #define CSYMM3M_THREAD_LU csymm3m_thread_LU | |||
| #define CSYMM3M_THREAD_LL csymm3m_thread_LL | |||
| #define CSYMM3M_THREAD_RU csymm3m_thread_RU | |||
| #define CSYMM3M_THREAD_RL csymm3m_thread_RL | |||
| #define CHEMM3M_LU chemm3m_LU | |||
| #define CHEMM3M_LL chemm3m_LL | |||
| #define CHEMM3M_RU chemm3m_RU | |||
| #define CHEMM3M_RL chemm3m_RL | |||
| #define CHEMM3M_THREAD_LU chemm3m_thread_LU | |||
| #define CHEMM3M_THREAD_LL chemm3m_thread_LL | |||
| #define CHEMM3M_THREAD_RU chemm3m_thread_RU | |||
| #define CHEMM3M_THREAD_RL chemm3m_thread_RL | |||
| #endif | |||
| @@ -0,0 +1,432 @@ | |||
| #ifndef COMMON_D_H | |||
| #define COMMON_D_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define DAMAX_K damax_k | |||
| #define DAMIN_K damin_k | |||
| #define DMAX_K dmax_k | |||
| #define DMIN_K dmin_k | |||
| #define IDAMAX_K idamax_k | |||
| #define IDAMIN_K idamin_k | |||
| #define IDMAX_K idmax_k | |||
| #define IDMIN_K idmin_k | |||
| #define DASUM_K dasum_k | |||
| #define DAXPYU_K daxpy_k | |||
| #define DAXPYC_K daxpy_k | |||
| #define DCOPY_K dcopy_k | |||
| #define DDOTU_K ddot_k | |||
| #define DDOTC_K ddot_k | |||
| #define DNRM2_K dnrm2_k | |||
| #define DSCAL_K dscal_k | |||
| #define DSWAP_K dswap_k | |||
| #define DROT_K drot_k | |||
| #define DGEMV_N dgemv_n | |||
| #define DGEMV_T dgemv_t | |||
| #define DGEMV_R dgemv_n | |||
| #define DGEMV_C dgemv_t | |||
| #define DGEMV_O dgemv_n | |||
| #define DGEMV_U dgemv_t | |||
| #define DGEMV_S dgemv_n | |||
| #define DGEMV_D dgemv_t | |||
| #define DGERU_K dger_k | |||
| #define DGERC_K dger_k | |||
| #define DGERV_K dger_k | |||
| #define DGERD_K dger_k | |||
| #define DSYMV_U dsymv_U | |||
| #define DSYMV_L dsymv_L | |||
| #define DSYMV_THREAD_U dsymv_thread_U | |||
| #define DSYMV_THREAD_L dsymv_thread_L | |||
| #define DGEMM_ONCOPY dgemm_oncopy | |||
| #define DGEMM_OTCOPY dgemm_otcopy | |||
| #if DGEMM_DEFAULT_UNROLL_M == DGEMM_DEFAULT_UNROLL_N | |||
| #define DGEMM_INCOPY dgemm_oncopy | |||
| #define DGEMM_ITCOPY dgemm_otcopy | |||
| #else | |||
| #define DGEMM_INCOPY dgemm_incopy | |||
| #define DGEMM_ITCOPY dgemm_itcopy | |||
| #endif | |||
| #define DTRMM_OUNUCOPY dtrmm_ounucopy | |||
| #define DTRMM_OUNNCOPY dtrmm_ounncopy | |||
| #define DTRMM_OUTUCOPY dtrmm_outucopy | |||
| #define DTRMM_OUTNCOPY dtrmm_outncopy | |||
| #define DTRMM_OLNUCOPY dtrmm_olnucopy | |||
| #define DTRMM_OLNNCOPY dtrmm_olnncopy | |||
| #define DTRMM_OLTUCOPY dtrmm_oltucopy | |||
| #define DTRMM_OLTNCOPY dtrmm_oltncopy | |||
| #define DTRSM_OUNUCOPY dtrsm_ounucopy | |||
| #define DTRSM_OUNNCOPY dtrsm_ounncopy | |||
| #define DTRSM_OUTUCOPY dtrsm_outucopy | |||
| #define DTRSM_OUTNCOPY dtrsm_outncopy | |||
| #define DTRSM_OLNUCOPY dtrsm_olnucopy | |||
| #define DTRSM_OLNNCOPY dtrsm_olnncopy | |||
| #define DTRSM_OLTUCOPY dtrsm_oltucopy | |||
| #define DTRSM_OLTNCOPY dtrsm_oltncopy | |||
| #if DGEMM_DEFAULT_UNROLL_M == DGEMM_DEFAULT_UNROLL_N | |||
| #define DTRMM_IUNUCOPY dtrmm_ounucopy | |||
| #define DTRMM_IUNNCOPY dtrmm_ounncopy | |||
| #define DTRMM_IUTUCOPY dtrmm_outucopy | |||
| #define DTRMM_IUTNCOPY dtrmm_outncopy | |||
| #define DTRMM_ILNUCOPY dtrmm_olnucopy | |||
| #define DTRMM_ILNNCOPY dtrmm_olnncopy | |||
| #define DTRMM_ILTUCOPY dtrmm_oltucopy | |||
| #define DTRMM_ILTNCOPY dtrmm_oltncopy | |||
| #define DTRSM_IUNUCOPY dtrsm_ounucopy | |||
| #define DTRSM_IUNNCOPY dtrsm_ounncopy | |||
| #define DTRSM_IUTUCOPY dtrsm_outucopy | |||
| #define DTRSM_IUTNCOPY dtrsm_outncopy | |||
| #define DTRSM_ILNUCOPY dtrsm_olnucopy | |||
| #define DTRSM_ILNNCOPY dtrsm_olnncopy | |||
| #define DTRSM_ILTUCOPY dtrsm_oltucopy | |||
| #define DTRSM_ILTNCOPY dtrsm_oltncopy | |||
| #else | |||
| #define DTRMM_IUNUCOPY dtrmm_iunucopy | |||
| #define DTRMM_IUNNCOPY dtrmm_iunncopy | |||
| #define DTRMM_IUTUCOPY dtrmm_iutucopy | |||
| #define DTRMM_IUTNCOPY dtrmm_iutncopy | |||
| #define DTRMM_ILNUCOPY dtrmm_ilnucopy | |||
| #define DTRMM_ILNNCOPY dtrmm_ilnncopy | |||
| #define DTRMM_ILTUCOPY dtrmm_iltucopy | |||
| #define DTRMM_ILTNCOPY dtrmm_iltncopy | |||
| #define DTRSM_IUNUCOPY dtrsm_iunucopy | |||
| #define DTRSM_IUNNCOPY dtrsm_iunncopy | |||
| #define DTRSM_IUTUCOPY dtrsm_iutucopy | |||
| #define DTRSM_IUTNCOPY dtrsm_iutncopy | |||
| #define DTRSM_ILNUCOPY dtrsm_ilnucopy | |||
| #define DTRSM_ILNNCOPY dtrsm_ilnncopy | |||
| #define DTRSM_ILTUCOPY dtrsm_iltucopy | |||
| #define DTRSM_ILTNCOPY dtrsm_iltncopy | |||
| #endif | |||
| #define DGEMM_BETA dgemm_beta | |||
| #define DGEMM_KERNEL dgemm_kernel | |||
| #define DTRMM_KERNEL_LN dtrmm_kernel_LN | |||
| #define DTRMM_KERNEL_LT dtrmm_kernel_LT | |||
| #define DTRMM_KERNEL_LR dtrmm_kernel_LN | |||
| #define DTRMM_KERNEL_LC dtrmm_kernel_LT | |||
| #define DTRMM_KERNEL_RN dtrmm_kernel_RN | |||
| #define DTRMM_KERNEL_RT dtrmm_kernel_RT | |||
| #define DTRMM_KERNEL_RR dtrmm_kernel_RN | |||
| #define DTRMM_KERNEL_RC dtrmm_kernel_RT | |||
| #define DTRSM_KERNEL_LN dtrsm_kernel_LN | |||
| #define DTRSM_KERNEL_LT dtrsm_kernel_LT | |||
| #define DTRSM_KERNEL_LR dtrsm_kernel_LN | |||
| #define DTRSM_KERNEL_LC dtrsm_kernel_LT | |||
| #define DTRSM_KERNEL_RN dtrsm_kernel_RN | |||
| #define DTRSM_KERNEL_RT dtrsm_kernel_RT | |||
| #define DTRSM_KERNEL_RR dtrsm_kernel_RN | |||
| #define DTRSM_KERNEL_RC dtrsm_kernel_RT | |||
| #define DSYMM_OUTCOPY dsymm_outcopy | |||
| #define DSYMM_OLTCOPY dsymm_oltcopy | |||
| #if DGEMM_DEFAULT_UNROLL_M == DGEMM_DEFAULT_UNROLL_N | |||
| #define DSYMM_IUTCOPY dsymm_outcopy | |||
| #define DSYMM_ILTCOPY dsymm_oltcopy | |||
| #else | |||
| #define DSYMM_IUTCOPY dsymm_iutcopy | |||
| #define DSYMM_ILTCOPY dsymm_iltcopy | |||
| #endif | |||
| #define DNEG_TCOPY dneg_tcopy | |||
| #define DLASWP_NCOPY dlaswp_ncopy | |||
| #else | |||
| #define DAMAX_K gotoblas -> damax_k | |||
| #define DAMIN_K gotoblas -> damin_k | |||
| #define DMAX_K gotoblas -> dmax_k | |||
| #define DMIN_K gotoblas -> dmin_k | |||
| #define IDAMAX_K gotoblas -> idamax_k | |||
| #define IDAMIN_K gotoblas -> idamin_k | |||
| #define IDMAX_K gotoblas -> idmax_k | |||
| #define IDMIN_K gotoblas -> idmin_k | |||
| #define DASUM_K gotoblas -> dasum_k | |||
| #define DAXPYU_K gotoblas -> daxpy_k | |||
| #define DAXPYC_K gotoblas -> daxpy_k | |||
| #define DCOPY_K gotoblas -> dcopy_k | |||
| #define DDOTU_K gotoblas -> ddot_k | |||
| #define DDOTC_K gotoblas -> ddot_k | |||
| #define DNRM2_K gotoblas -> dnrm2_k | |||
| #define DSCAL_K gotoblas -> dscal_k | |||
| #define DSWAP_K gotoblas -> dswap_k | |||
| #define DROT_K gotoblas -> drot_k | |||
| #define DGEMV_N gotoblas -> dgemv_n | |||
| #define DGEMV_T gotoblas -> dgemv_t | |||
| #define DGEMV_R gotoblas -> dgemv_n | |||
| #define DGEMV_C gotoblas -> dgemv_t | |||
| #define DGEMV_O gotoblas -> dgemv_n | |||
| #define DGEMV_U gotoblas -> dgemv_t | |||
| #define DGEMV_S gotoblas -> dgemv_n | |||
| #define DGEMV_D gotoblas -> dgemv_t | |||
| #define DGERU_K gotoblas -> dger_k | |||
| #define DGERC_K gotoblas -> dger_k | |||
| #define DGERV_K gotoblas -> dger_k | |||
| #define DGERD_K gotoblas -> dger_k | |||
| #define DSYMV_U gotoblas -> dsymv_U | |||
| #define DSYMV_L gotoblas -> dsymv_L | |||
| #define DSYMV_THREAD_U dsymv_thread_U | |||
| #define DSYMV_THREAD_L dsymv_thread_L | |||
| #define DGEMM_ONCOPY gotoblas -> dgemm_oncopy | |||
| #define DGEMM_OTCOPY gotoblas -> dgemm_otcopy | |||
| #define DGEMM_INCOPY gotoblas -> dgemm_incopy | |||
| #define DGEMM_ITCOPY gotoblas -> dgemm_itcopy | |||
| #define DTRMM_OUNUCOPY gotoblas -> dtrmm_ounucopy | |||
| #define DTRMM_OUTUCOPY gotoblas -> dtrmm_outucopy | |||
| #define DTRMM_OLNUCOPY gotoblas -> dtrmm_olnucopy | |||
| #define DTRMM_OLTUCOPY gotoblas -> dtrmm_oltucopy | |||
| #define DTRSM_OUNUCOPY gotoblas -> dtrsm_ounucopy | |||
| #define DTRSM_OUTUCOPY gotoblas -> dtrsm_outucopy | |||
| #define DTRSM_OLNUCOPY gotoblas -> dtrsm_olnucopy | |||
| #define DTRSM_OLTUCOPY gotoblas -> dtrsm_oltucopy | |||
| #define DTRMM_IUNUCOPY gotoblas -> dtrmm_iunucopy | |||
| #define DTRMM_IUTUCOPY gotoblas -> dtrmm_iutucopy | |||
| #define DTRMM_ILNUCOPY gotoblas -> dtrmm_ilnucopy | |||
| #define DTRMM_ILTUCOPY gotoblas -> dtrmm_iltucopy | |||
| #define DTRSM_IUNUCOPY gotoblas -> dtrsm_iunucopy | |||
| #define DTRSM_IUTUCOPY gotoblas -> dtrsm_iutucopy | |||
| #define DTRSM_ILNUCOPY gotoblas -> dtrsm_ilnucopy | |||
| #define DTRSM_ILTUCOPY gotoblas -> dtrsm_iltucopy | |||
| #define DTRMM_OUNNCOPY gotoblas -> dtrmm_ounncopy | |||
| #define DTRMM_OUTNCOPY gotoblas -> dtrmm_outncopy | |||
| #define DTRMM_OLNNCOPY gotoblas -> dtrmm_olnncopy | |||
| #define DTRMM_OLTNCOPY gotoblas -> dtrmm_oltncopy | |||
| #define DTRSM_OUNNCOPY gotoblas -> dtrsm_ounncopy | |||
| #define DTRSM_OUTNCOPY gotoblas -> dtrsm_outncopy | |||
| #define DTRSM_OLNNCOPY gotoblas -> dtrsm_olnncopy | |||
| #define DTRSM_OLTNCOPY gotoblas -> dtrsm_oltncopy | |||
| #define DTRMM_IUNNCOPY gotoblas -> dtrmm_iunncopy | |||
| #define DTRMM_IUTNCOPY gotoblas -> dtrmm_iutncopy | |||
| #define DTRMM_ILNNCOPY gotoblas -> dtrmm_ilnncopy | |||
| #define DTRMM_ILTNCOPY gotoblas -> dtrmm_iltncopy | |||
| #define DTRSM_IUNNCOPY gotoblas -> dtrsm_iunncopy | |||
| #define DTRSM_IUTNCOPY gotoblas -> dtrsm_iutncopy | |||
| #define DTRSM_ILNNCOPY gotoblas -> dtrsm_ilnncopy | |||
| #define DTRSM_ILTNCOPY gotoblas -> dtrsm_iltncopy | |||
| #define DGEMM_BETA gotoblas -> dgemm_beta | |||
| #define DGEMM_KERNEL gotoblas -> dgemm_kernel | |||
| #define DTRMM_KERNEL_LN gotoblas -> dtrmm_kernel_LN | |||
| #define DTRMM_KERNEL_LT gotoblas -> dtrmm_kernel_LT | |||
| #define DTRMM_KERNEL_LR gotoblas -> dtrmm_kernel_LN | |||
| #define DTRMM_KERNEL_LC gotoblas -> dtrmm_kernel_LT | |||
| #define DTRMM_KERNEL_RN gotoblas -> dtrmm_kernel_RN | |||
| #define DTRMM_KERNEL_RT gotoblas -> dtrmm_kernel_RT | |||
| #define DTRMM_KERNEL_RR gotoblas -> dtrmm_kernel_RN | |||
| #define DTRMM_KERNEL_RC gotoblas -> dtrmm_kernel_RT | |||
| #define DTRSM_KERNEL_LN gotoblas -> dtrsm_kernel_LN | |||
| #define DTRSM_KERNEL_LT gotoblas -> dtrsm_kernel_LT | |||
| #define DTRSM_KERNEL_LR gotoblas -> dtrsm_kernel_LN | |||
| #define DTRSM_KERNEL_LC gotoblas -> dtrsm_kernel_LT | |||
| #define DTRSM_KERNEL_RN gotoblas -> dtrsm_kernel_RN | |||
| #define DTRSM_KERNEL_RT gotoblas -> dtrsm_kernel_RT | |||
| #define DTRSM_KERNEL_RR gotoblas -> dtrsm_kernel_RN | |||
| #define DTRSM_KERNEL_RC gotoblas -> dtrsm_kernel_RT | |||
| #define DSYMM_IUTCOPY gotoblas -> dsymm_iutcopy | |||
| #define DSYMM_ILTCOPY gotoblas -> dsymm_iltcopy | |||
| #define DSYMM_OUTCOPY gotoblas -> dsymm_outcopy | |||
| #define DSYMM_OLTCOPY gotoblas -> dsymm_oltcopy | |||
| #define DNEG_TCOPY gotoblas -> dneg_tcopy | |||
| #define DLASWP_NCOPY gotoblas -> dlaswp_ncopy | |||
| #endif | |||
| #define DGEMM_NN dgemm_nn | |||
| #define DGEMM_CN dgemm_tn | |||
| #define DGEMM_TN dgemm_tn | |||
| #define DGEMM_NC dgemm_nt | |||
| #define DGEMM_NT dgemm_nt | |||
| #define DGEMM_CC dgemm_tt | |||
| #define DGEMM_CT dgemm_tt | |||
| #define DGEMM_TC dgemm_tt | |||
| #define DGEMM_TT dgemm_tt | |||
| #define DGEMM_NR dgemm_nn | |||
| #define DGEMM_TR dgemm_tn | |||
| #define DGEMM_CR dgemm_tn | |||
| #define DGEMM_RN dgemm_nn | |||
| #define DGEMM_RT dgemm_nt | |||
| #define DGEMM_RC dgemm_nt | |||
| #define DGEMM_RR dgemm_nn | |||
| #define DSYMM_LU dsymm_LU | |||
| #define DSYMM_LL dsymm_LL | |||
| #define DSYMM_RU dsymm_RU | |||
| #define DSYMM_RL dsymm_RL | |||
| #define DHEMM_LU dhemm_LU | |||
| #define DHEMM_LL dhemm_LL | |||
| #define DHEMM_RU dhemm_RU | |||
| #define DHEMM_RL dhemm_RL | |||
| #define DSYRK_UN dsyrk_UN | |||
| #define DSYRK_UT dsyrk_UT | |||
| #define DSYRK_LN dsyrk_LN | |||
| #define DSYRK_LT dsyrk_LT | |||
| #define DSYRK_UR dsyrk_UN | |||
| #define DSYRK_UC dsyrk_UT | |||
| #define DSYRK_LR dsyrk_LN | |||
| #define DSYRK_LC dsyrk_LT | |||
| #define DSYRK_KERNEL_U dsyrk_kernel_U | |||
| #define DSYRK_KERNEL_L dsyrk_kernel_L | |||
| #define DHERK_UN dsyrk_UN | |||
| #define DHERK_LN dsyrk_LN | |||
| #define DHERK_UC dsyrk_UT | |||
| #define DHERK_LC dsyrk_LT | |||
| #define DHER2K_UN dsyr2k_UN | |||
| #define DHER2K_LN dsyr2k_LN | |||
| #define DHER2K_UC dsyr2k_UT | |||
| #define DHER2K_LC dsyr2k_LT | |||
| #define DSYR2K_UN dsyr2k_UN | |||
| #define DSYR2K_UT dsyr2k_UT | |||
| #define DSYR2K_LN dsyr2k_LN | |||
| #define DSYR2K_LT dsyr2k_LT | |||
| #define DSYR2K_UR dsyr2k_UN | |||
| #define DSYR2K_UC dsyr2k_UT | |||
| #define DSYR2K_LR dsyr2k_LN | |||
| #define DSYR2K_LC dsyr2k_LT | |||
| #define DSYR2K_KERNEL_U dsyr2k_kernel_U | |||
| #define DSYR2K_KERNEL_L dsyr2k_kernel_L | |||
| #define DTRMM_LNUU dtrmm_LNUU | |||
| #define DTRMM_LNUN dtrmm_LNUN | |||
| #define DTRMM_LNLU dtrmm_LNLU | |||
| #define DTRMM_LNLN dtrmm_LNLN | |||
| #define DTRMM_LTUU dtrmm_LTUU | |||
| #define DTRMM_LTUN dtrmm_LTUN | |||
| #define DTRMM_LTLU dtrmm_LTLU | |||
| #define DTRMM_LTLN dtrmm_LTLN | |||
| #define DTRMM_LRUU dtrmm_LNUU | |||
| #define DTRMM_LRUN dtrmm_LNUN | |||
| #define DTRMM_LRLU dtrmm_LNLU | |||
| #define DTRMM_LRLN dtrmm_LNLN | |||
| #define DTRMM_LCUU dtrmm_LTUU | |||
| #define DTRMM_LCUN dtrmm_LTUN | |||
| #define DTRMM_LCLU dtrmm_LTLU | |||
| #define DTRMM_LCLN dtrmm_LTLN | |||
| #define DTRMM_RNUU dtrmm_RNUU | |||
| #define DTRMM_RNUN dtrmm_RNUN | |||
| #define DTRMM_RNLU dtrmm_RNLU | |||
| #define DTRMM_RNLN dtrmm_RNLN | |||
| #define DTRMM_RTUU dtrmm_RTUU | |||
| #define DTRMM_RTUN dtrmm_RTUN | |||
| #define DTRMM_RTLU dtrmm_RTLU | |||
| #define DTRMM_RTLN dtrmm_RTLN | |||
| #define DTRMM_RRUU dtrmm_RNUU | |||
| #define DTRMM_RRUN dtrmm_RNUN | |||
| #define DTRMM_RRLU dtrmm_RNLU | |||
| #define DTRMM_RRLN dtrmm_RNLN | |||
| #define DTRMM_RCUU dtrmm_RTUU | |||
| #define DTRMM_RCUN dtrmm_RTUN | |||
| #define DTRMM_RCLU dtrmm_RTLU | |||
| #define DTRMM_RCLN dtrmm_RTLN | |||
| #define DTRSM_LNUU dtrsm_LNUU | |||
| #define DTRSM_LNUN dtrsm_LNUN | |||
| #define DTRSM_LNLU dtrsm_LNLU | |||
| #define DTRSM_LNLN dtrsm_LNLN | |||
| #define DTRSM_LTUU dtrsm_LTUU | |||
| #define DTRSM_LTUN dtrsm_LTUN | |||
| #define DTRSM_LTLU dtrsm_LTLU | |||
| #define DTRSM_LTLN dtrsm_LTLN | |||
| #define DTRSM_LRUU dtrsm_LNUU | |||
| #define DTRSM_LRUN dtrsm_LNUN | |||
| #define DTRSM_LRLU dtrsm_LNLU | |||
| #define DTRSM_LRLN dtrsm_LNLN | |||
| #define DTRSM_LCUU dtrsm_LTUU | |||
| #define DTRSM_LCUN dtrsm_LTUN | |||
| #define DTRSM_LCLU dtrsm_LTLU | |||
| #define DTRSM_LCLN dtrsm_LTLN | |||
| #define DTRSM_RNUU dtrsm_RNUU | |||
| #define DTRSM_RNUN dtrsm_RNUN | |||
| #define DTRSM_RNLU dtrsm_RNLU | |||
| #define DTRSM_RNLN dtrsm_RNLN | |||
| #define DTRSM_RTUU dtrsm_RTUU | |||
| #define DTRSM_RTUN dtrsm_RTUN | |||
| #define DTRSM_RTLU dtrsm_RTLU | |||
| #define DTRSM_RTLN dtrsm_RTLN | |||
| #define DTRSM_RRUU dtrsm_RNUU | |||
| #define DTRSM_RRUN dtrsm_RNUN | |||
| #define DTRSM_RRLU dtrsm_RNLU | |||
| #define DTRSM_RRLN dtrsm_RNLN | |||
| #define DTRSM_RCUU dtrsm_RTUU | |||
| #define DTRSM_RCUN dtrsm_RTUN | |||
| #define DTRSM_RCLU dtrsm_RTLU | |||
| #define DTRSM_RCLN dtrsm_RTLN | |||
| #define DGEMM_THREAD_NN dgemm_thread_nn | |||
| #define DGEMM_THREAD_CN dgemm_thread_tn | |||
| #define DGEMM_THREAD_TN dgemm_thread_tn | |||
| #define DGEMM_THREAD_NC dgemm_thread_nt | |||
| #define DGEMM_THREAD_NT dgemm_thread_nt | |||
| #define DGEMM_THREAD_CC dgemm_thread_tt | |||
| #define DGEMM_THREAD_CT dgemm_thread_tt | |||
| #define DGEMM_THREAD_TC dgemm_thread_tt | |||
| #define DGEMM_THREAD_TT dgemm_thread_tt | |||
| #define DGEMM_THREAD_NR dgemm_thread_nn | |||
| #define DGEMM_THREAD_TR dgemm_thread_tn | |||
| #define DGEMM_THREAD_CR dgemm_thread_tn | |||
| #define DGEMM_THREAD_RN dgemm_thread_nn | |||
| #define DGEMM_THREAD_RT dgemm_thread_nt | |||
| #define DGEMM_THREAD_RC dgemm_thread_nt | |||
| #define DGEMM_THREAD_RR dgemm_thread_nn | |||
| #define DSYMM_THREAD_LU dsymm_thread_LU | |||
| #define DSYMM_THREAD_LL dsymm_thread_LL | |||
| #define DSYMM_THREAD_RU dsymm_thread_RU | |||
| #define DSYMM_THREAD_RL dsymm_thread_RL | |||
| #define DHEMM_THREAD_LU dhemm_thread_LU | |||
| #define DHEMM_THREAD_LL dhemm_thread_LL | |||
| #define DHEMM_THREAD_RU dhemm_thread_RU | |||
| #define DHEMM_THREAD_RL dhemm_thread_RL | |||
| #define DSYRK_THREAD_UN dsyrk_thread_UN | |||
| #define DSYRK_THREAD_UT dsyrk_thread_UT | |||
| #define DSYRK_THREAD_LN dsyrk_thread_LN | |||
| #define DSYRK_THREAD_LT dsyrk_thread_LT | |||
| #define DSYRK_THREAD_UR dsyrk_thread_UN | |||
| #define DSYRK_THREAD_UC dsyrk_thread_UT | |||
| #define DSYRK_THREAD_LR dsyrk_thread_LN | |||
| #define DSYRK_THREAD_LC dsyrk_thread_LT | |||
| #define DHERK_THREAD_UN dsyrk_thread_UN | |||
| #define DHERK_THREAD_UT dsyrk_thread_UT | |||
| #define DHERK_THREAD_LN dsyrk_thread_LN | |||
| #define DHERK_THREAD_LT dsyrk_thread_LT | |||
| #define DHERK_THREAD_UR dsyrk_thread_UN | |||
| #define DHERK_THREAD_UC dsyrk_thread_UT | |||
| #define DHERK_THREAD_LR dsyrk_thread_LN | |||
| #define DHERK_THREAD_LC dsyrk_thread_LT | |||
| #endif | |||
| @@ -0,0 +1,408 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_IA64 | |||
| #define COMMON_IA64 | |||
| #ifndef ASSEMBLER | |||
| #ifndef MAP_WRITECOMBINED | |||
| #define MAP_WRITECOMBINED 0x10000 | |||
| #endif | |||
| #define MB | |||
| #define WMB | |||
| #ifdef __ECC | |||
| #include <ia64intrin.h> | |||
| #endif | |||
| #define RPCC64BIT | |||
| #ifndef __ECC | |||
| static __inline void blas_lock(volatile unsigned long *address){ | |||
| unsigned long ret; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| __asm__ __volatile__ ("mov ar.ccv=r0\n;;\n" | |||
| "cmpxchg4.acq %0=[%2],%1,ar.ccv\n" | |||
| : "=r"(ret) : "r"(1), "r"(address) | |||
| : "ar.ccv", "memory"); | |||
| } while (ret); | |||
| } | |||
| static __inline unsigned long rpcc(void) { | |||
| unsigned long clocks; | |||
| __asm__ __volatile__ ("mov %0=ar.itc" : "=r"(clocks)); | |||
| return clocks; | |||
| } | |||
| static __inline unsigned long stmxcsr(void){ | |||
| unsigned long fp; | |||
| __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fp)); | |||
| return fp; | |||
| } | |||
| static __inline void ldmxcsr(unsigned long fp) { | |||
| __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (fp)); | |||
| } | |||
| #define GET_IMAGE(res) asm __volatile__("mov %0 = f9" : "=f"(res) : : "memory") | |||
| #else | |||
| static __inline void blas_lock(volatile unsigned long *address){ | |||
| while (*address || _InterlockedCompareExchange((volatile int *) address,1,0)) | |||
| ; | |||
| } | |||
| static __inline unsigned int rpcc(void) { | |||
| return __getReg(_IA64_REG_AR_ITC); | |||
| } | |||
| static __inline unsigned int stmxcsr(void) { | |||
| return __getReg(_IA64_REG_AR_FPSR); | |||
| } | |||
| static __inline void ldmxcsr(unsigned long fp) { | |||
| return __setReg(_IA64_REG_AR_FPSR, fp); | |||
| } | |||
| #ifdef DOUBLE | |||
| #define GET_IMAGE(res) __stfd(&res, 9) | |||
| #else | |||
| #define GET_IMAGE(res) __stfs(&res, 9) | |||
| #endif | |||
| #endif | |||
| #define GET_IMAGE_CANCEL | |||
| #ifdef ENABLE_SSE_EXCEPTION | |||
| #define IDEBUG_START \ | |||
| { \ | |||
| unsigned long fp_sse_mode, new_fp_mode; \ | |||
| fp_sse_mode = stmxcsr();\ | |||
| new_fp_mode = (fp_sse_mode & ~(FE_UNDERFLOW | FE_OVERFLOW | FE_UNNORMAL | FE_INVALID));\ | |||
| ldmxcsr(new_fp_mode); | |||
| #define IDEBUG_END \ | |||
| ldmxcsr(fp_sse_mode); \ | |||
| } | |||
| #endif | |||
| #ifdef SMP | |||
| #ifdef USE64BITINT | |||
| /* 64bit version */ | |||
| extern unsigned long blas_quick_divide_table[]; | |||
| #ifndef __ECC | |||
| static __inline long blas_quickdivide(unsigned long int x, unsigned long int y){ | |||
| unsigned long ret; | |||
| if (y <= 1) return x; | |||
| __asm__ __volatile__("setf.sig f6 = %1\n\t" | |||
| "ldf8 f7 = [%2];;\n\t" | |||
| "xmpy.hu f6= f6, f7;;\n\t" | |||
| "getf.sig %0 = f6;;\n" | |||
| : "=r"(ret) | |||
| : "r"(x), "r"(&blas_quick_divide_table[y]) : "f6", "f7" | |||
| ); | |||
| return ret; | |||
| } | |||
| #else | |||
| /* Using Intel Compiler */ | |||
| static __inline long blas_quickdivide(unsigned long int x, unsigned long int y){ | |||
| if (y <= 1) return x; | |||
| return _m64_xmahu(x, blas_quick_divide_table[y], 0); | |||
| } | |||
| #endif | |||
| #else | |||
| /* 32bit version */ | |||
| extern unsigned int blas_quick_divide_table[]; | |||
| static __inline int blas_quickdivide(unsigned int x, unsigned int y){ | |||
| if (y <= 1) return x; | |||
| return (int)((x * (unsigned long)blas_quick_divide_table[y]) >> 32); | |||
| } | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #if 0 | |||
| #ifdef DOUBLE | |||
| #define GEMM_NCOPY dgemm_ncopy | |||
| #define GEMM_TCOPY dgemm_tcopy | |||
| #define ZGEMM_NCOPY zgemm_ncopy | |||
| #define ZGEMM_TCOPY zgemm_tcopy | |||
| #define GEMM_KERNEL dgemm_kernel | |||
| #if defined(NN) || defined(NT) || defined(TN) || defined(TT) | |||
| #define ZGEMM_KERNEL zgemm_kernel_n | |||
| #endif | |||
| #if defined(CN) || defined(CT) || defined(RN) || defined(RT) | |||
| #define ZGEMM_KERNEL zgemm_kernel_l | |||
| #endif | |||
| #if defined(NC) || defined(TC) || defined(NR) || defined(TR) | |||
| #define ZGEMM_KERNEL zgemm_kernel_r | |||
| #endif | |||
| #if defined(CC) || defined(CR) || defined(RC) || defined(RR) | |||
| #define ZGEMM_KERNEL zgemm_kernel_b | |||
| #endif | |||
| #else | |||
| #define GEMM_NCOPY sgemm_ncopy | |||
| #define GEMM_TCOPY sgemm_tcopy | |||
| #define ZGEMM_NCOPY cgemm_ncopy | |||
| #define ZGEMM_TCOPY cgemm_tcopy | |||
| #define GEMM_KERNEL sgemm_kernel | |||
| #if defined(NN) || defined(NT) || defined(TN) || defined(TT) | |||
| #define ZGEMM_KERNEL cgemm_kernel_n | |||
| #endif | |||
| #if defined(CN) || defined(CT) || defined(RN) || defined(RT) | |||
| #define ZGEMM_KERNEL cgemm_kernel_l | |||
| #endif | |||
| #if defined(NC) || defined(TC) || defined(NR) || defined(TR) | |||
| #define ZGEMM_KERNEL cgemm_kernel_r | |||
| #endif | |||
| #if defined(CC) || defined(CR) || defined(RC) || defined(RR) | |||
| #define ZGEMM_KERNEL cgemm_kernel_b | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #ifdef USE64BITINT | |||
| #define LDINT ld8 | |||
| #define INTSIZE 8 | |||
| #define CMP4GE cmp.ge | |||
| #define CMP4NE cmp.ge | |||
| #define CMP4EQ cmp.eq | |||
| #else | |||
| #define LDINT ld4 | |||
| #define INTSIZE 4 | |||
| #define CMP4GE cmp4.ge | |||
| #define CMP4NE cmp4.ne | |||
| #define CMP4EQ cmp4.eq | |||
| #endif | |||
| #define HALT mov r0 = 0 | |||
| #ifdef XDOUBLE | |||
| #define LD8 ld8 | |||
| #define ST8 st8 | |||
| #define LDFD ldfe | |||
| #define LDFPD ldfpe | |||
| #define LDFD_T1 ldfe.t1 | |||
| #define LDFD_NT1 ldfe.nt1 | |||
| #define LDFD_NT2 ldfe.nt2 | |||
| #define LDFD_NTA ldfe.nta | |||
| #define LDFPD_NT1 ldfpe.nt1 | |||
| #define LDFPD_NT2 ldfpe.nt2 | |||
| #define LDFPD_NTA ldfpe.nta | |||
| #define STFD stfe | |||
| #define STFD_NTA stfe.nta | |||
| #define FADD fadd | |||
| #define FSUB fsub | |||
| #define FMPY fmpy | |||
| #define FMA fma | |||
| #define FMS fms | |||
| #define FNMA fnma | |||
| #define FPMA fpma | |||
| #define SETF setf.d | |||
| #elif defined(DOUBLE) | |||
| #define LD8 ld8 | |||
| #define ST8 st8 | |||
| #define LDF8 ldf8 | |||
| #define LDF8_NT1 ldf8.nt1 | |||
| #define LDF8_NTA ldf8.nta | |||
| #define STF8 stf8 | |||
| #define STF8_NTA stf8.nta | |||
| #define LDFD ldfd | |||
| #define LDFPD ldfpd | |||
| #define LDFD_T1 ldfd.t1 | |||
| #define LDFD_NT1 ldfd.nt1 | |||
| #define LDFD_NT2 ldfd.nt2 | |||
| #define LDFD_NTA ldfd.nta | |||
| #define LDFPD_NT1 ldfpd.nt1 | |||
| #define LDFPD_NT2 ldfpd.nt2 | |||
| #define LDFPD_NTA ldfpd.nta | |||
| #define STFD stfd | |||
| #define STFD_NTA stfd.nta | |||
| #define FADD fadd.d | |||
| #define FSUB fsub.d | |||
| #define FMPY fmpy.d | |||
| #define FMA fma.d | |||
| #define FMS fms.d | |||
| #define FNMA fnma.d | |||
| #define FPMA fpma.d | |||
| #define SETF setf.d | |||
| #else | |||
| #define LD8 ld4 | |||
| #define ST8 st4 | |||
| #define LDF8 ldfs | |||
| #define LDF8_NT1 ldfs.nt1 | |||
| #define LDF8_NTA ldfs.nta | |||
| #define STF8 stfs | |||
| #define STF8_NTA stfs.nta | |||
| #define LDFD ldfs | |||
| #define LDFPD ldfps | |||
| #define LDFD_T1 ldfs.t1 | |||
| #define LDFD_NT1 ldfs.nt1 | |||
| #define LDFD_NT2 ldfs.nt2 | |||
| #define LDFD_NTA ldfs.nta | |||
| #define LDFPD_NT1 ldfps.nt1 | |||
| #define LDFPD_NT2 ldfps.nt2 | |||
| #define LDFPD_NTA ldfps.nta | |||
| #define STFD stfs | |||
| #define STFD_NTA stfs.nta | |||
| #if 0 | |||
| #define FADD fadd.s | |||
| #define FSUB fsub.s | |||
| #define FMPY fmpy.s | |||
| #define FMA fma.s | |||
| #define FMS fms.s | |||
| #define FNMA fnma.s | |||
| #define FPMA fpma.s | |||
| #else | |||
| #define FADD fadd | |||
| #define FSUB fsub | |||
| #define FMPY fmpy | |||
| #define FMA fma | |||
| #define FMS fms | |||
| #define FNMA fnma | |||
| #define FPMA fpma | |||
| #endif | |||
| #define SETF setf.s | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #ifdef F_INTERFACE_G77 | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef F_INTERFACE_G95 | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef F_INTERFACE_GFORT | |||
| #define RETURN_BY_REGS | |||
| #endif | |||
| #ifdef F_INTERFACE_INTEL | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #define PROLOGUE \ | |||
| .explicit; \ | |||
| .text; \ | |||
| .align 128; \ | |||
| .global REALNAME; \ | |||
| .proc REALNAME; \ | |||
| REALNAME: | |||
| #ifdef PROFILE | |||
| #define PROFCODE \ | |||
| .data; \ | |||
| .align 8; \ | |||
| .LP0:; \ | |||
| data8 0; \ | |||
| .text; \ | |||
| alloc out0 = ar.pfs, 8, 0, 4, 0; \ | |||
| mov out1 = r1; \ | |||
| mov out2 = b0; \ | |||
| addl out3 = @ltoff(.LP0), r1;;; \ | |||
| br.call.sptk.many b0 = _mcount;; | |||
| #else | |||
| #define PROFCODE | |||
| #endif | |||
| #define EPILOGUE \ | |||
| .endp REALNAME | |||
| #define START_ADDRESS 0x20000fc800000000UL | |||
| #undef SEEK_ADDRESS | |||
| #if 0 | |||
| #ifdef CONFIG_IA64_PAGE_SIZE_4KB | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #ifdef CONFIG_IA64_PAGE_SIZE_8KB | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #endif | |||
| #define BUFFER_SIZE (128 << 20) | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE (16UL << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE ( 4 << 20) | |||
| #define BASE_ADDRESS (START_ADDRESS - (BLASULONG)BUFFER_SIZE * MAX_CPU_NUMBER) | |||
| #endif | |||
| @@ -0,0 +1,736 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef ASSEMBLER | |||
| int BLASFUNC(xerbla)(char *, blasint *info, blasint); | |||
| FLOATRET BLASFUNC(sdot) (blasint *, float *, blasint *, float *, blasint *); | |||
| FLOATRET BLASFUNC(sdsdot)(blasint *, float *, float *, blasint *, float *, blasint *); | |||
| double BLASFUNC(dsdot) (blasint *, float *, blasint *, float *, blasint *); | |||
| double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| #ifdef RETURN_BY_STRUCT | |||
| typedef struct { | |||
| float r, i; | |||
| } myccomplex_t; | |||
| typedef struct { | |||
| double r, i; | |||
| } myzcomplex_t; | |||
| typedef struct { | |||
| xdouble r, i; | |||
| } myxcomplex_t; | |||
| myccomplex_t BLASFUNC(cdotu) (blasint *, float *, blasint *, float *, blasint *); | |||
| myccomplex_t BLASFUNC(cdotc) (blasint *, float *, blasint *, float *, blasint *); | |||
| myzcomplex_t BLASFUNC(zdotu) (blasint *, double *, blasint *, double *, blasint *); | |||
| myzcomplex_t BLASFUNC(zdotc) (blasint *, double *, blasint *, double *, blasint *); | |||
| myxcomplex_t BLASFUNC(xdotu) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| myxcomplex_t BLASFUNC(xdotc) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| #elif defined RETURN_BY_STACK | |||
| void BLASFUNC(cdotu) (float _Complex *, blasint *, float * , blasint *, float *, blasint *); | |||
| void BLASFUNC(cdotc) (float _Complex *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zdotu) (double _Complex *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(zdotc) (double _Complex *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xdotu) (xdouble _Complex *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(xdotc) (xdouble _Complex *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| #else | |||
| float _Complex BLASFUNC(cdotu) (blasint *, float *, blasint *, float *, blasint *); | |||
| float _Complex BLASFUNC(cdotc) (blasint *, float *, blasint *, float *, blasint *); | |||
| double _Complex BLASFUNC(zdotu) (blasint *, double *, blasint *, double *, blasint *); | |||
| double _Complex BLASFUNC(zdotc) (blasint *, double *, blasint *, double *, blasint *); | |||
| xdouble _Complex BLASFUNC(xdotu) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| xdouble _Complex BLASFUNC(xdotc) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| #endif | |||
| void BLASFUNC(saxpy) (blasint *, float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(daxpy) (blasint *, double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qaxpy) (blasint *, xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(caxpy) (blasint *, float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zaxpy) (blasint *, double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xaxpy) (blasint *, xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(caxpyc)(blasint *, float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zaxpyc)(blasint *, double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xaxpyc)(blasint *, xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(scopy) (blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dcopy) (blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qcopy) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ccopy) (blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zcopy) (blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xcopy) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(sswap) (blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dswap) (blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qswap) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(cswap) (blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zswap) (blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xswap) (blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(sasum) (blasint *, float *, blasint *); | |||
| FLOATRET BLASFUNC(scasum)(blasint *, float *, blasint *); | |||
| double BLASFUNC(dasum) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qasum) (blasint *, xdouble *, blasint *); | |||
| double BLASFUNC(dzasum)(blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxasum)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(isamax)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(idamax)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(iqamax)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(icamax)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(izamax)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(ixamax)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(ismax) (blasint *, float *, blasint *); | |||
| blasint BLASFUNC(idmax) (blasint *, double *, blasint *); | |||
| blasint BLASFUNC(iqmax) (blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(icmax) (blasint *, float *, blasint *); | |||
| blasint BLASFUNC(izmax) (blasint *, double *, blasint *); | |||
| blasint BLASFUNC(ixmax) (blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(isamin)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(idamin)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(iqamin)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(icamin)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(izamin)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(ixamin)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(ismin)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(idmin)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(iqmin)(blasint *, xdouble *, blasint *); | |||
| blasint BLASFUNC(icmin)(blasint *, float *, blasint *); | |||
| blasint BLASFUNC(izmin)(blasint *, double *, blasint *); | |||
| blasint BLASFUNC(ixmin)(blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(samax) (blasint *, float *, blasint *); | |||
| double BLASFUNC(damax) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qamax) (blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(scamax)(blasint *, float *, blasint *); | |||
| double BLASFUNC(dzamax)(blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxamax)(blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(samin) (blasint *, float *, blasint *); | |||
| double BLASFUNC(damin) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qamin) (blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(scamin)(blasint *, float *, blasint *); | |||
| double BLASFUNC(dzamin)(blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxamin)(blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(smax) (blasint *, float *, blasint *); | |||
| double BLASFUNC(dmax) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qmax) (blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(scmax) (blasint *, float *, blasint *); | |||
| double BLASFUNC(dzmax) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxmax) (blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(smin) (blasint *, float *, blasint *); | |||
| double BLASFUNC(dmin) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qmin) (blasint *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(scmin) (blasint *, float *, blasint *); | |||
| double BLASFUNC(dzmin) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxmin) (blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(sscal) (blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dscal) (blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qscal) (blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cscal) (blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zscal) (blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xscal) (blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csscal)(blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zdscal)(blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xqscal)(blasint *, xdouble *, xdouble *, blasint *); | |||
| FLOATRET BLASFUNC(snrm2) (blasint *, float *, blasint *); | |||
| FLOATRET BLASFUNC(scnrm2)(blasint *, float *, blasint *); | |||
| double BLASFUNC(dnrm2) (blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qnrm2) (blasint *, xdouble *, blasint *); | |||
| double BLASFUNC(dznrm2)(blasint *, double *, blasint *); | |||
| xdouble BLASFUNC(qxnrm2)(blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(srot) (blasint *, float *, blasint *, float *, blasint *, float *, float *); | |||
| void BLASFUNC(drot) (blasint *, double *, blasint *, double *, blasint *, double *, double *); | |||
| void BLASFUNC(qrot) (blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *); | |||
| void BLASFUNC(csrot) (blasint *, float *, blasint *, float *, blasint *, float *, float *); | |||
| void BLASFUNC(zdrot) (blasint *, double *, blasint *, double *, blasint *, double *, double *); | |||
| void BLASFUNC(xqrot) (blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *); | |||
| void BLASFUNC(srotg) (float *, float *, float *, float *); | |||
| void BLASFUNC(drotg) (double *, double *, double *, double *); | |||
| void BLASFUNC(qrotg) (xdouble *, xdouble *, xdouble *, xdouble *); | |||
| void BLASFUNC(crotg) (float *, float *, float *, float *); | |||
| void BLASFUNC(zrotg) (double *, double *, double *, double *); | |||
| void BLASFUNC(xrotg) (xdouble *, xdouble *, xdouble *, xdouble *); | |||
| void BLASFUNC(srotmg)(float *, float *, float *, float *, float *); | |||
| void BLASFUNC(drotmg)(double *, double *, double *, double *, double *); | |||
| void BLASFUNC(srotm) (blasint *, float *, blasint *, float *, blasint *, float *); | |||
| void BLASFUNC(drotm) (blasint *, double *, blasint *, double *, blasint *, double *); | |||
| void BLASFUNC(qrotm) (blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *); | |||
| /* Level 2 routines */ | |||
| void BLASFUNC(sger)(blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dger)(blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qger)(blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(cgeru)(blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(cgerc)(blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zgeru)(blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(zgerc)(blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xgeru)(blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(xgerc)(blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(sgemv)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dgemv)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qgemv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cgemv)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zgemv)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xgemv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(strsv) (char *, char *, char *, blasint *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(dtrsv) (char *, char *, char *, blasint *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(qtrsv) (char *, char *, char *, blasint *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(ctrsv) (char *, char *, char *, blasint *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(ztrsv) (char *, char *, char *, blasint *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(xtrsv) (char *, char *, char *, blasint *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(strmv) (char *, char *, char *, blasint *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(dtrmv) (char *, char *, char *, blasint *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(qtrmv) (char *, char *, char *, blasint *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(ctrmv) (char *, char *, char *, blasint *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(ztrmv) (char *, char *, char *, blasint *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(xtrmv) (char *, char *, char *, blasint *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(stpsv) (char *, char *, char *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dtpsv) (char *, char *, char *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qtpsv) (char *, char *, char *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ctpsv) (char *, char *, char *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(ztpsv) (char *, char *, char *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xtpsv) (char *, char *, char *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(stpmv) (char *, char *, char *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dtpmv) (char *, char *, char *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qtpmv) (char *, char *, char *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ctpmv) (char *, char *, char *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(ztpmv) (char *, char *, char *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xtpmv) (char *, char *, char *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(stbmv) (char *, char *, char *, blasint *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dtbmv) (char *, char *, char *, blasint *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qtbmv) (char *, char *, char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ctbmv) (char *, char *, char *, blasint *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(ztbmv) (char *, char *, char *, blasint *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xtbmv) (char *, char *, char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(stbsv) (char *, char *, char *, blasint *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dtbsv) (char *, char *, char *, blasint *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qtbsv) (char *, char *, char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ctbsv) (char *, char *, char *, blasint *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(ztbsv) (char *, char *, char *, blasint *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xtbsv) (char *, char *, char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ssymv) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dsymv) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qsymv) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csymv) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zsymv) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xsymv) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(sspmv) (char *, blasint *, float *, float *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dspmv) (char *, blasint *, double *, double *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qspmv) (char *, blasint *, xdouble *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cspmv) (char *, blasint *, float *, float *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zspmv) (char *, blasint *, double *, double *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xspmv) (char *, blasint *, xdouble *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ssyr) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(dsyr) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(qsyr) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(csyr) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(zsyr) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(xsyr) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(ssyr2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dsyr2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qsyr2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(csyr2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zsyr2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xsyr2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(sspr) (char *, blasint *, float *, float *, blasint *, | |||
| float *); | |||
| void BLASFUNC(dspr) (char *, blasint *, double *, double *, blasint *, | |||
| double *); | |||
| void BLASFUNC(qspr) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *); | |||
| void BLASFUNC(cspr) (char *, blasint *, float *, float *, blasint *, | |||
| float *); | |||
| void BLASFUNC(zspr) (char *, blasint *, double *, double *, blasint *, | |||
| double *); | |||
| void BLASFUNC(xspr) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *); | |||
| void BLASFUNC(sspr2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *); | |||
| void BLASFUNC(dspr2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *); | |||
| void BLASFUNC(qspr2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *); | |||
| void BLASFUNC(cspr2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *); | |||
| void BLASFUNC(zspr2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *); | |||
| void BLASFUNC(xspr2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *); | |||
| void BLASFUNC(cher) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *); | |||
| void BLASFUNC(zher) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *); | |||
| void BLASFUNC(xher) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *); | |||
| void BLASFUNC(chpr) (char *, blasint *, float *, float *, blasint *, float *); | |||
| void BLASFUNC(zhpr) (char *, blasint *, double *, double *, blasint *, double *); | |||
| void BLASFUNC(xhpr) (char *, blasint *, xdouble *, xdouble *, blasint *, xdouble *); | |||
| void BLASFUNC(cher2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(zher2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xher2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(chpr2) (char *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *); | |||
| void BLASFUNC(zhpr2) (char *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *); | |||
| void BLASFUNC(xhpr2) (char *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *); | |||
| void BLASFUNC(chemv) (char *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zhemv) (char *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xhemv) (char *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(chpmv) (char *, blasint *, float *, float *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zhpmv) (char *, blasint *, double *, double *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xhpmv) (char *, blasint *, xdouble *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(snorm)(char *, blasint *, blasint *, float *, blasint *); | |||
| int BLASFUNC(dnorm)(char *, blasint *, blasint *, double *, blasint *); | |||
| int BLASFUNC(cnorm)(char *, blasint *, blasint *, float *, blasint *); | |||
| int BLASFUNC(znorm)(char *, blasint *, blasint *, double *, blasint *); | |||
| void BLASFUNC(sgbmv)(char *, blasint *, blasint *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dgbmv)(char *, blasint *, blasint *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qgbmv)(char *, blasint *, blasint *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cgbmv)(char *, blasint *, blasint *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zgbmv)(char *, blasint *, blasint *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xgbmv)(char *, blasint *, blasint *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ssbmv)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dsbmv)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qsbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csbmv)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zsbmv)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xsbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(chbmv)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zhbmv)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xhbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| /* Level 3 routines */ | |||
| void BLASFUNC(sgemm)(char *, char *, blasint *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dgemm)(char *, char *, blasint *, blasint *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qgemm)(char *, char *, blasint *, blasint *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cgemm)(char *, char *, blasint *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zgemm)(char *, char *, blasint *, blasint *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xgemm)(char *, char *, blasint *, blasint *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cgemm3m)(char *, char *, blasint *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zgemm3m)(char *, char *, blasint *, blasint *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xgemm3m)(char *, char *, blasint *, blasint *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(sge2mm)(char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *, | |||
| float *, float *, blasint *); | |||
| int BLASFUNC(dge2mm)(char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *, | |||
| double *, double *, blasint *); | |||
| int BLASFUNC(cge2mm)(char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *, | |||
| float *, float *, blasint *); | |||
| int BLASFUNC(zge2mm)(char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *, | |||
| double *, double *, blasint *); | |||
| void BLASFUNC(strsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dtrsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qtrsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ctrsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(ztrsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xtrsm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(strmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(dtrmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(qtrmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ctrmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| float *, float *, blasint *, float *, blasint *); | |||
| void BLASFUNC(ztrmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| double *, double *, blasint *, double *, blasint *); | |||
| void BLASFUNC(xtrmm)(char *, char *, char *, char *, blasint *, blasint *, | |||
| xdouble *, xdouble *, blasint *, xdouble *, blasint *); | |||
| void BLASFUNC(ssymm)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dsymm)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qsymm)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csymm)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zsymm)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xsymm)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csymm3m)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zsymm3m)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xsymm3m)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ssyrk)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, float *, blasint *); | |||
| void BLASFUNC(dsyrk)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, double *, blasint *); | |||
| void BLASFUNC(qsyrk)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csyrk)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, float *, blasint *); | |||
| void BLASFUNC(zsyrk)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, double *, blasint *); | |||
| void BLASFUNC(xsyrk)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(ssyr2k)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(dsyr2k)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double*, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(qsyr2k)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble*, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(csyr2k)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zsyr2k)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double*, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xsyr2k)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble*, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(chemm)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zhemm)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xhemm)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(chemm3m)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zhemm3m)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xhemm3m)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cherk)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, float *, blasint *); | |||
| void BLASFUNC(zherk)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, double *, blasint *); | |||
| void BLASFUNC(xherk)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble *, xdouble *, blasint *); | |||
| void BLASFUNC(cher2k)(char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| void BLASFUNC(zher2k)(char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double*, blasint *, double *, double *, blasint *); | |||
| void BLASFUNC(xher2k)(char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble*, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(cher2m)(char *, char *, char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *, float *, float *, blasint *); | |||
| int BLASFUNC(zher2m)(char *, char *, char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double*, blasint *, double *, double *, blasint *); | |||
| int BLASFUNC(xher2m)(char *, char *, char *, blasint *, blasint *, xdouble *, xdouble *, blasint *, | |||
| xdouble*, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(sgemt)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *); | |||
| int BLASFUNC(dgemt)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *); | |||
| int BLASFUNC(cgemt)(char *, blasint *, blasint *, float *, float *, blasint *, | |||
| float *, blasint *); | |||
| int BLASFUNC(zgemt)(char *, blasint *, blasint *, double *, double *, blasint *, | |||
| double *, blasint *); | |||
| int BLASFUNC(sgema)(char *, char *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, float *, blasint *, float *, blasint *); | |||
| int BLASFUNC(dgema)(char *, char *, blasint *, blasint *, double *, | |||
| double *, blasint *, double*, double *, blasint *, double*, blasint *); | |||
| int BLASFUNC(cgema)(char *, char *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, float *, blasint *, float *, blasint *); | |||
| int BLASFUNC(zgema)(char *, char *, blasint *, blasint *, double *, | |||
| double *, blasint *, double*, double *, blasint *, double*, blasint *); | |||
| int BLASFUNC(sgems)(char *, char *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, float *, blasint *, float *, blasint *); | |||
| int BLASFUNC(dgems)(char *, char *, blasint *, blasint *, double *, | |||
| double *, blasint *, double*, double *, blasint *, double*, blasint *); | |||
| int BLASFUNC(cgems)(char *, char *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, float *, blasint *, float *, blasint *); | |||
| int BLASFUNC(zgems)(char *, char *, blasint *, blasint *, double *, | |||
| double *, blasint *, double*, double *, blasint *, double*, blasint *); | |||
| int BLASFUNC(sgemc)(char *, char *, blasint *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, blasint *, float *, float *, blasint *); | |||
| int BLASFUNC(dgemc)(char *, char *, blasint *, blasint *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, blasint *, double *, double *, blasint *); | |||
| int BLASFUNC(qgemc)(char *, char *, blasint *, blasint *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(cgemc)(char *, char *, blasint *, blasint *, blasint *, float *, | |||
| float *, blasint *, float *, blasint *, float *, blasint *, float *, float *, blasint *); | |||
| int BLASFUNC(zgemc)(char *, char *, blasint *, blasint *, blasint *, double *, | |||
| double *, blasint *, double *, blasint *, double *, blasint *, double *, double *, blasint *); | |||
| int BLASFUNC(xgemc)(char *, char *, blasint *, blasint *, blasint *, xdouble *, | |||
| xdouble *, blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *); | |||
| int BLASFUNC(sgetf2)(blasint *, blasint *, float *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(dgetf2)(blasint *, blasint *, double *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(qgetf2)(blasint *, blasint *, xdouble *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(cgetf2)(blasint *, blasint *, float *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(zgetf2)(blasint *, blasint *, double *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(xgetf2)(blasint *, blasint *, xdouble *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(sgetrf)(blasint *, blasint *, float *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(dgetrf)(blasint *, blasint *, double *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(qgetrf)(blasint *, blasint *, xdouble *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(cgetrf)(blasint *, blasint *, float *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(zgetrf)(blasint *, blasint *, double *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(xgetrf)(blasint *, blasint *, xdouble *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(slaswp)(blasint *, float *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(dlaswp)(blasint *, double *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(qlaswp)(blasint *, xdouble *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(claswp)(blasint *, float *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(zlaswp)(blasint *, double *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(xlaswp)(blasint *, xdouble *, blasint *, blasint *, blasint *, blasint *, blasint *); | |||
| int BLASFUNC(sgetrs)(char *, blasint *, blasint *, float *, blasint *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dgetrs)(char *, blasint *, blasint *, double *, blasint *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qgetrs)(char *, blasint *, blasint *, xdouble *, blasint *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(cgetrs)(char *, blasint *, blasint *, float *, blasint *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zgetrs)(char *, blasint *, blasint *, double *, blasint *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xgetrs)(char *, blasint *, blasint *, xdouble *, blasint *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(sgesv)(blasint *, blasint *, float *, blasint *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dgesv)(blasint *, blasint *, double *, blasint *, blasint *, double*, blasint *, blasint *); | |||
| int BLASFUNC(qgesv)(blasint *, blasint *, xdouble *, blasint *, blasint *, xdouble*, blasint *, blasint *); | |||
| int BLASFUNC(cgesv)(blasint *, blasint *, float *, blasint *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zgesv)(blasint *, blasint *, double *, blasint *, blasint *, double*, blasint *, blasint *); | |||
| int BLASFUNC(xgesv)(blasint *, blasint *, xdouble *, blasint *, blasint *, xdouble*, blasint *, blasint *); | |||
| int BLASFUNC(spotf2)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dpotf2)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qpotf2)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(cpotf2)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zpotf2)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xpotf2)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(spotrf)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dpotrf)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qpotrf)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(cpotrf)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zpotrf)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xpotrf)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(slauu2)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dlauu2)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qlauu2)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(clauu2)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zlauu2)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xlauu2)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(slauum)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dlauum)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qlauum)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(clauum)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zlauum)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xlauum)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(strti2)(char *, char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dtrti2)(char *, char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qtrti2)(char *, char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(ctrti2)(char *, char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(ztrti2)(char *, char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xtrti2)(char *, char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(strtri)(char *, char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dtrtri)(char *, char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qtrtri)(char *, char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(ctrtri)(char *, char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(ztrtri)(char *, char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xtrtri)(char *, char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(spotri)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(dpotri)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(qpotri)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(cpotri)(char *, blasint *, float *, blasint *, blasint *); | |||
| int BLASFUNC(zpotri)(char *, blasint *, double *, blasint *, blasint *); | |||
| int BLASFUNC(xpotri)(char *, blasint *, xdouble *, blasint *, blasint *); | |||
| int BLASFUNC(slarf)(char *, blasint *, blasint *, float *, blasint *, float *, float *, blasint *, float *); | |||
| int BLASFUNC(dlarf)(char *, blasint *, blasint *, double *, blasint *, double *, double *, blasint *, double *); | |||
| int BLASFUNC(qlarf)(char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *, xdouble *); | |||
| int BLASFUNC(clarf)(char *, blasint *, blasint *, float *, blasint *, float *, float *, blasint *, float *); | |||
| int BLASFUNC(zlarf)(char *, blasint *, blasint *, double *, blasint *, double *, double *, blasint *, double *); | |||
| int BLASFUNC(xlarf)(char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *, xdouble *); | |||
| FLOATRET BLASFUNC(slamch)(char *); | |||
| double BLASFUNC(dlamch)(char *); | |||
| xdouble BLASFUNC(qlamch)(char *); | |||
| FLOATRET BLASFUNC(slamc3)(float *, float *); | |||
| double BLASFUNC(dlamc3)(double *, double *); | |||
| xdouble BLASFUNC(qlamc3)(xdouble *, xdouble *); | |||
| #endif | |||
| @@ -0,0 +1,296 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef ASSEMBLER | |||
| /* Lapack Library */ | |||
| blasint sgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xgetf2_k(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint sgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xgetrf_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint sgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xgetrf_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| int slaswp_plus (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG); | |||
| int slaswp_minus(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG); | |||
| int dlaswp_plus (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, blasint *, BLASLONG); | |||
| int dlaswp_minus(BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, blasint *, BLASLONG); | |||
| int qlaswp_plus (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, blasint *, BLASLONG); | |||
| int qlaswp_minus(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, blasint *, BLASLONG); | |||
| int claswp_plus (BLASLONG, BLASLONG, BLASLONG, float, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG); | |||
| int claswp_minus(BLASLONG, BLASLONG, BLASLONG, float, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG); | |||
| int zlaswp_plus (BLASLONG, BLASLONG, BLASLONG, double, double, double *, BLASLONG, double *, BLASLONG, blasint *, BLASLONG); | |||
| int zlaswp_minus(BLASLONG, BLASLONG, BLASLONG, double, double, double *, BLASLONG, double *, BLASLONG, blasint *, BLASLONG); | |||
| int xlaswp_plus (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, blasint *, BLASLONG); | |||
| int xlaswp_minus(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, blasint *, BLASLONG); | |||
| int slaswp_ncopy(BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *); | |||
| int dlaswp_ncopy(BLASLONG, BLASLONG, BLASLONG, double *, BLASLONG, blasint *, double *); | |||
| int qlaswp_ncopy(BLASLONG, BLASLONG, BLASLONG, xdouble *, BLASLONG, blasint *, xdouble *); | |||
| int claswp_ncopy(BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *); | |||
| int zlaswp_ncopy(BLASLONG, BLASLONG, BLASLONG, double *, BLASLONG, blasint *, double *); | |||
| int xlaswp_ncopy(BLASLONG, BLASLONG, BLASLONG, xdouble *, BLASLONG, blasint *, xdouble *); | |||
| blasint sgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint sgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_R_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_C_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_R_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_C_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xgetrs_N_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_T_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_R_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_C_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint sgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint sgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_R_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cgetrs_C_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_R_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zgetrs_C_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xgetrs_N_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_T_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_R_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xgetrs_C_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint spotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint spotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dpotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dpotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qpotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qpotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cpotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cpotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zpotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zpotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xpotf2_U(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xpotf2_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint spotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint spotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dpotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dpotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qpotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qpotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cpotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cpotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zpotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zpotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xpotrf_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xpotrf_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint spotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint spotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dpotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dpotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qpotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qpotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint cpotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint cpotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zpotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zpotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xpotrf_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xpotrf_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint slauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint slauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dlauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dlauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qlauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qlauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint clauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint clauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zlauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zlauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xlauu2_U(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xlauu2_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint slauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint slauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dlauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dlauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qlauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qlauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint clauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint clauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zlauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zlauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xlauum_U_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xlauum_L_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint slauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint slauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dlauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dlauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qlauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qlauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint clauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint clauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zlauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zlauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xlauum_U_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xlauum_L_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint strti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dtrti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qtrti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint ctrti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ztrti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xtrti2_UU(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrti2_UN(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrti2_LU(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrti2_LN(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint strtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dtrtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qtrtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint ctrtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ztrtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xtrtri_UU_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_UN_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_LU_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_LN_single(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint strtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint strtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dtrtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dtrtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qtrtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qtrtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint ctrtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ctrtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint ztrtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint ztrtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xtrtri_UU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_UN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_LU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xtrtri_LN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| int sneg_tcopy(BLASLONG, BLASLONG, float *, BLASLONG, float *); | |||
| int dneg_tcopy(BLASLONG, BLASLONG, double *, BLASLONG, double *); | |||
| int qneg_tcopy(BLASLONG, BLASLONG, xdouble *, BLASLONG, xdouble *); | |||
| int cneg_tcopy(BLASLONG, BLASLONG, float *, BLASLONG, float *); | |||
| int zneg_tcopy(BLASLONG, BLASLONG, double *, BLASLONG, double *); | |||
| int xneg_tcopy(BLASLONG, BLASLONG, xdouble *, BLASLONG, xdouble *); | |||
| blasint slarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint slarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint dlarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint dlarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint qlarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint qlarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint clarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint clarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG); | |||
| blasint zlarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint zlarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, double *, double *, BLASLONG); | |||
| blasint xlarf_L(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| blasint xlarf_R(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG); | |||
| #endif | |||
| @@ -0,0 +1,212 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef ASSEMBLER | |||
| #ifdef __CUDACC__ | |||
| extern "C" { | |||
| #endif | |||
| float sdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| double dsdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| double ddot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| float _Complex cdotc_k (BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| float _Complex cdotu_k (BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| double _Complex zdotc_k (BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| double _Complex zdotu_k (BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| xdouble _Complex xdotc_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| xdouble _Complex xdotu_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int saxpy_k (BLASLONG, BLASLONG, BLASLONG, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int daxpy_k (BLASLONG, BLASLONG, BLASLONG, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int qaxpy_k (BLASLONG, BLASLONG, BLASLONG, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int caxpy_k (BLASLONG, BLASLONG, BLASLONG, float, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zaxpy_k (BLASLONG, BLASLONG, BLASLONG, double, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int xaxpy_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int caxpyc_k (BLASLONG, BLASLONG, BLASLONG, float, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zaxpyc_k (BLASLONG, BLASLONG, BLASLONG, double, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int xaxpyc_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int scopy_k(BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int dcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int qcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int ccopy_k(BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int xcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int sswap_k (BLASLONG, BLASLONG, BLASLONG, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int dswap_k (BLASLONG, BLASLONG, BLASLONG, double, | |||
| double *, BLASLONG, double *, BLASLONG, double*, BLASLONG); | |||
| int qswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG); | |||
| int cswap_k (BLASLONG, BLASLONG, BLASLONG, float, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zswap_k (BLASLONG, BLASLONG, BLASLONG, double, double, | |||
| double *, BLASLONG, double *, BLASLONG, double*, BLASLONG); | |||
| int xswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG); | |||
| float sasum_k (BLASLONG, float *, BLASLONG); | |||
| double dasum_k (BLASLONG, double *, BLASLONG); | |||
| xdouble qasum_k (BLASLONG, xdouble *, BLASLONG); | |||
| float casum_k (BLASLONG, float *, BLASLONG); | |||
| double zasum_k (BLASLONG, double *, BLASLONG); | |||
| xdouble xasum_k (BLASLONG, xdouble *, BLASLONG); | |||
| float samax_k (BLASLONG, float *, BLASLONG); | |||
| double damax_k (BLASLONG, double *, BLASLONG); | |||
| xdouble qamax_k (BLASLONG, xdouble *, BLASLONG); | |||
| float camax_k (BLASLONG, float *, BLASLONG); | |||
| double zamax_k (BLASLONG, double *, BLASLONG); | |||
| xdouble xamax_k (BLASLONG, xdouble *, BLASLONG); | |||
| float samin_k (BLASLONG, float *, BLASLONG); | |||
| double damin_k (BLASLONG, double *, BLASLONG); | |||
| xdouble qamin_k (BLASLONG, xdouble *, BLASLONG); | |||
| float camin_k (BLASLONG, float *, BLASLONG); | |||
| double zamin_k (BLASLONG, double *, BLASLONG); | |||
| xdouble xamin_k (BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG isamax_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG idamax_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG iqamax_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG icamax_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG izamax_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG ixamax_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG isamin_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG idamin_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG iqamin_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG icamin_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG izamin_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG ixamin_k(BLASLONG, xdouble *, BLASLONG); | |||
| float smax_k (BLASLONG, float *, BLASLONG); | |||
| double dmax_k (BLASLONG, double *, BLASLONG); | |||
| xdouble qmax_k (BLASLONG, xdouble *, BLASLONG); | |||
| float cmax_k (BLASLONG, float *, BLASLONG); | |||
| double zmax_k (BLASLONG, double *, BLASLONG); | |||
| xdouble xmax_k (BLASLONG, xdouble *, BLASLONG); | |||
| float smin_k (BLASLONG, float *, BLASLONG); | |||
| double dmin_k (BLASLONG, double *, BLASLONG); | |||
| xdouble qmin_k (BLASLONG, xdouble *, BLASLONG); | |||
| float cmin_k (BLASLONG, float *, BLASLONG); | |||
| double zmin_k (BLASLONG, double *, BLASLONG); | |||
| xdouble xmin_k (BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG ismax_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG idmax_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG iqmax_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG icmax_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG izmax_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG ixmax_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG ismin_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG idmin_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG iqmin_k(BLASLONG, xdouble *, BLASLONG); | |||
| BLASLONG icmin_k(BLASLONG, float *, BLASLONG); | |||
| BLASLONG izmin_k(BLASLONG, double *, BLASLONG); | |||
| BLASLONG ixmin_k(BLASLONG, xdouble *, BLASLONG); | |||
| int sscal_k(BLASLONG, BLASLONG, BLASLONG, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int dscal_k(BLASLONG, BLASLONG, BLASLONG, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int qscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int cscal_k(BLASLONG, BLASLONG, BLASLONG, float, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zscal_k(BLASLONG, BLASLONG, BLASLONG, double, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int xscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| int csscal_k(BLASLONG, BLASLONG, BLASLONG, float, float, | |||
| float *, BLASLONG, float *, BLASLONG, float *, BLASLONG); | |||
| int zdscal_k(BLASLONG, BLASLONG, BLASLONG, double, double, | |||
| double *, BLASLONG, double *, BLASLONG, double *, BLASLONG); | |||
| int xqscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, | |||
| xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG); | |||
| float snrm2_k(BLASLONG, float *, BLASLONG); | |||
| double dnrm2_k(BLASLONG, double *, BLASLONG); | |||
| xdouble qnrm2_k(BLASLONG, xdouble *, BLASLONG); | |||
| float cnrm2_k(BLASLONG, float *, BLASLONG); | |||
| double znrm2_k(BLASLONG, double *, BLASLONG); | |||
| xdouble xnrm2_k(BLASLONG, xdouble *, BLASLONG); | |||
| int srot_k (BLASLONG, float *, BLASLONG, float *, BLASLONG, float , float ); | |||
| int drot_k (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double); | |||
| int qrot_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble); | |||
| int csrot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG, float , float ); | |||
| int zdrot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double); | |||
| int xqrot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble); | |||
| int srotg_k(float *, float *, float *, float *); | |||
| int drotg_k(double *, double *, double *, double *); | |||
| int qrotg_k(xdouble *, xdouble *, xdouble *, xdouble *); | |||
| int csrotg_k(float *, float *, float *, float *); | |||
| int zdrotg_k(double *, double *, double *, double *); | |||
| int xqrotg_k(xdouble *, xdouble *, xdouble *, xdouble *); | |||
| int srotmg_k(float *, float *, float *, float *, float *); | |||
| int drotmg_k(double *, double *, double *, double *, double *); | |||
| int qrotmg_k(xdouble *, xdouble *, xdouble *, xdouble *, xdouble *); | |||
| int srotm_k (BLASLONG, float, BLASLONG, float, BLASLONG, float); | |||
| int drotm_k (BLASLONG, double, BLASLONG, double, BLASLONG, double); | |||
| int qrotm_k (BLASLONG, xdouble, BLASLONG, xdouble, BLASLONG, xdouble); | |||
| #ifdef __CUDACC__ | |||
| } | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,83 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_LINUX_H | |||
| #define COMMON_LINUX_H | |||
| #ifndef ASSEMBLER | |||
| #include <syscall.h> | |||
| extern long int syscall (long int __sysno, ...); | |||
| #ifndef MPOL_PREFERRED | |||
| #define MPOL_PREFERRED 1 | |||
| #endif | |||
| #ifndef MPOL_INTERLEAVE | |||
| #define MPOL_INTERLEAVE 3 | |||
| #endif | |||
| #if defined(ARCH_IA64) && defined(__ECC) | |||
| #ifndef __NR_mbind | |||
| #define __NR_mbind 1259 | |||
| #endif | |||
| #ifndef __NR_get_mempolicy | |||
| #define __NR_get_mempolicy 1260 | |||
| #endif | |||
| #ifndef __NR_set_mempolicy | |||
| #define __NR_set_mempolicy 1261 | |||
| #endif | |||
| #endif | |||
| static inline int my_mbind(void *addr, unsigned long len, int mode, | |||
| unsigned long *nodemask, unsigned long maxnode, | |||
| unsigned flags) { | |||
| return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); | |||
| } | |||
| static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned long flag) { | |||
| return syscall(SYS_set_mempolicy, mode, addr, flag); | |||
| } | |||
| static inline int my_gettid(void) { return syscall(SYS_gettid); } | |||
| #endif | |||
| #endif | |||
| @@ -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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_MIPS64 | |||
| #define COMMON_MIPS64 | |||
| #define MB | |||
| #define WMB | |||
| #define INLINE inline | |||
| #ifndef ASSEMBLER | |||
| static void INLINE blas_lock(volatile unsigned long *address){ | |||
| long int ret, val = 1; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| __asm__ __volatile__( | |||
| "1: ll %0, %3\n" | |||
| " ori %2, %0, 1\n" | |||
| " sc %2, %1\n" | |||
| " beqz %2, 1b\n" | |||
| " andi %2, %0, 1\n" | |||
| " sync\n" | |||
| : "=&r" (val), "=m" (address), "=&r" (ret) | |||
| : "m" (address) | |||
| : "memory"); | |||
| } while (ret); | |||
| } | |||
| static inline unsigned int rpcc(void){ | |||
| unsigned long ret; | |||
| __asm__ __volatile__(".set push \n" | |||
| ".set mips32r2\n" | |||
| "rdhwr %0, $30 \n" | |||
| ".set pop" : "=r"(ret) : : "memory"); | |||
| return ret; | |||
| } | |||
| static inline int blas_quickdivide(blasint x, blasint y){ | |||
| return x / y; | |||
| } | |||
| #ifdef DOUBLE | |||
| #define GET_IMAGE(res) __asm__ __volatile__("mov.d %0, $f2" : "=f"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) __asm__ __volatile__("mov.s %0, $f2" : "=f"(res) : : "memory") | |||
| #endif | |||
| #define GET_IMAGE_CANCEL | |||
| #endif | |||
| #ifdef ASSEMBLER | |||
| #define HALT teq $0, $0 | |||
| #define NOP move $0, $0 | |||
| #ifdef DOUBLE | |||
| #define LD ldc1 | |||
| #define ST sdc1 | |||
| #define MADD madd.d | |||
| #define NMADD nmadd.d | |||
| #define MSUB msub.d | |||
| #define NMSUB nmsub.d | |||
| #define ADD add.d | |||
| #define SUB sub.d | |||
| #define MUL mul.d | |||
| #define MOV mov.d | |||
| #define CMOVF movf.d | |||
| #define CMOVT movt.d | |||
| #define MTC dmtc1 | |||
| #define FABS abs.d | |||
| #define CMPEQ c.eq.d | |||
| #define CMPLE c.le.d | |||
| #define CMPLT c.lt.d | |||
| #else | |||
| #define LD lwc1 | |||
| #define ST swc1 | |||
| #define MADD madd.s | |||
| #define NMADD nmadd.s | |||
| #define MSUB msub.s | |||
| #define NMSUB nmsub.s | |||
| #define ADD add.s | |||
| #define SUB sub.s | |||
| #define MUL mul.s | |||
| #define MOV mov.s | |||
| #define CMOVF movf.s | |||
| #define CMOVT movt.s | |||
| #define MTC mtc1 | |||
| #define FABS abs.s | |||
| #define CMPEQ c.eq.s | |||
| #define CMPLE c.le.s | |||
| #define CMPLT c.lt.s | |||
| #endif | |||
| #if defined(__64BIT__) && defined(USE64BITINT) | |||
| #define LDINT ld | |||
| #define LDARG ld | |||
| #define SDARG sd | |||
| #elif defined(__64BIT__) && !defined(USE64BITINT) | |||
| #define LDINT lw | |||
| #define LDARG ld | |||
| #define SDARG sd | |||
| #else | |||
| #define LDINT lw | |||
| #define LDARG lw | |||
| #define SDARG sw | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #if defined(ASSEMBLER) && !defined(NEEDPARAM) | |||
| #define PROLOGUE \ | |||
| .text ;\ | |||
| .set mips64 ;\ | |||
| .align 5 ;\ | |||
| .globl REALNAME ;\ | |||
| .ent REALNAME ;\ | |||
| .type REALNAME, @function ;\ | |||
| REALNAME: ;\ | |||
| .set noreorder ;\ | |||
| .set nomacro | |||
| #define EPILOGUE \ | |||
| .set macro ;\ | |||
| .set reorder ;\ | |||
| .end REALNAME | |||
| #define PROFCODE | |||
| #endif | |||
| #endif | |||
| #define SEEK_ADDRESS | |||
| #define BUFFER_SIZE ( 8 << 20) | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE (64UL << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE ( 2 << 20) | |||
| #define BASE_ADDRESS (START_ADDRESS - BUFFER_SIZE * MAX_CPU_NUMBER) | |||
| #ifndef MAP_ANONYMOUS | |||
| #define MAP_ANONYMOUS MAP_ANON | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,795 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_POWER | |||
| #define COMMON_POWER | |||
| #define MB __asm__ __volatile__ ("sync") | |||
| #define WMB __asm__ __volatile__ ("sync") | |||
| #define INLINE inline | |||
| #ifdef PPC440 | |||
| #define STDERR stdout | |||
| #define QNONCACHE 0x1 | |||
| #define QCOMMS 0x2 | |||
| #define QFAST 0x4 | |||
| #endif | |||
| #ifndef ASSEMBLER | |||
| void *qalloc(int flags, size_t bytes); | |||
| static void INLINE blas_lock(volatile unsigned long *address){ | |||
| long int ret, val = 1; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| #if defined(OS_LINUX) || defined(OS_DARWIN) | |||
| __asm__ __volatile__ ( | |||
| "0: lwarx %0, 0, %1\n" | |||
| " cmpwi %0, 0\n" | |||
| " bne- 1f\n" | |||
| " stwcx. %2,0, %1\n" | |||
| " bne- 0b\n" | |||
| "1: " | |||
| : "=&r"(ret) | |||
| : "r"(address), "r" (val) | |||
| : "cr0", "memory"); | |||
| #else | |||
| __asm__ __volatile__ ( | |||
| ".machine \"any\"\n" | |||
| " lwarx %0, 0, %1\n" | |||
| " cmpwi %0, 0\n" | |||
| " bne- $+12\n" | |||
| " stwcx. %2,0, %1\n" | |||
| " bne- $-16\n" | |||
| : "=&r"(ret) | |||
| : "r"(address), "r" (val) | |||
| : "cr0", "memory"); | |||
| #endif | |||
| } while (ret); | |||
| } | |||
| static inline unsigned long rpcc(void){ | |||
| unsigned long ret; | |||
| #ifdef OS_AIX | |||
| __asm__ __volatile__(".machine \"any\" ;"); | |||
| #endif | |||
| __asm__ __volatile__ ("mftb %0" : "=r" (ret) : ); | |||
| #if defined(POWER5) || defined(PPC970) | |||
| return (ret << 6); | |||
| #else | |||
| return (ret << 3); | |||
| #endif | |||
| } | |||
| #ifdef __64BIT__ | |||
| #define RPCC64BIT | |||
| #endif | |||
| static inline unsigned long getstackaddr(void){ | |||
| unsigned long addr; | |||
| __asm__ __volatile__ ("mr %0, 1" | |||
| : "=r"(addr) : : "memory"); | |||
| return addr; | |||
| }; | |||
| #if defined(OS_LINUX) || defined(OS_AIX) | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fmr %0, 2" : "=f"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fmr %0, f2" : "=f"(res) : : "memory") | |||
| #define GET_IMAGE_CANCEL | |||
| #endif | |||
| #ifdef SMP | |||
| static inline int blas_quickdivide(blasint x, blasint y){ | |||
| return x / y; | |||
| } | |||
| #endif | |||
| #endif | |||
| #ifdef ASSEMBLER | |||
| #ifdef DOUBLE | |||
| #define LFD lfd | |||
| #define LFDX lfdx | |||
| #define LFPDX lfpdx | |||
| #define LFSDX lfsdx | |||
| #define LFXDX lfxdx | |||
| #define LFDU lfdu | |||
| #define LFDUX lfdux | |||
| #define LFPDUX lfpdux | |||
| #define LFSDUX lfsdux | |||
| #define LFXDUX lfxdux | |||
| #define STFD stfd | |||
| #define STFDX stfdx | |||
| #define STFPDX stfpdx | |||
| #define STFSDX stfsdx | |||
| #define STFXDX stfxdx | |||
| #define STFDU stfdu | |||
| #define STFDUX stfdux | |||
| #define STFPDUX stfpdux | |||
| #define STFSDUX stfsdux | |||
| #define STFXDUX stfxdux | |||
| #define FMADD fmadd | |||
| #define FMSUB fmsub | |||
| #define FNMADD fnmadd | |||
| #define FNMSUB fnmsub | |||
| #define FMUL fmul | |||
| #define FADD fadd | |||
| #define FSUB fsub | |||
| #else | |||
| #define LFD lfs | |||
| #define LFDX lfsx | |||
| #define LFPDX lfpsx | |||
| #define LFSDX lfssx | |||
| #define LFXDX lfxsx | |||
| #define LFDU lfsu | |||
| #define LFDUX lfsux | |||
| #define LFPDUX lfpsux | |||
| #define LFSDUX lfssux | |||
| #define LFXDUX lfxsux | |||
| #define STFD stfs | |||
| #define STFDX stfsx | |||
| #define STFPDX stfpsx | |||
| #define STFSDX stfssx | |||
| #define STFXDX stfxsx | |||
| #define STFDU stfsu | |||
| #define STFDUX stfsux | |||
| #define STFPDUX stfpsux | |||
| #define STFSDUX stfssux | |||
| #define STFXDUX stfxsux | |||
| #define FMADD fmadds | |||
| #define FMSUB fmsubs | |||
| #define FNMADD fnmadds | |||
| #define FNMSUB fnmsubs | |||
| #define FMUL fmuls | |||
| #define FADD fadds | |||
| #define FSUB fsubs | |||
| #endif | |||
| #ifdef __64BIT__ | |||
| #define LDLONG ld | |||
| #else | |||
| #define LDLONG lwz | |||
| #endif | |||
| #ifdef OS_DARWIN | |||
| #define LL(x) L##x | |||
| #endif | |||
| #ifdef OS_LINUX | |||
| #define LL(x) .L##x | |||
| #endif | |||
| #ifndef LL | |||
| #define LL(x) __L##x | |||
| #endif | |||
| #if defined(__64BIT__) && defined(USE64BITINT) | |||
| #define LDINT ld | |||
| #elif defined(__64BIT__) && !defined(USE64BITINT) | |||
| #define LDINT lwa | |||
| #else | |||
| #define LDINT lwz | |||
| #endif | |||
| /* | |||
| #define DCBT(REGA, REGB, NUM) .long (0x7c00022c | (REGA << 16) | (REGB << 11) | ((NUM) << 21)) | |||
| #define DCBTST(REGA, REGB, NUM) .long (0x7c0001ec | (REGA << 16) | (REGB << 11) | ((NUM) << 21)) | |||
| */ | |||
| #define DSTATTR_H(SIZE, COUNT, STRIDE) ((SIZE << 8) | (COUNT)) | |||
| #define DSTATTR_L(SIZE, COUNT, STRIDE) (STRIDE) | |||
| #if defined(PPC970) || defined(POWER3) || defined(POWER4) || defined(POWER5) || defined(PPCG4) | |||
| #define HAVE_PREFETCH | |||
| #endif | |||
| #if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) | |||
| #define DCBT_ARG 0 | |||
| #else | |||
| #define DCBT_ARG 8 | |||
| #endif | |||
| #ifdef CELL | |||
| #define L1_DUALFETCH | |||
| #define L1_PREFETCHSIZE (64 + 128 * 13) | |||
| #endif | |||
| #if defined(POWER3) || defined(POWER4) || defined(POWER5) | |||
| #define L1_DUALFETCH | |||
| #define L1_PREFETCHSIZE (96 + 128 * 12) | |||
| #endif | |||
| #if defined(POWER6) | |||
| #define L1_DUALFETCH | |||
| #define L1_PREFETCHSIZE (16 + 128 * 100) | |||
| #define L1_PREFETCH dcbtst | |||
| #endif | |||
| #ifndef L1_PREFETCH | |||
| #define L1_PREFETCH dcbt | |||
| #endif | |||
| #ifndef L1_PREFETCHW | |||
| #define L1_PREFETCHW dcbtst | |||
| #endif | |||
| #if DCBT_ARG == 0 | |||
| #define DCBT(REGA, REGB) L1_PREFETCH REGB, REGA | |||
| #define DCBTST(REGA, REGB) L1_PREFETCHW REGB, REGA | |||
| #else | |||
| #define DCBT(REGA, REGB) L1_PREFETCH DCBT_ARG, REGB, REGA | |||
| #define DCBTST(REGA, REGB) L1_PREFETCHW DCBT_ARG, REGB, REGA | |||
| #endif | |||
| #ifndef L1_PREFETCHSIZE | |||
| #define L1_PREFETCHSIZE (96 + 128 * 12) | |||
| #endif | |||
| #if !defined(OS_DARWIN) || defined(NEEDPARAM) | |||
| #define f0 0 | |||
| #define f1 1 | |||
| #define f2 2 | |||
| #define f3 3 | |||
| #define f4 4 | |||
| #define f5 5 | |||
| #define f6 6 | |||
| #define f7 7 | |||
| #define f8 8 | |||
| #define f9 9 | |||
| #define f10 10 | |||
| #define f11 11 | |||
| #define f12 12 | |||
| #define f13 13 | |||
| #define f14 14 | |||
| #define f15 15 | |||
| #define f16 16 | |||
| #define f17 17 | |||
| #define f18 18 | |||
| #define f19 19 | |||
| #define f20 20 | |||
| #define f21 21 | |||
| #define f22 22 | |||
| #define f23 23 | |||
| #define f24 24 | |||
| #define f25 25 | |||
| #define f26 26 | |||
| #define f27 27 | |||
| #define f28 28 | |||
| #define f29 29 | |||
| #define f30 30 | |||
| #define f31 31 | |||
| #define r0 0 | |||
| #define r1 1 | |||
| #define r2 2 | |||
| #define r3 3 | |||
| #define r4 4 | |||
| #define r5 5 | |||
| #define r6 6 | |||
| #define r7 7 | |||
| #define r8 8 | |||
| #define r9 9 | |||
| #define r10 10 | |||
| #define r11 11 | |||
| #define r12 12 | |||
| #define r13 13 | |||
| #define r14 14 | |||
| #define r15 15 | |||
| #define r16 16 | |||
| #define r17 17 | |||
| #define r18 18 | |||
| #define r19 19 | |||
| #define r20 20 | |||
| #define r21 21 | |||
| #define r22 22 | |||
| #define r23 23 | |||
| #define r24 24 | |||
| #define r25 25 | |||
| #define r26 26 | |||
| #define r27 27 | |||
| #define r28 28 | |||
| #define r29 29 | |||
| #define r30 30 | |||
| #define r31 31 | |||
| #define v0 0 | |||
| #define v1 1 | |||
| #define v2 2 | |||
| #define v3 3 | |||
| #define v4 4 | |||
| #define v5 5 | |||
| #define v6 6 | |||
| #define v7 7 | |||
| #define v8 8 | |||
| #define v9 9 | |||
| #define v10 10 | |||
| #define v11 11 | |||
| #define v12 12 | |||
| #define v13 13 | |||
| #define v14 14 | |||
| #define v15 15 | |||
| #define v16 16 | |||
| #define v17 17 | |||
| #define v18 18 | |||
| #define v19 19 | |||
| #define v20 20 | |||
| #define v21 21 | |||
| #define v22 22 | |||
| #define v23 23 | |||
| #define v24 24 | |||
| #define v25 25 | |||
| #define v26 26 | |||
| #define v27 27 | |||
| #define v28 28 | |||
| #define v29 29 | |||
| #define v30 30 | |||
| #define v31 31 | |||
| #define BO_dCTR_NZERO_AND_NOT 0 | |||
| #define BO_dCTR_NZERO_AND_NOT_1 1 | |||
| #define BO_dCTR_ZERO_AND_NOT 2 | |||
| #define BO_dCTR_ZERO_AND_NOT_1 3 | |||
| #define BO_IF_NOT 4 | |||
| #define BO_IF_NOT_1 5 | |||
| #define BO_IF_NOT_2 6 | |||
| #define BO_IF_NOT_3 7 | |||
| #define BO_dCTR_NZERO_AND 8 | |||
| #define BO_dCTR_NZERO_AND_1 9 | |||
| #define BO_dCTR_ZERO_AND 10 | |||
| #define BO_dCTR_ZERO_AND_1 11 | |||
| #define BO_IF 12 | |||
| #define BO_IF_1 13 | |||
| #define BO_IF_2 14 | |||
| #define BO_IF_3 15 | |||
| #define BO_dCTR_NZERO 16 | |||
| #define BO_dCTR_NZERO_1 17 | |||
| #define BO_dCTR_ZERO 18 | |||
| #define BO_dCTR_ZERO_1 19 | |||
| #define BO_ALWAYS 20 | |||
| #define BO_ALWAYS_1 21 | |||
| #define BO_ALWAYS_2 22 | |||
| #define BO_ALWAYS_3 23 | |||
| #define BO_dCTR_NZERO_8 24 | |||
| #define BO_dCTR_NZERO_9 25 | |||
| #define BO_dCTR_ZERO_8 26 | |||
| #define BO_dCTR_ZERO_9 27 | |||
| #define BO_ALWAYS_8 28 | |||
| #define BO_ALWAYS_9 29 | |||
| #define BO_ALWAYS_10 30 | |||
| #define BO_ALWAYS_11 31 | |||
| #define CR0_LT 0 | |||
| #define CR0_GT 1 | |||
| #define CR0_EQ 2 | |||
| #define CR0_SO 3 | |||
| #define CR1_FX 4 | |||
| #define CR1_FEX 5 | |||
| #define CR1_VX 6 | |||
| #define CR1_OX 7 | |||
| #define CR2_LT 8 | |||
| #define CR2_GT 9 | |||
| #define CR2_EQ 10 | |||
| #define CR2_SO 11 | |||
| #define CR3_LT 12 | |||
| #define CR3_GT 13 | |||
| #define CR3_EQ 14 | |||
| #define CR3_SO 15 | |||
| #define CR4_LT 16 | |||
| #define CR4_GT 17 | |||
| #define CR4_EQ 18 | |||
| #define CR4_SO 19 | |||
| #define CR5_LT 20 | |||
| #define CR5_GT 21 | |||
| #define CR5_EQ 22 | |||
| #define CR5_SO 23 | |||
| #define CR6_LT 24 | |||
| #define CR6_GT 25 | |||
| #define CR6_EQ 26 | |||
| #define CR6_SO 27 | |||
| #define CR7_LT 28 | |||
| #define CR7_GT 29 | |||
| #define CR7_EQ 30 | |||
| #define CR7_SO 31 | |||
| #define TO_LT 16 | |||
| #define TO_GT 8 | |||
| #define TO_EQ 4 | |||
| #define TO_LLT 2 | |||
| #define TO_LGT 1 | |||
| #define CR0 0 | |||
| #define CR1 1 | |||
| #define CR2 2 | |||
| #define CR3 3 | |||
| #define CR4 4 | |||
| #define CR5 5 | |||
| #define CR6 6 | |||
| #define CR7 7 | |||
| #define cr0 0 | |||
| #define cr1 1 | |||
| #define cr2 2 | |||
| #define cr3 3 | |||
| #define cr4 4 | |||
| #define cr5 5 | |||
| #define cr6 6 | |||
| #define cr7 7 | |||
| #define VRsave 256 | |||
| #endif | |||
| #define CTR 9 | |||
| #define SP r1 | |||
| #ifdef __64BIT__ | |||
| #define slwi sldi | |||
| #define cmpwi cmpdi | |||
| #define srawi sradi | |||
| #define mullw mulld | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #if defined(ASSEMBLER) && !defined(NEEDPARAM) | |||
| #ifdef OS_LINUX | |||
| #ifndef __64BIT__ | |||
| #define PROLOGUE \ | |||
| .section .text;\ | |||
| .align 6;\ | |||
| .globl REALNAME;\ | |||
| .type REALNAME, @function;\ | |||
| REALNAME: | |||
| #define EPILOGUE .size REALNAME, .-REALNAME | |||
| #else | |||
| #define PROLOGUE \ | |||
| .section .text;\ | |||
| .align 5;\ | |||
| .globl REALNAME;\ | |||
| .section ".opd","aw";\ | |||
| .align 3;\ | |||
| REALNAME:;\ | |||
| .quad .REALNAME, .TOC.@tocbase, 0;\ | |||
| .previous;\ | |||
| .size REALNAME, 24;\ | |||
| .type .REALNAME, @function;\ | |||
| .globl .REALNAME;\ | |||
| .REALNAME: | |||
| #define EPILOGUE \ | |||
| .long 0 ; \ | |||
| .byte 0,0,0,1,128,0,0,0 ; \ | |||
| .size .REALNAME, .-.REALNAME; \ | |||
| .section .note.GNU-stack,"",@progbits | |||
| #endif | |||
| #ifdef PROFILE | |||
| #ifndef __64BIT__ | |||
| #define PROFCODE ;\ | |||
| .section ".data";\ | |||
| .align 2;\ | |||
| .LP3:;\ | |||
| .long 0;\ | |||
| .section ".text";\ | |||
| mflr r0;\ | |||
| stw r0, 4(SP);\ | |||
| lis r12, .LP3@ha;\ | |||
| la r0, .LP3@l(r12);\ | |||
| bl _mcount;\ | |||
| lwz r0, 4(SP);\ | |||
| mtlr r0 | |||
| #else | |||
| #define PROFCODE \ | |||
| .globl _mcount; \ | |||
| mflr r0; \ | |||
| std r0, 16(SP); \ | |||
| mr r11, SP; \ | |||
| addi SP, SP, -256; \ | |||
| std r11, 0(SP); \ | |||
| std r3, 128(SP); \ | |||
| std r4, 136(SP); \ | |||
| std r5, 144(SP); \ | |||
| std r6, 152(SP); \ | |||
| std r7, 160(SP); \ | |||
| std r8, 168(SP); \ | |||
| std r9, 176(SP); \ | |||
| std r10, 184(SP); \ | |||
| stfd f3, 192(SP); \ | |||
| stfd f4, 200(SP); \ | |||
| bl ._mcount; \ | |||
| nop; \ | |||
| ld r3, 128(SP);\ | |||
| ld r4, 136(SP);\ | |||
| ld r5, 144(SP);\ | |||
| ld r6, 152(SP);\ | |||
| ld r7, 160(SP);\ | |||
| ld r8, 168(SP);\ | |||
| ld r9, 176(SP);\ | |||
| ld r10, 184(SP);\ | |||
| lfd f3, 192(SP);\ | |||
| lfd f4, 200(SP);\ | |||
| addi SP, SP, 256;\ | |||
| ld r0, 16(SP);\ | |||
| mtlr r0 | |||
| #endif | |||
| #else | |||
| #define PROFCODE | |||
| #endif | |||
| #endif | |||
| #if OS_AIX | |||
| #ifndef __64BIT__ | |||
| #define PROLOGUE \ | |||
| .machine "any";\ | |||
| .globl .REALNAME;\ | |||
| .csect .text[PR],5;\ | |||
| .REALNAME:; | |||
| #define EPILOGUE \ | |||
| _section_.text:;\ | |||
| .csect .data[RW],4;\ | |||
| .long _section_.text; | |||
| #else | |||
| #define PROLOGUE \ | |||
| .machine "any";\ | |||
| .globl .REALNAME;\ | |||
| .csect .text[PR], 5;\ | |||
| .REALNAME:; | |||
| #define EPILOGUE \ | |||
| _section_.text:;\ | |||
| .csect .data[RW],4;\ | |||
| .llong _section_.text; | |||
| #endif | |||
| #define PROFCODE | |||
| #endif | |||
| #ifdef OS_DARWIN | |||
| #ifndef __64BIT__ | |||
| .macro PROLOGUE | |||
| .section __TEXT,__text,regular,pure_instructions | |||
| .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 | |||
| .machine ppc | |||
| .text | |||
| .align 4 | |||
| .globl REALNAME | |||
| REALNAME: | |||
| .endmacro | |||
| #else | |||
| .macro PROLOGUE | |||
| .section __TEXT,__text,regular,pure_instructions | |||
| .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 | |||
| .machine ppc64 | |||
| .text | |||
| .align 4 | |||
| .globl REALNAME | |||
| REALNAME: | |||
| .endmacro | |||
| #endif | |||
| #ifndef PROFILE | |||
| #define PROFCODE | |||
| #define EPILOGUE .subsections_via_symbols | |||
| #else | |||
| #ifndef __64BIT__ | |||
| .macro PROFCODE | |||
| mflr r0 | |||
| stw r0, 8(SP) | |||
| addi SP, SP, -64 | |||
| stw SP, 0(SP) | |||
| stw r3, 12(SP) | |||
| stw r4, 16(SP) | |||
| stw r5, 20(SP) | |||
| stw r6, 24(SP) | |||
| stw r7, 28(SP) | |||
| stw r8, 32(SP) | |||
| stw r9, 36(SP) | |||
| stw r10, 40(SP) | |||
| stfd f1, 48(SP) | |||
| stfd f2, 56(SP) | |||
| mr r3, r0 | |||
| bl Lmcount$stub | |||
| nop | |||
| lwz r3, 12(SP) | |||
| lwz r4, 16(SP) | |||
| lwz r5, 20(SP) | |||
| lwz r6, 24(SP) | |||
| lwz r7, 28(SP) | |||
| lwz r8, 32(SP) | |||
| lwz r9, 36(SP) | |||
| lwz r10, 40(SP) | |||
| lfd f1, 48(SP) | |||
| lfd f2, 56(SP) | |||
| addi SP, SP, 64 | |||
| lwz r0, 8(SP) | |||
| mtlr r0 | |||
| .endmacro | |||
| .macro EPILOGUE | |||
| .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 | |||
| .align 5 | |||
| Lmcount$stub: | |||
| .indirect_symbol mcount | |||
| mflr r0 | |||
| bcl 20,31,L00000000001$spb | |||
| L00000000001$spb: | |||
| mflr r11 | |||
| addis r11,r11,ha16(Lmcount$lazy_ptr-L00000000001$spb) | |||
| mtlr r0 | |||
| lwzu r12,lo16(Lmcount$lazy_ptr-L00000000001$spb)(r11) | |||
| mtctr r12 | |||
| bctr | |||
| .lazy_symbol_pointer | |||
| Lmcount$lazy_ptr: | |||
| .indirect_symbol mcount | |||
| .long dyld_stub_binding_helper | |||
| .subsections_via_symbols | |||
| .endmacro | |||
| #else | |||
| .macro PROFCODE | |||
| mflr r0 | |||
| std r0, 16(SP) | |||
| addi SP, SP, -128 | |||
| std SP, 0(SP) | |||
| std r3, 24(SP) | |||
| std r4, 32(SP) | |||
| std r5, 40(SP) | |||
| std r6, 48(SP) | |||
| std r7, 56(SP) | |||
| std r8, 64(SP) | |||
| std r9, 72(SP) | |||
| std r10, 80(SP) | |||
| stfd f1, 88(SP) | |||
| stfd f2, 96(SP) | |||
| mr r3, r0 | |||
| bl Lmcount$stub | |||
| nop | |||
| ld r3, 24(SP) | |||
| ld r4, 32(SP) | |||
| ld r5, 40(SP) | |||
| ld r6, 48(SP) | |||
| ld r7, 56(SP) | |||
| ld r8, 64(SP) | |||
| ld r9, 72(SP) | |||
| ld r10, 80(SP) | |||
| lfd f1, 88(SP) | |||
| lfd f2, 86(SP) | |||
| addi SP, SP, 128 | |||
| ld r0, 16(SP) | |||
| mtlr r0 | |||
| .endmacro | |||
| .macro EPILOGUE | |||
| .data | |||
| .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 | |||
| .align 5 | |||
| Lmcount$stub: | |||
| .indirect_symbol mcount | |||
| mflr r0 | |||
| bcl 20,31,L00000000001$spb | |||
| L00000000001$spb: | |||
| mflr r11 | |||
| addis r11,r11,ha16(Lmcount$lazy_ptr-L00000000001$spb) | |||
| mtlr r0 | |||
| ld r12,lo16(Lmcount$lazy_ptr-L00000000001$spb)(r11) | |||
| mtctr r12 | |||
| bctr | |||
| .lazy_symbol_pointer | |||
| Lmcount$lazy_ptr: | |||
| .indirect_symbol mcount | |||
| .quad dyld_stub_binding_helper | |||
| .subsections_via_symbols | |||
| .endmacro | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #define HALT mfspr r0, 1023 | |||
| #ifdef OS_LINUX | |||
| #if defined(PPC440) || defined(PPC440FP2) | |||
| #undef MAX_CPU_NUMBER | |||
| #define MAX_CPU_NUMBER 1 | |||
| #endif | |||
| #if !defined(__64BIT__) && !defined(PROFILE) && !defined(PPC440) && !defined(PPC440FP2) | |||
| #define START_ADDRESS (0x0b000000UL) | |||
| #else | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #endif | |||
| #ifdef OS_AIX | |||
| #ifndef __64BIT__ | |||
| #define START_ADDRESS (0xf0000000UL) | |||
| #else | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #endif | |||
| #ifdef OS_DARWIN | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #if defined(PPC440) | |||
| #define BUFFER_SIZE ( 2 << 20) | |||
| #elif defined(PPC440FP2) | |||
| #define BUFFER_SIZE ( 16 << 20) | |||
| #else | |||
| #define BUFFER_SIZE ( 16 << 20) | |||
| #endif | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE ( 4 << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE (16 << 20) | |||
| #define BASE_ADDRESS (START_ADDRESS - BUFFER_SIZE * MAX_CPU_NUMBER) | |||
| #ifndef MAP_ANONYMOUS | |||
| #define MAP_ANONYMOUS MAP_ANON | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,431 @@ | |||
| #ifndef COMMON_Q_H | |||
| #define COMMON_Q_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define QAMAX_K qamax_k | |||
| #define QAMIN_K qamin_k | |||
| #define QMAX_K qmax_k | |||
| #define QMIN_K qmin_k | |||
| #define IQAMAX_K iqamax_k | |||
| #define IQAMIN_K iqamin_k | |||
| #define IQMAX_K iqmax_k | |||
| #define IQMIN_K iqmin_k | |||
| #define QASUM_K qasum_k | |||
| #define QAXPYU_K qaxpy_k | |||
| #define QAXPYC_K qaxpy_k | |||
| #define QCOPY_K qcopy_k | |||
| #define QDOTU_K qdot_k | |||
| #define QDOTC_K qdot_k | |||
| #define QNRM2_K qnrm2_k | |||
| #define QSCAL_K qscal_k | |||
| #define QSWAP_K qswap_k | |||
| #define QROT_K qrot_k | |||
| #define QGEMV_N qgemv_n | |||
| #define QGEMV_T qgemv_t | |||
| #define QGEMV_R qgemv_n | |||
| #define QGEMV_C qgemv_t | |||
| #define QGEMV_O qgemv_n | |||
| #define QGEMV_U qgemv_t | |||
| #define QGEMV_S qgemv_n | |||
| #define QGEMV_D qgemv_t | |||
| #define QGERU_K qger_k | |||
| #define QGERC_K qger_k | |||
| #define QGERV_K qger_k | |||
| #define QGERD_K qger_k | |||
| #define QSYMV_U qsymv_U | |||
| #define QSYMV_L qsymv_L | |||
| #define QSYMV_THREAD_U qsymv_thread_U | |||
| #define QSYMV_THREAD_L qsymv_thread_L | |||
| #define QGEMM_ONCOPY qgemm_oncopy | |||
| #define QGEMM_OTCOPY qgemm_otcopy | |||
| #if QGEMM_DEFAULT_UNROLL_M == QGEMM_DEFAULT_UNROLL_N | |||
| #define QGEMM_INCOPY qgemm_oncopy | |||
| #define QGEMM_ITCOPY qgemm_otcopy | |||
| #else | |||
| #define QGEMM_INCOPY qgemm_incopy | |||
| #define QGEMM_ITCOPY qgemm_itcopy | |||
| #endif | |||
| #define QTRMM_OUNUCOPY qtrmm_ounucopy | |||
| #define QTRMM_OUNNCOPY qtrmm_ounncopy | |||
| #define QTRMM_OUTUCOPY qtrmm_outucopy | |||
| #define QTRMM_OUTNCOPY qtrmm_outncopy | |||
| #define QTRMM_OLNUCOPY qtrmm_olnucopy | |||
| #define QTRMM_OLNNCOPY qtrmm_olnncopy | |||
| #define QTRMM_OLTUCOPY qtrmm_oltucopy | |||
| #define QTRMM_OLTNCOPY qtrmm_oltncopy | |||
| #define QTRSM_OUNUCOPY qtrsm_ounucopy | |||
| #define QTRSM_OUNNCOPY qtrsm_ounncopy | |||
| #define QTRSM_OUTUCOPY qtrsm_outucopy | |||
| #define QTRSM_OUTNCOPY qtrsm_outncopy | |||
| #define QTRSM_OLNUCOPY qtrsm_olnucopy | |||
| #define QTRSM_OLNNCOPY qtrsm_olnncopy | |||
| #define QTRSM_OLTUCOPY qtrsm_oltucopy | |||
| #define QTRSM_OLTNCOPY qtrsm_oltncopy | |||
| #if QGEMM_DEFAULT_UNROLL_M == QGEMM_DEFAULT_UNROLL_N | |||
| #define QTRMM_IUNUCOPY qtrmm_ounucopy | |||
| #define QTRMM_IUNNCOPY qtrmm_ounncopy | |||
| #define QTRMM_IUTUCOPY qtrmm_outucopy | |||
| #define QTRMM_IUTNCOPY qtrmm_outncopy | |||
| #define QTRMM_ILNUCOPY qtrmm_olnucopy | |||
| #define QTRMM_ILNNCOPY qtrmm_olnncopy | |||
| #define QTRMM_ILTUCOPY qtrmm_oltucopy | |||
| #define QTRMM_ILTNCOPY qtrmm_oltncopy | |||
| #define QTRSM_IUNUCOPY qtrsm_ounucopy | |||
| #define QTRSM_IUNNCOPY qtrsm_ounncopy | |||
| #define QTRSM_IUTUCOPY qtrsm_outucopy | |||
| #define QTRSM_IUTNCOPY qtrsm_outncopy | |||
| #define QTRSM_ILNUCOPY qtrsm_olnucopy | |||
| #define QTRSM_ILNNCOPY qtrsm_olnncopy | |||
| #define QTRSM_ILTUCOPY qtrsm_oltucopy | |||
| #define QTRSM_ILTNCOPY qtrsm_oltncopy | |||
| #else | |||
| #define QTRMM_IUNUCOPY qtrmm_iunucopy | |||
| #define QTRMM_IUNNCOPY qtrmm_iunncopy | |||
| #define QTRMM_IUTUCOPY qtrmm_iutucopy | |||
| #define QTRMM_IUTNCOPY qtrmm_iutncopy | |||
| #define QTRMM_ILNUCOPY qtrmm_ilnucopy | |||
| #define QTRMM_ILNNCOPY qtrmm_ilnncopy | |||
| #define QTRMM_ILTUCOPY qtrmm_iltucopy | |||
| #define QTRMM_ILTNCOPY qtrmm_iltncopy | |||
| #define QTRSM_IUNUCOPY qtrsm_iunucopy | |||
| #define QTRSM_IUNNCOPY qtrsm_iunncopy | |||
| #define QTRSM_IUTUCOPY qtrsm_iutucopy | |||
| #define QTRSM_IUTNCOPY qtrsm_iutncopy | |||
| #define QTRSM_ILNUCOPY qtrsm_ilnucopy | |||
| #define QTRSM_ILNNCOPY qtrsm_ilnncopy | |||
| #define QTRSM_ILTUCOPY qtrsm_iltucopy | |||
| #define QTRSM_ILTNCOPY qtrsm_iltncopy | |||
| #endif | |||
| #define QGEMM_BETA qgemm_beta | |||
| #define QGEMM_KERNEL qgemm_kernel | |||
| #define QTRMM_KERNEL_LN qtrmm_kernel_LN | |||
| #define QTRMM_KERNEL_LT qtrmm_kernel_LT | |||
| #define QTRMM_KERNEL_LR qtrmm_kernel_LN | |||
| #define QTRMM_KERNEL_LC qtrmm_kernel_LT | |||
| #define QTRMM_KERNEL_RN qtrmm_kernel_RN | |||
| #define QTRMM_KERNEL_RT qtrmm_kernel_RT | |||
| #define QTRMM_KERNEL_RR qtrmm_kernel_RN | |||
| #define QTRMM_KERNEL_RC qtrmm_kernel_RT | |||
| #define QTRSM_KERNEL_LN qtrsm_kernel_LN | |||
| #define QTRSM_KERNEL_LT qtrsm_kernel_LT | |||
| #define QTRSM_KERNEL_LR qtrsm_kernel_LN | |||
| #define QTRSM_KERNEL_LC qtrsm_kernel_LT | |||
| #define QTRSM_KERNEL_RN qtrsm_kernel_RN | |||
| #define QTRSM_KERNEL_RT qtrsm_kernel_RT | |||
| #define QTRSM_KERNEL_RR qtrsm_kernel_RN | |||
| #define QTRSM_KERNEL_RC qtrsm_kernel_RT | |||
| #define QSYMM_OUTCOPY qsymm_outcopy | |||
| #define QSYMM_OLTCOPY qsymm_oltcopy | |||
| #if QGEMM_DEFAULT_UNROLL_M == QGEMM_DEFAULT_UNROLL_N | |||
| #define QSYMM_IUTCOPY qsymm_outcopy | |||
| #define QSYMM_ILTCOPY qsymm_oltcopy | |||
| #else | |||
| #define QSYMM_IUTCOPY qsymm_iutcopy | |||
| #define QSYMM_ILTCOPY qsymm_iltcopy | |||
| #endif | |||
| #define QNEG_TCOPY qneg_tcopy | |||
| #define QLASWP_NCOPY qlaswp_ncopy | |||
| #else | |||
| #define QAMAX_K gotoblas -> qamax_k | |||
| #define QAMIN_K gotoblas -> qamin_k | |||
| #define QMAX_K gotoblas -> qmax_k | |||
| #define QMIN_K gotoblas -> qmin_k | |||
| #define IQAMAX_K gotoblas -> iqamax_k | |||
| #define IQAMIN_K gotoblas -> iqamin_k | |||
| #define IQMAX_K gotoblas -> iqmax_k | |||
| #define IQMIN_K gotoblas -> iqmin_k | |||
| #define QASUM_K gotoblas -> qasum_k | |||
| #define QAXPYU_K gotoblas -> qaxpy_k | |||
| #define QAXPYC_K gotoblas -> qaxpy_k | |||
| #define QCOPY_K gotoblas -> qcopy_k | |||
| #define QDOTU_K gotoblas -> qdot_k | |||
| #define QDOTC_K gotoblas -> qdot_k | |||
| #define QNRM2_K gotoblas -> qnrm2_k | |||
| #define QSCAL_K gotoblas -> qscal_k | |||
| #define QSWAP_K gotoblas -> qswap_k | |||
| #define QROT_K gotoblas -> qrot_k | |||
| #define QGEMV_N gotoblas -> qgemv_n | |||
| #define QGEMV_T gotoblas -> qgemv_t | |||
| #define QGEMV_R gotoblas -> qgemv_n | |||
| #define QGEMV_C gotoblas -> qgemv_t | |||
| #define QGEMV_O gotoblas -> qgemv_n | |||
| #define QGEMV_U gotoblas -> qgemv_t | |||
| #define QGEMV_S gotoblas -> qgemv_n | |||
| #define QGEMV_D gotoblas -> qgemv_t | |||
| #define QGERU_K gotoblas -> qger_k | |||
| #define QGERC_K gotoblas -> qger_k | |||
| #define QGERV_K gotoblas -> qger_k | |||
| #define QGERD_K gotoblas -> qger_k | |||
| #define QSYMV_U gotoblas -> qsymv_U | |||
| #define QSYMV_L gotoblas -> qsymv_L | |||
| #define QSYMV_THREAD_U qsymv_thread_U | |||
| #define QSYMV_THREAD_L qsymv_thread_L | |||
| #define QGEMM_ONCOPY gotoblas -> qgemm_oncopy | |||
| #define QGEMM_OTCOPY gotoblas -> qgemm_otcopy | |||
| #define QGEMM_INCOPY gotoblas -> qgemm_incopy | |||
| #define QGEMM_ITCOPY gotoblas -> qgemm_itcopy | |||
| #define QTRMM_OUNUCOPY gotoblas -> qtrmm_ounucopy | |||
| #define QTRMM_OUTUCOPY gotoblas -> qtrmm_outucopy | |||
| #define QTRMM_OLNUCOPY gotoblas -> qtrmm_olnucopy | |||
| #define QTRMM_OLTUCOPY gotoblas -> qtrmm_oltucopy | |||
| #define QTRSM_OUNUCOPY gotoblas -> qtrsm_ounucopy | |||
| #define QTRSM_OUTUCOPY gotoblas -> qtrsm_outucopy | |||
| #define QTRSM_OLNUCOPY gotoblas -> qtrsm_olnucopy | |||
| #define QTRSM_OLTUCOPY gotoblas -> qtrsm_oltucopy | |||
| #define QTRMM_IUNUCOPY gotoblas -> qtrmm_iunucopy | |||
| #define QTRMM_IUTUCOPY gotoblas -> qtrmm_iutucopy | |||
| #define QTRMM_ILNUCOPY gotoblas -> qtrmm_ilnucopy | |||
| #define QTRMM_ILTUCOPY gotoblas -> qtrmm_iltucopy | |||
| #define QTRSM_IUNUCOPY gotoblas -> qtrsm_iunucopy | |||
| #define QTRSM_IUTUCOPY gotoblas -> qtrsm_iutucopy | |||
| #define QTRSM_ILNUCOPY gotoblas -> qtrsm_ilnucopy | |||
| #define QTRSM_ILTUCOPY gotoblas -> qtrsm_iltucopy | |||
| #define QTRMM_OUNNCOPY gotoblas -> qtrmm_ounncopy | |||
| #define QTRMM_OUTNCOPY gotoblas -> qtrmm_outncopy | |||
| #define QTRMM_OLNNCOPY gotoblas -> qtrmm_olnncopy | |||
| #define QTRMM_OLTNCOPY gotoblas -> qtrmm_oltncopy | |||
| #define QTRSM_OUNNCOPY gotoblas -> qtrsm_ounncopy | |||
| #define QTRSM_OUTNCOPY gotoblas -> qtrsm_outncopy | |||
| #define QTRSM_OLNNCOPY gotoblas -> qtrsm_olnncopy | |||
| #define QTRSM_OLTNCOPY gotoblas -> qtrsm_oltncopy | |||
| #define QTRMM_IUNNCOPY gotoblas -> qtrmm_iunncopy | |||
| #define QTRMM_IUTNCOPY gotoblas -> qtrmm_iutncopy | |||
| #define QTRMM_ILNNCOPY gotoblas -> qtrmm_ilnncopy | |||
| #define QTRMM_ILTNCOPY gotoblas -> qtrmm_iltncopy | |||
| #define QTRSM_IUNNCOPY gotoblas -> qtrsm_iunncopy | |||
| #define QTRSM_IUTNCOPY gotoblas -> qtrsm_iutncopy | |||
| #define QTRSM_ILNNCOPY gotoblas -> qtrsm_ilnncopy | |||
| #define QTRSM_ILTNCOPY gotoblas -> qtrsm_iltncopy | |||
| #define QGEMM_BETA gotoblas -> qgemm_beta | |||
| #define QGEMM_KERNEL gotoblas -> qgemm_kernel | |||
| #define QTRMM_KERNEL_LN gotoblas -> qtrmm_kernel_LN | |||
| #define QTRMM_KERNEL_LT gotoblas -> qtrmm_kernel_LT | |||
| #define QTRMM_KERNEL_LR gotoblas -> qtrmm_kernel_LN | |||
| #define QTRMM_KERNEL_LC gotoblas -> qtrmm_kernel_LT | |||
| #define QTRMM_KERNEL_RN gotoblas -> qtrmm_kernel_RN | |||
| #define QTRMM_KERNEL_RT gotoblas -> qtrmm_kernel_RT | |||
| #define QTRMM_KERNEL_RR gotoblas -> qtrmm_kernel_RN | |||
| #define QTRMM_KERNEL_RC gotoblas -> qtrmm_kernel_RT | |||
| #define QTRSM_KERNEL_LN gotoblas -> qtrsm_kernel_LN | |||
| #define QTRSM_KERNEL_LT gotoblas -> qtrsm_kernel_LT | |||
| #define QTRSM_KERNEL_LR gotoblas -> qtrsm_kernel_LN | |||
| #define QTRSM_KERNEL_LC gotoblas -> qtrsm_kernel_LT | |||
| #define QTRSM_KERNEL_RN gotoblas -> qtrsm_kernel_RN | |||
| #define QTRSM_KERNEL_RT gotoblas -> qtrsm_kernel_RT | |||
| #define QTRSM_KERNEL_RR gotoblas -> qtrsm_kernel_RN | |||
| #define QTRSM_KERNEL_RC gotoblas -> qtrsm_kernel_RT | |||
| #define QSYMM_IUTCOPY gotoblas -> qsymm_iutcopy | |||
| #define QSYMM_ILTCOPY gotoblas -> qsymm_iltcopy | |||
| #define QSYMM_OUTCOPY gotoblas -> qsymm_outcopy | |||
| #define QSYMM_OLTCOPY gotoblas -> qsymm_oltcopy | |||
| #define QNEG_TCOPY gotoblas -> qneg_tcopy | |||
| #define QLASWP_NCOPY gotoblas -> qlaswp_ncopy | |||
| #endif | |||
| #define QGEMM_NN qgemm_nn | |||
| #define QGEMM_CN qgemm_tn | |||
| #define QGEMM_TN qgemm_tn | |||
| #define QGEMM_NC qgemm_nt | |||
| #define QGEMM_NT qgemm_nt | |||
| #define QGEMM_CC qgemm_tt | |||
| #define QGEMM_CT qgemm_tt | |||
| #define QGEMM_TC qgemm_tt | |||
| #define QGEMM_TT qgemm_tt | |||
| #define QGEMM_NR qgemm_nn | |||
| #define QGEMM_TR qgemm_tn | |||
| #define QGEMM_CR qgemm_tn | |||
| #define QGEMM_RN qgemm_nn | |||
| #define QGEMM_RT qgemm_nt | |||
| #define QGEMM_RC qgemm_nt | |||
| #define QGEMM_RR qgemm_nn | |||
| #define QSYMM_LU qsymm_LU | |||
| #define QSYMM_LL qsymm_LL | |||
| #define QSYMM_RU qsymm_RU | |||
| #define QSYMM_RL qsymm_RL | |||
| #define QHEMM_LU qhemm_LU | |||
| #define QHEMM_LL qhemm_LL | |||
| #define QHEMM_RU qhemm_RU | |||
| #define QHEMM_RL qhemm_RL | |||
| #define QSYRK_UN qsyrk_UN | |||
| #define QSYRK_UT qsyrk_UT | |||
| #define QSYRK_LN qsyrk_LN | |||
| #define QSYRK_LT qsyrk_LT | |||
| #define QSYRK_UR qsyrk_UN | |||
| #define QSYRK_UC qsyrk_UT | |||
| #define QSYRK_LR qsyrk_LN | |||
| #define QSYRK_LC qsyrk_LT | |||
| #define QSYRK_KERNEL_U qsyrk_kernel_U | |||
| #define QSYRK_KERNEL_L qsyrk_kernel_L | |||
| #define QHERK_UN qsyrk_UN | |||
| #define QHERK_LN qsyrk_LN | |||
| #define QHERK_UC qsyrk_UT | |||
| #define QHERK_LC qsyrk_LT | |||
| #define QHER2K_UN qsyr2k_UN | |||
| #define QHER2K_LN qsyr2k_LN | |||
| #define QHER2K_UC qsyr2k_UT | |||
| #define QHER2K_LC qsyr2k_LT | |||
| #define QSYR2K_UN qsyr2k_UN | |||
| #define QSYR2K_UT qsyr2k_UT | |||
| #define QSYR2K_LN qsyr2k_LN | |||
| #define QSYR2K_LT qsyr2k_LT | |||
| #define QSYR2K_UR qsyr2k_UN | |||
| #define QSYR2K_UC qsyr2k_UT | |||
| #define QSYR2K_LR qsyr2k_LN | |||
| #define QSYR2K_LC qsyr2k_LT | |||
| #define QSYR2K_KERNEL_U qsyr2k_kernel_U | |||
| #define QSYR2K_KERNEL_L qsyr2k_kernel_L | |||
| #define QTRMM_LNUU qtrmm_LNUU | |||
| #define QTRMM_LNUN qtrmm_LNUN | |||
| #define QTRMM_LNLU qtrmm_LNLU | |||
| #define QTRMM_LNLN qtrmm_LNLN | |||
| #define QTRMM_LTUU qtrmm_LTUU | |||
| #define QTRMM_LTUN qtrmm_LTUN | |||
| #define QTRMM_LTLU qtrmm_LTLU | |||
| #define QTRMM_LTLN qtrmm_LTLN | |||
| #define QTRMM_LRUU qtrmm_LNUU | |||
| #define QTRMM_LRUN qtrmm_LNUN | |||
| #define QTRMM_LRLU qtrmm_LNLU | |||
| #define QTRMM_LRLN qtrmm_LNLN | |||
| #define QTRMM_LCUU qtrmm_LTUU | |||
| #define QTRMM_LCUN qtrmm_LTUN | |||
| #define QTRMM_LCLU qtrmm_LTLU | |||
| #define QTRMM_LCLN qtrmm_LTLN | |||
| #define QTRMM_RNUU qtrmm_RNUU | |||
| #define QTRMM_RNUN qtrmm_RNUN | |||
| #define QTRMM_RNLU qtrmm_RNLU | |||
| #define QTRMM_RNLN qtrmm_RNLN | |||
| #define QTRMM_RTUU qtrmm_RTUU | |||
| #define QTRMM_RTUN qtrmm_RTUN | |||
| #define QTRMM_RTLU qtrmm_RTLU | |||
| #define QTRMM_RTLN qtrmm_RTLN | |||
| #define QTRMM_RRUU qtrmm_RNUU | |||
| #define QTRMM_RRUN qtrmm_RNUN | |||
| #define QTRMM_RRLU qtrmm_RNLU | |||
| #define QTRMM_RRLN qtrmm_RNLN | |||
| #define QTRMM_RCUU qtrmm_RTUU | |||
| #define QTRMM_RCUN qtrmm_RTUN | |||
| #define QTRMM_RCLU qtrmm_RTLU | |||
| #define QTRMM_RCLN qtrmm_RTLN | |||
| #define QTRSM_LNUU qtrsm_LNUU | |||
| #define QTRSM_LNUN qtrsm_LNUN | |||
| #define QTRSM_LNLU qtrsm_LNLU | |||
| #define QTRSM_LNLN qtrsm_LNLN | |||
| #define QTRSM_LTUU qtrsm_LTUU | |||
| #define QTRSM_LTUN qtrsm_LTUN | |||
| #define QTRSM_LTLU qtrsm_LTLU | |||
| #define QTRSM_LTLN qtrsm_LTLN | |||
| #define QTRSM_LRUU qtrsm_LNUU | |||
| #define QTRSM_LRUN qtrsm_LNUN | |||
| #define QTRSM_LRLU qtrsm_LNLU | |||
| #define QTRSM_LRLN qtrsm_LNLN | |||
| #define QTRSM_LCUU qtrsm_LTUU | |||
| #define QTRSM_LCUN qtrsm_LTUN | |||
| #define QTRSM_LCLU qtrsm_LTLU | |||
| #define QTRSM_LCLN qtrsm_LTLN | |||
| #define QTRSM_RNUU qtrsm_RNUU | |||
| #define QTRSM_RNUN qtrsm_RNUN | |||
| #define QTRSM_RNLU qtrsm_RNLU | |||
| #define QTRSM_RNLN qtrsm_RNLN | |||
| #define QTRSM_RTUU qtrsm_RTUU | |||
| #define QTRSM_RTUN qtrsm_RTUN | |||
| #define QTRSM_RTLU qtrsm_RTLU | |||
| #define QTRSM_RTLN qtrsm_RTLN | |||
| #define QTRSM_RRUU qtrsm_RNUU | |||
| #define QTRSM_RRUN qtrsm_RNUN | |||
| #define QTRSM_RRLU qtrsm_RNLU | |||
| #define QTRSM_RRLN qtrsm_RNLN | |||
| #define QTRSM_RCUU qtrsm_RTUU | |||
| #define QTRSM_RCUN qtrsm_RTUN | |||
| #define QTRSM_RCLU qtrsm_RTLU | |||
| #define QTRSM_RCLN qtrsm_RTLN | |||
| #define QGEMM_THREAD_NN qgemm_thread_nn | |||
| #define QGEMM_THREAD_CN qgemm_thread_tn | |||
| #define QGEMM_THREAD_TN qgemm_thread_tn | |||
| #define QGEMM_THREAD_NC qgemm_thread_nt | |||
| #define QGEMM_THREAD_NT qgemm_thread_nt | |||
| #define QGEMM_THREAD_CC qgemm_thread_tt | |||
| #define QGEMM_THREAD_CT qgemm_thread_tt | |||
| #define QGEMM_THREAD_TC qgemm_thread_tt | |||
| #define QGEMM_THREAD_TT qgemm_thread_tt | |||
| #define QGEMM_THREAD_NR qgemm_thread_nn | |||
| #define QGEMM_THREAD_TR qgemm_thread_tn | |||
| #define QGEMM_THREAD_CR qgemm_thread_tn | |||
| #define QGEMM_THREAD_RN qgemm_thread_nn | |||
| #define QGEMM_THREAD_RT qgemm_thread_nt | |||
| #define QGEMM_THREAD_RC qgemm_thread_nt | |||
| #define QGEMM_THREAD_RR qgemm_thread_nn | |||
| #define QSYMM_THREAD_LU qsymm_thread_LU | |||
| #define QSYMM_THREAD_LL qsymm_thread_LL | |||
| #define QSYMM_THREAD_RU qsymm_thread_RU | |||
| #define QSYMM_THREAD_RL qsymm_thread_RL | |||
| #define QHEMM_THREAD_LU qhemm_thread_LU | |||
| #define QHEMM_THREAD_LL qhemm_thread_LL | |||
| #define QHEMM_THREAD_RU qhemm_thread_RU | |||
| #define QHEMM_THREAD_RL qhemm_thread_RL | |||
| #define QSYRK_THREAD_UN qsyrk_thread_UN | |||
| #define QSYRK_THREAD_UT qsyrk_thread_UT | |||
| #define QSYRK_THREAD_LN qsyrk_thread_LN | |||
| #define QSYRK_THREAD_LT qsyrk_thread_LT | |||
| #define QSYRK_THREAD_UR qsyrk_thread_UN | |||
| #define QSYRK_THREAD_UC qsyrk_thread_UT | |||
| #define QSYRK_THREAD_LR qsyrk_thread_LN | |||
| #define QSYRK_THREAD_LC qsyrk_thread_LT | |||
| #define QHERK_THREAD_UN qsyrk_thread_UN | |||
| #define QHERK_THREAD_UT qsyrk_thread_UT | |||
| #define QHERK_THREAD_LN qsyrk_thread_LN | |||
| #define QHERK_THREAD_LT qsyrk_thread_LT | |||
| #define QHERK_THREAD_UR qsyrk_thread_UN | |||
| #define QHERK_THREAD_UC qsyrk_thread_UT | |||
| #define QHERK_THREAD_LR qsyrk_thread_LN | |||
| #define QHERK_THREAD_LC qsyrk_thread_LT | |||
| #endif | |||
| @@ -0,0 +1,436 @@ | |||
| #ifndef COMMON_S_H | |||
| #define COMMON_S_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define SAMAX_K samax_k | |||
| #define SAMIN_K samin_k | |||
| #define SMAX_K smax_k | |||
| #define SMIN_K smin_k | |||
| #define ISAMAX_K isamax_k | |||
| #define ISAMIN_K isamin_k | |||
| #define ISMAX_K ismax_k | |||
| #define ISMIN_K ismin_k | |||
| #define SASUM_K sasum_k | |||
| #define SAXPYU_K saxpy_k | |||
| #define SAXPYC_K saxpy_k | |||
| #define SCOPY_K scopy_k | |||
| #define SDOTU_K sdot_k | |||
| #define SDOTC_K sdot_k | |||
| #define SDSDOT_K sdot_k | |||
| #define DSDOT_K dsdot_k | |||
| #define SNRM2_K snrm2_k | |||
| #define SSCAL_K sscal_k | |||
| #define SSWAP_K sswap_k | |||
| #define SROT_K srot_k | |||
| #define SGEMV_N sgemv_n | |||
| #define SGEMV_T sgemv_t | |||
| #define SGEMV_R sgemv_n | |||
| #define SGEMV_C sgemv_t | |||
| #define SGEMV_O sgemv_n | |||
| #define SGEMV_U sgemv_t | |||
| #define SGEMV_S sgemv_n | |||
| #define SGEMV_D sgemv_t | |||
| #define SGERU_K sger_k | |||
| #define SGERC_K sger_k | |||
| #define SGERV_K sger_k | |||
| #define SGERD_K sger_k | |||
| #define SSYMV_U ssymv_U | |||
| #define SSYMV_L ssymv_L | |||
| #define SSYMV_THREAD_U ssymv_thread_U | |||
| #define SSYMV_THREAD_L ssymv_thread_L | |||
| #define SGEMM_ONCOPY sgemm_oncopy | |||
| #define SGEMM_OTCOPY sgemm_otcopy | |||
| #if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N | |||
| #define SGEMM_INCOPY sgemm_oncopy | |||
| #define SGEMM_ITCOPY sgemm_otcopy | |||
| #else | |||
| #define SGEMM_INCOPY sgemm_incopy | |||
| #define SGEMM_ITCOPY sgemm_itcopy | |||
| #endif | |||
| #define STRMM_OUNUCOPY strmm_ounucopy | |||
| #define STRMM_OUNNCOPY strmm_ounncopy | |||
| #define STRMM_OUTUCOPY strmm_outucopy | |||
| #define STRMM_OUTNCOPY strmm_outncopy | |||
| #define STRMM_OLNUCOPY strmm_olnucopy | |||
| #define STRMM_OLNNCOPY strmm_olnncopy | |||
| #define STRMM_OLTUCOPY strmm_oltucopy | |||
| #define STRMM_OLTNCOPY strmm_oltncopy | |||
| #define STRSM_OUNUCOPY strsm_ounucopy | |||
| #define STRSM_OUNNCOPY strsm_ounncopy | |||
| #define STRSM_OUTUCOPY strsm_outucopy | |||
| #define STRSM_OUTNCOPY strsm_outncopy | |||
| #define STRSM_OLNUCOPY strsm_olnucopy | |||
| #define STRSM_OLNNCOPY strsm_olnncopy | |||
| #define STRSM_OLTUCOPY strsm_oltucopy | |||
| #define STRSM_OLTNCOPY strsm_oltncopy | |||
| #if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N | |||
| #define STRMM_IUNUCOPY strmm_ounucopy | |||
| #define STRMM_IUNNCOPY strmm_ounncopy | |||
| #define STRMM_IUTUCOPY strmm_outucopy | |||
| #define STRMM_IUTNCOPY strmm_outncopy | |||
| #define STRMM_ILNUCOPY strmm_olnucopy | |||
| #define STRMM_ILNNCOPY strmm_olnncopy | |||
| #define STRMM_ILTUCOPY strmm_oltucopy | |||
| #define STRMM_ILTNCOPY strmm_oltncopy | |||
| #define STRSM_IUNUCOPY strsm_ounucopy | |||
| #define STRSM_IUNNCOPY strsm_ounncopy | |||
| #define STRSM_IUTUCOPY strsm_outucopy | |||
| #define STRSM_IUTNCOPY strsm_outncopy | |||
| #define STRSM_ILNUCOPY strsm_olnucopy | |||
| #define STRSM_ILNNCOPY strsm_olnncopy | |||
| #define STRSM_ILTUCOPY strsm_oltucopy | |||
| #define STRSM_ILTNCOPY strsm_oltncopy | |||
| #else | |||
| #define STRMM_IUNUCOPY strmm_iunucopy | |||
| #define STRMM_IUNNCOPY strmm_iunncopy | |||
| #define STRMM_IUTUCOPY strmm_iutucopy | |||
| #define STRMM_IUTNCOPY strmm_iutncopy | |||
| #define STRMM_ILNUCOPY strmm_ilnucopy | |||
| #define STRMM_ILNNCOPY strmm_ilnncopy | |||
| #define STRMM_ILTUCOPY strmm_iltucopy | |||
| #define STRMM_ILTNCOPY strmm_iltncopy | |||
| #define STRSM_IUNUCOPY strsm_iunucopy | |||
| #define STRSM_IUNNCOPY strsm_iunncopy | |||
| #define STRSM_IUTUCOPY strsm_iutucopy | |||
| #define STRSM_IUTNCOPY strsm_iutncopy | |||
| #define STRSM_ILNUCOPY strsm_ilnucopy | |||
| #define STRSM_ILNNCOPY strsm_ilnncopy | |||
| #define STRSM_ILTUCOPY strsm_iltucopy | |||
| #define STRSM_ILTNCOPY strsm_iltncopy | |||
| #endif | |||
| #define SGEMM_BETA sgemm_beta | |||
| #define SGEMM_KERNEL sgemm_kernel | |||
| #define STRMM_KERNEL_LN strmm_kernel_LN | |||
| #define STRMM_KERNEL_LT strmm_kernel_LT | |||
| #define STRMM_KERNEL_LR strmm_kernel_LN | |||
| #define STRMM_KERNEL_LC strmm_kernel_LT | |||
| #define STRMM_KERNEL_RN strmm_kernel_RN | |||
| #define STRMM_KERNEL_RT strmm_kernel_RT | |||
| #define STRMM_KERNEL_RR strmm_kernel_RN | |||
| #define STRMM_KERNEL_RC strmm_kernel_RT | |||
| #define STRSM_KERNEL_LN strsm_kernel_LN | |||
| #define STRSM_KERNEL_LT strsm_kernel_LT | |||
| #define STRSM_KERNEL_LR strsm_kernel_LN | |||
| #define STRSM_KERNEL_LC strsm_kernel_LT | |||
| #define STRSM_KERNEL_RN strsm_kernel_RN | |||
| #define STRSM_KERNEL_RT strsm_kernel_RT | |||
| #define STRSM_KERNEL_RR strsm_kernel_RN | |||
| #define STRSM_KERNEL_RC strsm_kernel_RT | |||
| #define SSYMM_OUTCOPY ssymm_outcopy | |||
| #define SSYMM_OLTCOPY ssymm_oltcopy | |||
| #if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N | |||
| #define SSYMM_IUTCOPY ssymm_outcopy | |||
| #define SSYMM_ILTCOPY ssymm_oltcopy | |||
| #else | |||
| #define SSYMM_IUTCOPY ssymm_iutcopy | |||
| #define SSYMM_ILTCOPY ssymm_iltcopy | |||
| #endif | |||
| #define SNEG_TCOPY sneg_tcopy | |||
| #define SLASWP_NCOPY slaswp_ncopy | |||
| #else | |||
| #define SAMAX_K gotoblas -> samax_k | |||
| #define SAMIN_K gotoblas -> samin_k | |||
| #define SMAX_K gotoblas -> smax_k | |||
| #define SMIN_K gotoblas -> smin_k | |||
| #define ISAMAX_K gotoblas -> isamax_k | |||
| #define ISAMIN_K gotoblas -> isamin_k | |||
| #define ISMAX_K gotoblas -> ismax_k | |||
| #define ISMIN_K gotoblas -> ismin_k | |||
| #define SASUM_K gotoblas -> sasum_k | |||
| #define SAXPYU_K gotoblas -> saxpy_k | |||
| #define SAXPYC_K gotoblas -> saxpy_k | |||
| #define SCOPY_K gotoblas -> scopy_k | |||
| #define SDOTU_K gotoblas -> sdot_k | |||
| #define SDOTC_K gotoblas -> sdot_k | |||
| #define SDSDOT_K gotoblas -> sdot_k | |||
| #define DSDOT_K gotoblas -> dsdot_k | |||
| #define SNRM2_K gotoblas -> snrm2_k | |||
| #define SSCAL_K gotoblas -> sscal_k | |||
| #define SSWAP_K gotoblas -> sswap_k | |||
| #define SROT_K gotoblas -> srot_k | |||
| #define SGEMV_N gotoblas -> sgemv_n | |||
| #define SGEMV_T gotoblas -> sgemv_t | |||
| #define SGEMV_R gotoblas -> sgemv_n | |||
| #define SGEMV_C gotoblas -> sgemv_t | |||
| #define SGEMV_O gotoblas -> sgemv_n | |||
| #define SGEMV_U gotoblas -> sgemv_t | |||
| #define SGEMV_S gotoblas -> sgemv_n | |||
| #define SGEMV_D gotoblas -> sgemv_t | |||
| #define SGERU_K gotoblas -> sger_k | |||
| #define SGERC_K gotoblas -> sger_k | |||
| #define SGERV_K gotoblas -> sger_k | |||
| #define SGERD_K gotoblas -> sger_k | |||
| #define SSYMV_U gotoblas -> ssymv_U | |||
| #define SSYMV_L gotoblas -> ssymv_L | |||
| #define SSYMV_THREAD_U ssymv_thread_U | |||
| #define SSYMV_THREAD_L ssymv_thread_L | |||
| #define SGEMM_ONCOPY gotoblas -> sgemm_oncopy | |||
| #define SGEMM_OTCOPY gotoblas -> sgemm_otcopy | |||
| #define SGEMM_INCOPY gotoblas -> sgemm_incopy | |||
| #define SGEMM_ITCOPY gotoblas -> sgemm_itcopy | |||
| #define STRMM_OUNUCOPY gotoblas -> strmm_ounucopy | |||
| #define STRMM_OUTUCOPY gotoblas -> strmm_outucopy | |||
| #define STRMM_OLNUCOPY gotoblas -> strmm_olnucopy | |||
| #define STRMM_OLTUCOPY gotoblas -> strmm_oltucopy | |||
| #define STRSM_OUNUCOPY gotoblas -> strsm_ounucopy | |||
| #define STRSM_OUTUCOPY gotoblas -> strsm_outucopy | |||
| #define STRSM_OLNUCOPY gotoblas -> strsm_olnucopy | |||
| #define STRSM_OLTUCOPY gotoblas -> strsm_oltucopy | |||
| #define STRMM_IUNUCOPY gotoblas -> strmm_iunucopy | |||
| #define STRMM_IUTUCOPY gotoblas -> strmm_iutucopy | |||
| #define STRMM_ILNUCOPY gotoblas -> strmm_ilnucopy | |||
| #define STRMM_ILTUCOPY gotoblas -> strmm_iltucopy | |||
| #define STRSM_IUNUCOPY gotoblas -> strsm_iunucopy | |||
| #define STRSM_IUTUCOPY gotoblas -> strsm_iutucopy | |||
| #define STRSM_ILNUCOPY gotoblas -> strsm_ilnucopy | |||
| #define STRSM_ILTUCOPY gotoblas -> strsm_iltucopy | |||
| #define STRMM_OUNNCOPY gotoblas -> strmm_ounncopy | |||
| #define STRMM_OUTNCOPY gotoblas -> strmm_outncopy | |||
| #define STRMM_OLNNCOPY gotoblas -> strmm_olnncopy | |||
| #define STRMM_OLTNCOPY gotoblas -> strmm_oltncopy | |||
| #define STRSM_OUNNCOPY gotoblas -> strsm_ounncopy | |||
| #define STRSM_OUTNCOPY gotoblas -> strsm_outncopy | |||
| #define STRSM_OLNNCOPY gotoblas -> strsm_olnncopy | |||
| #define STRSM_OLTNCOPY gotoblas -> strsm_oltncopy | |||
| #define STRMM_IUNNCOPY gotoblas -> strmm_iunncopy | |||
| #define STRMM_IUTNCOPY gotoblas -> strmm_iutncopy | |||
| #define STRMM_ILNNCOPY gotoblas -> strmm_ilnncopy | |||
| #define STRMM_ILTNCOPY gotoblas -> strmm_iltncopy | |||
| #define STRSM_IUNNCOPY gotoblas -> strsm_iunncopy | |||
| #define STRSM_IUTNCOPY gotoblas -> strsm_iutncopy | |||
| #define STRSM_ILNNCOPY gotoblas -> strsm_ilnncopy | |||
| #define STRSM_ILTNCOPY gotoblas -> strsm_iltncopy | |||
| #define SGEMM_BETA gotoblas -> sgemm_beta | |||
| #define SGEMM_KERNEL gotoblas -> sgemm_kernel | |||
| #define STRMM_KERNEL_LN gotoblas -> strmm_kernel_LN | |||
| #define STRMM_KERNEL_LT gotoblas -> strmm_kernel_LT | |||
| #define STRMM_KERNEL_LR gotoblas -> strmm_kernel_LN | |||
| #define STRMM_KERNEL_LC gotoblas -> strmm_kernel_LT | |||
| #define STRMM_KERNEL_RN gotoblas -> strmm_kernel_RN | |||
| #define STRMM_KERNEL_RT gotoblas -> strmm_kernel_RT | |||
| #define STRMM_KERNEL_RR gotoblas -> strmm_kernel_RN | |||
| #define STRMM_KERNEL_RC gotoblas -> strmm_kernel_RT | |||
| #define STRSM_KERNEL_LN gotoblas -> strsm_kernel_LN | |||
| #define STRSM_KERNEL_LT gotoblas -> strsm_kernel_LT | |||
| #define STRSM_KERNEL_LR gotoblas -> strsm_kernel_LN | |||
| #define STRSM_KERNEL_LC gotoblas -> strsm_kernel_LT | |||
| #define STRSM_KERNEL_RN gotoblas -> strsm_kernel_RN | |||
| #define STRSM_KERNEL_RT gotoblas -> strsm_kernel_RT | |||
| #define STRSM_KERNEL_RR gotoblas -> strsm_kernel_RN | |||
| #define STRSM_KERNEL_RC gotoblas -> strsm_kernel_RT | |||
| #define SSYMM_IUTCOPY gotoblas -> ssymm_iutcopy | |||
| #define SSYMM_ILTCOPY gotoblas -> ssymm_iltcopy | |||
| #define SSYMM_OUTCOPY gotoblas -> ssymm_outcopy | |||
| #define SSYMM_OLTCOPY gotoblas -> ssymm_oltcopy | |||
| #define SNEG_TCOPY gotoblas -> sneg_tcopy | |||
| #define SLASWP_NCOPY gotoblas -> slaswp_ncopy | |||
| #endif | |||
| #define SGEMM_NN sgemm_nn | |||
| #define SGEMM_CN sgemm_tn | |||
| #define SGEMM_TN sgemm_tn | |||
| #define SGEMM_NC sgemm_nt | |||
| #define SGEMM_NT sgemm_nt | |||
| #define SGEMM_CC sgemm_tt | |||
| #define SGEMM_CT sgemm_tt | |||
| #define SGEMM_TC sgemm_tt | |||
| #define SGEMM_TT sgemm_tt | |||
| #define SGEMM_NR sgemm_nn | |||
| #define SGEMM_TR sgemm_tn | |||
| #define SGEMM_CR sgemm_tn | |||
| #define SGEMM_RN sgemm_nn | |||
| #define SGEMM_RT sgemm_nt | |||
| #define SGEMM_RC sgemm_nt | |||
| #define SGEMM_RR sgemm_nn | |||
| #define SSYMM_LU ssymm_LU | |||
| #define SSYMM_LL ssymm_LL | |||
| #define SSYMM_RU ssymm_RU | |||
| #define SSYMM_RL ssymm_RL | |||
| #define SHEMM_LU shemm_LU | |||
| #define SHEMM_LL shemm_LL | |||
| #define SHEMM_RU shemm_RU | |||
| #define SHEMM_RL shemm_RL | |||
| #define SSYRK_UN ssyrk_UN | |||
| #define SSYRK_UT ssyrk_UT | |||
| #define SSYRK_LN ssyrk_LN | |||
| #define SSYRK_LT ssyrk_LT | |||
| #define SSYRK_UR ssyrk_UN | |||
| #define SSYRK_UC ssyrk_UT | |||
| #define SSYRK_LR ssyrk_LN | |||
| #define SSYRK_LC ssyrk_LT | |||
| #define SSYRK_KERNEL_U ssyrk_kernel_U | |||
| #define SSYRK_KERNEL_L ssyrk_kernel_L | |||
| #define SHERK_UN ssyrk_UN | |||
| #define SHERK_LN ssyrk_LN | |||
| #define SHERK_UC ssyrk_UT | |||
| #define SHERK_LC ssyrk_LT | |||
| #define SHER2K_UN ssyr2k_UN | |||
| #define SHER2K_LN ssyr2k_LN | |||
| #define SHER2K_UC ssyr2k_UT | |||
| #define SHER2K_LC ssyr2k_LT | |||
| #define SSYR2K_UN ssyr2k_UN | |||
| #define SSYR2K_UT ssyr2k_UT | |||
| #define SSYR2K_LN ssyr2k_LN | |||
| #define SSYR2K_LT ssyr2k_LT | |||
| #define SSYR2K_UR ssyr2k_UN | |||
| #define SSYR2K_UC ssyr2k_UT | |||
| #define SSYR2K_LR ssyr2k_LN | |||
| #define SSYR2K_LC ssyr2k_LT | |||
| #define SSYR2K_KERNEL_U ssyr2k_kernel_U | |||
| #define SSYR2K_KERNEL_L ssyr2k_kernel_L | |||
| #define STRMM_LNUU strmm_LNUU | |||
| #define STRMM_LNUN strmm_LNUN | |||
| #define STRMM_LNLU strmm_LNLU | |||
| #define STRMM_LNLN strmm_LNLN | |||
| #define STRMM_LTUU strmm_LTUU | |||
| #define STRMM_LTUN strmm_LTUN | |||
| #define STRMM_LTLU strmm_LTLU | |||
| #define STRMM_LTLN strmm_LTLN | |||
| #define STRMM_LRUU strmm_LNUU | |||
| #define STRMM_LRUN strmm_LNUN | |||
| #define STRMM_LRLU strmm_LNLU | |||
| #define STRMM_LRLN strmm_LNLN | |||
| #define STRMM_LCUU strmm_LTUU | |||
| #define STRMM_LCUN strmm_LTUN | |||
| #define STRMM_LCLU strmm_LTLU | |||
| #define STRMM_LCLN strmm_LTLN | |||
| #define STRMM_RNUU strmm_RNUU | |||
| #define STRMM_RNUN strmm_RNUN | |||
| #define STRMM_RNLU strmm_RNLU | |||
| #define STRMM_RNLN strmm_RNLN | |||
| #define STRMM_RTUU strmm_RTUU | |||
| #define STRMM_RTUN strmm_RTUN | |||
| #define STRMM_RTLU strmm_RTLU | |||
| #define STRMM_RTLN strmm_RTLN | |||
| #define STRMM_RRUU strmm_RNUU | |||
| #define STRMM_RRUN strmm_RNUN | |||
| #define STRMM_RRLU strmm_RNLU | |||
| #define STRMM_RRLN strmm_RNLN | |||
| #define STRMM_RCUU strmm_RTUU | |||
| #define STRMM_RCUN strmm_RTUN | |||
| #define STRMM_RCLU strmm_RTLU | |||
| #define STRMM_RCLN strmm_RTLN | |||
| #define STRSM_LNUU strsm_LNUU | |||
| #define STRSM_LNUN strsm_LNUN | |||
| #define STRSM_LNLU strsm_LNLU | |||
| #define STRSM_LNLN strsm_LNLN | |||
| #define STRSM_LTUU strsm_LTUU | |||
| #define STRSM_LTUN strsm_LTUN | |||
| #define STRSM_LTLU strsm_LTLU | |||
| #define STRSM_LTLN strsm_LTLN | |||
| #define STRSM_LRUU strsm_LNUU | |||
| #define STRSM_LRUN strsm_LNUN | |||
| #define STRSM_LRLU strsm_LNLU | |||
| #define STRSM_LRLN strsm_LNLN | |||
| #define STRSM_LCUU strsm_LTUU | |||
| #define STRSM_LCUN strsm_LTUN | |||
| #define STRSM_LCLU strsm_LTLU | |||
| #define STRSM_LCLN strsm_LTLN | |||
| #define STRSM_RNUU strsm_RNUU | |||
| #define STRSM_RNUN strsm_RNUN | |||
| #define STRSM_RNLU strsm_RNLU | |||
| #define STRSM_RNLN strsm_RNLN | |||
| #define STRSM_RTUU strsm_RTUU | |||
| #define STRSM_RTUN strsm_RTUN | |||
| #define STRSM_RTLU strsm_RTLU | |||
| #define STRSM_RTLN strsm_RTLN | |||
| #define STRSM_RRUU strsm_RNUU | |||
| #define STRSM_RRUN strsm_RNUN | |||
| #define STRSM_RRLU strsm_RNLU | |||
| #define STRSM_RRLN strsm_RNLN | |||
| #define STRSM_RCUU strsm_RTUU | |||
| #define STRSM_RCUN strsm_RTUN | |||
| #define STRSM_RCLU strsm_RTLU | |||
| #define STRSM_RCLN strsm_RTLN | |||
| #define SGEMM_THREAD_NN sgemm_thread_nn | |||
| #define SGEMM_THREAD_CN sgemm_thread_tn | |||
| #define SGEMM_THREAD_TN sgemm_thread_tn | |||
| #define SGEMM_THREAD_NC sgemm_thread_nt | |||
| #define SGEMM_THREAD_NT sgemm_thread_nt | |||
| #define SGEMM_THREAD_CC sgemm_thread_tt | |||
| #define SGEMM_THREAD_CT sgemm_thread_tt | |||
| #define SGEMM_THREAD_TC sgemm_thread_tt | |||
| #define SGEMM_THREAD_TT sgemm_thread_tt | |||
| #define SGEMM_THREAD_NR sgemm_thread_nn | |||
| #define SGEMM_THREAD_TR sgemm_thread_tn | |||
| #define SGEMM_THREAD_CR sgemm_thread_tn | |||
| #define SGEMM_THREAD_RN sgemm_thread_nn | |||
| #define SGEMM_THREAD_RT sgemm_thread_nt | |||
| #define SGEMM_THREAD_RC sgemm_thread_nt | |||
| #define SGEMM_THREAD_RR sgemm_thread_nn | |||
| #define SSYMM_THREAD_LU ssymm_thread_LU | |||
| #define SSYMM_THREAD_LL ssymm_thread_LL | |||
| #define SSYMM_THREAD_RU ssymm_thread_RU | |||
| #define SSYMM_THREAD_RL ssymm_thread_RL | |||
| #define SHEMM_THREAD_LU shemm_thread_LU | |||
| #define SHEMM_THREAD_LL shemm_thread_LL | |||
| #define SHEMM_THREAD_RU shemm_thread_RU | |||
| #define SHEMM_THREAD_RL shemm_thread_RL | |||
| #define SSYRK_THREAD_UN ssyrk_thread_UN | |||
| #define SSYRK_THREAD_UT ssyrk_thread_UT | |||
| #define SSYRK_THREAD_LN ssyrk_thread_LN | |||
| #define SSYRK_THREAD_LT ssyrk_thread_LT | |||
| #define SSYRK_THREAD_UR ssyrk_thread_UN | |||
| #define SSYRK_THREAD_UC ssyrk_thread_UT | |||
| #define SSYRK_THREAD_LR ssyrk_thread_LN | |||
| #define SSYRK_THREAD_LC ssyrk_thread_LT | |||
| #define SHERK_THREAD_UN ssyrk_thread_UN | |||
| #define SHERK_THREAD_UT ssyrk_thread_UT | |||
| #define SHERK_THREAD_LN ssyrk_thread_LN | |||
| #define SHERK_THREAD_LT ssyrk_thread_LT | |||
| #define SHERK_THREAD_UR ssyrk_thread_UN | |||
| #define SHERK_THREAD_UC ssyrk_thread_UT | |||
| #define SHERK_THREAD_LR ssyrk_thread_LN | |||
| #define SHERK_THREAD_LC ssyrk_thread_LT | |||
| #endif | |||
| @@ -0,0 +1,224 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_POWER | |||
| #define COMMON_POWER | |||
| #define MB __asm__ __volatile__ ("nop") | |||
| #define WMB __asm__ __volatile__ ("nop") | |||
| #ifndef ASSEMBLER | |||
| static void __inline blas_lock(volatile unsigned long *address){ | |||
| long int ret = 1; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| __asm__ __volatile__( | |||
| "ldstub [%1], %0" | |||
| : "=&r"(ret) | |||
| : "r" (address) | |||
| : "memory"); | |||
| } while (ret); | |||
| } | |||
| static __inline unsigned long rpcc(void){ | |||
| unsigned long clocks; | |||
| __asm__ __volatile__ ("rd %%tick, %0" : "=r" (clocks)); | |||
| return clocks; | |||
| }; | |||
| #ifdef __64BIT__ | |||
| #define RPCC64BIT | |||
| #endif | |||
| #ifndef __BIG_ENDIAN__ | |||
| #define __BIG_ENDIAN__ | |||
| #endif | |||
| #ifdef DOUBLE | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fmovd %%f2, %0" : "=f"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fmovs %%f1, %0" : "=f"(res) : : "memory") | |||
| #endif | |||
| #define GET_IMAGE_CANCEL | |||
| #ifdef SMP | |||
| static __inline int blas_quickdivide(blasint x, blasint y){ | |||
| return x / y; | |||
| } | |||
| #endif | |||
| #endif | |||
| #ifdef ASSEMBLER | |||
| #ifndef __64BIT__ | |||
| #define STACK_START 128 | |||
| #define SAVESP save %sp, -64, %sp | |||
| #else | |||
| #define STACK_START 2423 | |||
| #define SAVESP save %sp, -256, %sp | |||
| #endif | |||
| #define NOP or %g1, %g1, %g1 | |||
| #ifdef DOUBLE | |||
| #define LDF ldd | |||
| #define STF std | |||
| #define FADD faddd | |||
| #define FMUL fmuld | |||
| #define FMOV fmovd | |||
| #define FABS fabsd | |||
| #define FSUB fsubd | |||
| #define FCMP fcmpd | |||
| #define FMOVG fmovdg | |||
| #define FMOVL fmovdl | |||
| #define FSQRT fsqrtd | |||
| #define FDIV fdivd | |||
| #else | |||
| #define LDF ld | |||
| #define STF st | |||
| #define FADD fadds | |||
| #define FMUL fmuls | |||
| #define FMOV fmovs | |||
| #define FABS fabss | |||
| #define FSUB fsubs | |||
| #define FCMP fcmps | |||
| #define FMOVG fmovsg | |||
| #define FMOVL fmovsl | |||
| #define FSQRT fsqrts | |||
| #define FDIV fdivs | |||
| #endif | |||
| #define HALT prefetch [%g0], 5 | |||
| #define FMADDS(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | ( 1 << 5) | (rs2)) | |||
| #define FMADDD(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | ( 2 << 5) | (rs2)) | |||
| #define FMSUBS(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | ( 5 << 5) | (rs2)) | |||
| #define FMSUBD(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | ( 6 << 5) | (rs2)) | |||
| #define FNMSUBS(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | ( 9 << 5) | (rs2)) | |||
| #define FNMSUBD(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | (10 << 5) | (rs2)) | |||
| #define FNMADDS(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | (13 << 5) | (rs2)) | |||
| #define FNMADDD(rs1, rs2, rs3, rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x37 << 19) | ((rs1) << 14) | ((rs3) << 9) | (14 << 5) | (rs2)) | |||
| #define FCLRS(rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x36 << 19) | ( 0x61 << 5)) | |||
| #define FCLRD(rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x36 << 19) | ( 0x60 << 5)) | |||
| #define FONES(rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x36 << 19) | ( 0x7f << 5)) | |||
| #define FONED(rd) \ | |||
| .word ((2 << 30) | ((rd) << 25) | ( 0x36 << 19) | ( 0x7e << 5)) | |||
| #ifndef DOUBLE | |||
| #define FCLR(a) FCLRS(a) | |||
| #define FONE(a) FONES(a) | |||
| #define FMADD(a, b, c, d) FMADDS(a, b, c, d) | |||
| #define FMSUB(a, b, c, d) FMSUBS(a, b, c, d) | |||
| #define FNMADD(a, b, c, d) FNMADDS(a, b, c, d) | |||
| #define FNMSUB(a, b, c, d) FNMSUBS(a, b, c, d) | |||
| #else | |||
| #define FCLR(a) FCLRD(a) | |||
| #define FONE(a) FONED(a) | |||
| #define FMADD(a, b, c, d) FMADDD(a, b, c, d) | |||
| #define FMSUB(a, b, c, d) FMSUBD(a, b, c, d) | |||
| #define FNMADD(a, b, c, d) FNMADDD(a, b, c, d) | |||
| #define FNMSUB(a, b, c, d) FNMSUBD(a, b, c, d) | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #ifdef sparc | |||
| #define PROLOGUE \ | |||
| .section ".text"; \ | |||
| .align 32; \ | |||
| .global REALNAME;\ | |||
| .type REALNAME, #function; \ | |||
| .proc 07; \ | |||
| REALNAME:; | |||
| #define EPILOGUE \ | |||
| .size REALNAME, .-REALNAME | |||
| #endif | |||
| #endif | |||
| #ifdef sparc | |||
| #define SEEK_ADDRESS | |||
| #endif | |||
| #define BUFFER_SIZE (32 << 20) | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE ( 8 << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE ( 4 << 20) | |||
| #define BASE_ADDRESS (START_ADDRESS - BUFFER_SIZE * MAX_CPU_NUMBER) | |||
| #ifndef MAP_ANONYMOUS | |||
| #define MAP_ANONYMOUS MAP_ANON | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,192 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_THREAD | |||
| #define COMMON_THREAD | |||
| /* Basic Thread Debugging */ | |||
| #undef SMP_DEBUG | |||
| /* Thread Timing Debugging */ | |||
| #undef TIMING_DEBUG | |||
| /* Global Parameter */ | |||
| extern int blas_cpu_number; | |||
| extern int blas_num_threads; | |||
| extern int blas_omp_linked; | |||
| #define BLAS_LEGACY 0x8000U | |||
| #define BLAS_PTHREAD 0x4000U | |||
| #define BLAS_NODE 0x2000U | |||
| #define BLAS_PREC 0x0003U | |||
| #define BLAS_SINGLE 0x0000U | |||
| #define BLAS_DOUBLE 0x0001U | |||
| #define BLAS_XDOUBLE 0x0002U | |||
| #define BLAS_REAL 0x0000U | |||
| #define BLAS_COMPLEX 0x0004U | |||
| #define BLAS_TRANSA 0x0030U /* 2bit */ | |||
| #define BLAS_TRANSA_N 0x0000U | |||
| #define BLAS_TRANSA_T 0x0010U | |||
| #define BLAS_TRANSA_R 0x0020U | |||
| #define BLAS_TRANSA_C 0x0030U | |||
| #define BLAS_TRANSA_SHIFT 4 | |||
| #define BLAS_TRANSB 0x0300U /* 2bit */ | |||
| #define BLAS_TRANSB_N 0x0000U | |||
| #define BLAS_TRANSB_T 0x0100U | |||
| #define BLAS_TRANSB_R 0x0200U | |||
| #define BLAS_TRANSB_C 0x0300U | |||
| #define BLAS_TRANSB_SHIFT 8 | |||
| #define BLAS_RSIDE 0x0400U | |||
| #define BLAS_RSIDE_SHIFT 10 | |||
| #define BLAS_UPLO 0x0800U | |||
| #define BLAS_UPLO_SHIFT 11 | |||
| #define BLAS_STATUS_NOTYET 0 | |||
| #define BLAS_STATUS_QUEUED 1 | |||
| #define BLAS_STATUS_RUNNING 2 | |||
| #define BLAS_STATUS_FINISHED 4 | |||
| typedef struct blas_queue { | |||
| void *routine; | |||
| BLASLONG position; | |||
| BLASLONG assigned; | |||
| blas_arg_t *args; | |||
| void *range_m; | |||
| void *range_n; | |||
| void *sa, *sb; | |||
| struct blas_queue *next; | |||
| #if defined( __WIN32__) || defined(__CYGWIN32__) | |||
| CRITICAL_SECTION lock; | |||
| HANDLE finish; | |||
| #else | |||
| pthread_mutex_t lock; | |||
| pthread_cond_t finished; | |||
| #endif | |||
| int mode, status; | |||
| #ifdef CONSISTENT_FPCSR | |||
| unsigned int sse_mode, x87_mode; | |||
| #endif | |||
| #ifdef SMP_DEBUG | |||
| int num; | |||
| #endif | |||
| #ifdef TIMING_DEBUG | |||
| unsigned int clocks; | |||
| #endif | |||
| } blas_queue_t; | |||
| #ifdef SMP_SERVER | |||
| extern int blas_server_avail; | |||
| static __inline int num_cpu_avail(int level) { | |||
| if ((blas_cpu_number == 1) | |||
| #ifdef USE_OPENMP | |||
| || omp_in_parallel() | |||
| #endif | |||
| ) return 1; | |||
| return blas_cpu_number; | |||
| } | |||
| static __inline void blas_queue_init(blas_queue_t *queue){ | |||
| queue -> sa = NULL; | |||
| queue -> sb = NULL; | |||
| queue-> next = NULL; | |||
| } | |||
| int blas_thread_init(void); | |||
| int BLASFUNC(blas_thread_shutdown)(void); | |||
| int exec_blas(BLASLONG, blas_queue_t *); | |||
| int exec_blas_async(BLASLONG, blas_queue_t *); | |||
| int exec_blas_async_wait(BLASLONG, blas_queue_t *); | |||
| #else | |||
| int exec_blas_async(BLASLONG num_cpu, blas_param_t *param, pthread_t *); | |||
| int exec_blas_async_wait(BLASLONG num_cpu, pthread_t *blas_threads); | |||
| int exec_blas(BLASLONG num_cpu, blas_param_t *param, void *buffer); | |||
| #endif | |||
| #ifndef ASSEMBLER | |||
| int blas_level1_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha, | |||
| void *a, BLASLONG lda, | |||
| void *b, BLASLONG ldb, | |||
| void *c, BLASLONG ldc, int (*function)(), int threads); | |||
| int gemm_thread_m (int mode, blas_arg_t *, BLASLONG *, BLASLONG *, int (*function)(), void *, void *, BLASLONG); | |||
| int gemm_thread_n (int mode, blas_arg_t *, BLASLONG *, BLASLONG *, int (*function)(), void *, void *, BLASLONG); | |||
| int gemm_thread_mn(int mode, blas_arg_t *, BLASLONG *, BLASLONG *, int (*function)(), void *, void *, BLASLONG); | |||
| int gemm_thread_variable(int mode, blas_arg_t *, BLASLONG *, BLASLONG *, int (*function)(), void *, void *, BLASLONG, BLASLONG); | |||
| int trsm_thread(int mode, BLASLONG m, BLASLONG n, | |||
| double alpha_r, double alpha_i, | |||
| void *a, BLASLONG lda, | |||
| void *c, BLASLONG ldc, int (*function)(), void *buffer); | |||
| int syrk_thread(int mode, blas_arg_t *, BLASLONG *, BLASLONG *, int (*function)(), void *, void *, BLASLONG); | |||
| int beta_thread(int mode, BLASLONG m, BLASLONG n, | |||
| double alpha_r, double alpha_i, | |||
| void *c, BLASLONG ldc, int (*fuction)()); | |||
| int getrf_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, | |||
| void *offsetA, BLASLONG lda, | |||
| void *offsetB, BLASLONG jb, | |||
| void *ipiv, BLASLONG offset, int (*function)(), void *buffer); | |||
| #endif /* ENDIF ASSEMBLER */ | |||
| #endif | |||
| @@ -0,0 +1,611 @@ | |||
| #ifndef COMMON_X_H | |||
| #define COMMON_X_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define XAMAX_K xamax_k | |||
| #define XAMIN_K xamin_k | |||
| #define XMAX_K xmax_k | |||
| #define XMIN_K xmin_k | |||
| #define IXAMAX_K ixamax_k | |||
| #define IXAMIN_K ixamin_k | |||
| #define IXMAX_K ixmax_k | |||
| #define IXMIN_K ixmin_k | |||
| #define XASUM_K xasum_k | |||
| #define XAXPYU_K xaxpy_k | |||
| #define XAXPYC_K xaxpyc_k | |||
| #define XCOPY_K xcopy_k | |||
| #define XDOTU_K xdotu_k | |||
| #define XDOTC_K xdotc_k | |||
| #define XNRM2_K xnrm2_k | |||
| #define XSCAL_K xscal_k | |||
| #define XSWAP_K xswap_k | |||
| #define XROT_K xqrot_k | |||
| #define XGEMV_N xgemv_n | |||
| #define XGEMV_T xgemv_t | |||
| #define XGEMV_R xgemv_r | |||
| #define XGEMV_C xgemv_c | |||
| #define XGEMV_O xgemv_o | |||
| #define XGEMV_U xgemv_u | |||
| #define XGEMV_S xgemv_s | |||
| #define XGEMV_D xgemv_d | |||
| #define XGERU_K xgeru_k | |||
| #define XGERC_K xgerc_k | |||
| #define XGERV_K xgerv_k | |||
| #define XGERD_K xgerd_k | |||
| #define XSYMV_U xsymv_U | |||
| #define XSYMV_L xsymv_L | |||
| #define XHEMV_U xhemv_U | |||
| #define XHEMV_L xhemv_L | |||
| #define XHEMV_V xhemv_V | |||
| #define XHEMV_M xhemv_M | |||
| #define XSYMV_THREAD_U xsymv_thread_U | |||
| #define XSYMV_THREAD_L xsymv_thread_L | |||
| #define XHEMV_THREAD_U xhemv_thread_U | |||
| #define XHEMV_THREAD_L xhemv_thread_L | |||
| #define XHEMV_THREAD_V xhemv_thread_V | |||
| #define XHEMV_THREAD_M xhemv_thread_M | |||
| #define XGEMM_ONCOPY xgemm_oncopy | |||
| #define XGEMM_OTCOPY xgemm_otcopy | |||
| #if XGEMM_DEFAULT_UNROLL_M == XGEMM_DEFAULT_UNROLL_N | |||
| #define XGEMM_INCOPY xgemm_oncopy | |||
| #define XGEMM_ITCOPY xgemm_otcopy | |||
| #else | |||
| #define XGEMM_INCOPY xgemm_incopy | |||
| #define XGEMM_ITCOPY xgemm_itcopy | |||
| #endif | |||
| #define XTRMM_OUNUCOPY xtrmm_ounucopy | |||
| #define XTRMM_OUNNCOPY xtrmm_ounncopy | |||
| #define XTRMM_OUTUCOPY xtrmm_outucopy | |||
| #define XTRMM_OUTNCOPY xtrmm_outncopy | |||
| #define XTRMM_OLNUCOPY xtrmm_olnucopy | |||
| #define XTRMM_OLNNCOPY xtrmm_olnncopy | |||
| #define XTRMM_OLTUCOPY xtrmm_oltucopy | |||
| #define XTRMM_OLTNCOPY xtrmm_oltncopy | |||
| #define XTRSM_OUNUCOPY xtrsm_ounucopy | |||
| #define XTRSM_OUNNCOPY xtrsm_ounncopy | |||
| #define XTRSM_OUTUCOPY xtrsm_outucopy | |||
| #define XTRSM_OUTNCOPY xtrsm_outncopy | |||
| #define XTRSM_OLNUCOPY xtrsm_olnucopy | |||
| #define XTRSM_OLNNCOPY xtrsm_olnncopy | |||
| #define XTRSM_OLTUCOPY xtrsm_oltucopy | |||
| #define XTRSM_OLTNCOPY xtrsm_oltncopy | |||
| #if XGEMM_DEFAULT_UNROLL_M == XGEMM_DEFAULT_UNROLL_N | |||
| #define XTRMM_IUNUCOPY xtrmm_ounucopy | |||
| #define XTRMM_IUNNCOPY xtrmm_ounncopy | |||
| #define XTRMM_IUTUCOPY xtrmm_outucopy | |||
| #define XTRMM_IUTNCOPY xtrmm_outncopy | |||
| #define XTRMM_ILNUCOPY xtrmm_olnucopy | |||
| #define XTRMM_ILNNCOPY xtrmm_olnncopy | |||
| #define XTRMM_ILTUCOPY xtrmm_oltucopy | |||
| #define XTRMM_ILTNCOPY xtrmm_oltncopy | |||
| #define XTRSM_IUNUCOPY xtrsm_ounucopy | |||
| #define XTRSM_IUNNCOPY xtrsm_ounncopy | |||
| #define XTRSM_IUTUCOPY xtrsm_outucopy | |||
| #define XTRSM_IUTNCOPY xtrsm_outncopy | |||
| #define XTRSM_ILNUCOPY xtrsm_olnucopy | |||
| #define XTRSM_ILNNCOPY xtrsm_olnncopy | |||
| #define XTRSM_ILTUCOPY xtrsm_oltucopy | |||
| #define XTRSM_ILTNCOPY xtrsm_oltncopy | |||
| #else | |||
| #define XTRMM_IUNUCOPY xtrmm_iunucopy | |||
| #define XTRMM_IUNNCOPY xtrmm_iunncopy | |||
| #define XTRMM_IUTUCOPY xtrmm_iutucopy | |||
| #define XTRMM_IUTNCOPY xtrmm_iutncopy | |||
| #define XTRMM_ILNUCOPY xtrmm_ilnucopy | |||
| #define XTRMM_ILNNCOPY xtrmm_ilnncopy | |||
| #define XTRMM_ILTUCOPY xtrmm_iltucopy | |||
| #define XTRMM_ILTNCOPY xtrmm_iltncopy | |||
| #define XTRSM_IUNUCOPY xtrsm_iunucopy | |||
| #define XTRSM_IUNNCOPY xtrsm_iunncopy | |||
| #define XTRSM_IUTUCOPY xtrsm_iutucopy | |||
| #define XTRSM_IUTNCOPY xtrsm_iutncopy | |||
| #define XTRSM_ILNUCOPY xtrsm_ilnucopy | |||
| #define XTRSM_ILNNCOPY xtrsm_ilnncopy | |||
| #define XTRSM_ILTUCOPY xtrsm_iltucopy | |||
| #define XTRSM_ILTNCOPY xtrsm_iltncopy | |||
| #endif | |||
| #define XGEMM_BETA xgemm_beta | |||
| #define XGEMM_KERNEL_N xgemm_kernel_n | |||
| #define XGEMM_KERNEL_L xgemm_kernel_l | |||
| #define XGEMM_KERNEL_R xgemm_kernel_r | |||
| #define XGEMM_KERNEL_B xgemm_kernel_b | |||
| #define XTRMM_KERNEL_LN xtrmm_kernel_LN | |||
| #define XTRMM_KERNEL_LT xtrmm_kernel_LT | |||
| #define XTRMM_KERNEL_LR xtrmm_kernel_LR | |||
| #define XTRMM_KERNEL_LC xtrmm_kernel_LC | |||
| #define XTRMM_KERNEL_RN xtrmm_kernel_RN | |||
| #define XTRMM_KERNEL_RT xtrmm_kernel_RT | |||
| #define XTRMM_KERNEL_RR xtrmm_kernel_RR | |||
| #define XTRMM_KERNEL_RC xtrmm_kernel_RC | |||
| #define XTRSM_KERNEL_LN xtrsm_kernel_LN | |||
| #define XTRSM_KERNEL_LT xtrsm_kernel_LT | |||
| #define XTRSM_KERNEL_LR xtrsm_kernel_LR | |||
| #define XTRSM_KERNEL_LC xtrsm_kernel_LC | |||
| #define XTRSM_KERNEL_RN xtrsm_kernel_RN | |||
| #define XTRSM_KERNEL_RT xtrsm_kernel_RT | |||
| #define XTRSM_KERNEL_RR xtrsm_kernel_RR | |||
| #define XTRSM_KERNEL_RC xtrsm_kernel_RC | |||
| #define XSYMM_OUTCOPY xsymm_outcopy | |||
| #define XSYMM_OLTCOPY xsymm_oltcopy | |||
| #if XGEMM_DEFAULT_UNROLL_M == XGEMM_DEFAULT_UNROLL_N | |||
| #define XSYMM_IUTCOPY xsymm_outcopy | |||
| #define XSYMM_ILTCOPY xsymm_oltcopy | |||
| #else | |||
| #define XSYMM_IUTCOPY xsymm_iutcopy | |||
| #define XSYMM_ILTCOPY xsymm_iltcopy | |||
| #endif | |||
| #define XHEMM_OUTCOPY xhemm_outcopy | |||
| #define XHEMM_OLTCOPY xhemm_oltcopy | |||
| #if XGEMM_DEFAULT_UNROLL_M == XGEMM_DEFAULT_UNROLL_N | |||
| #define XHEMM_IUTCOPY xhemm_outcopy | |||
| #define XHEMM_ILTCOPY xhemm_oltcopy | |||
| #else | |||
| #define XHEMM_IUTCOPY xhemm_iutcopy | |||
| #define XHEMM_ILTCOPY xhemm_iltcopy | |||
| #endif | |||
| #define XGEMM3M_ONCOPYB xgemm3m_oncopyb | |||
| #define XGEMM3M_ONCOPYR xgemm3m_oncopyr | |||
| #define XGEMM3M_ONCOPYI xgemm3m_oncopyi | |||
| #define XGEMM3M_OTCOPYB xgemm3m_otcopyb | |||
| #define XGEMM3M_OTCOPYR xgemm3m_otcopyr | |||
| #define XGEMM3M_OTCOPYI xgemm3m_otcopyi | |||
| #define XGEMM3M_INCOPYB xgemm3m_incopyb | |||
| #define XGEMM3M_INCOPYR xgemm3m_incopyr | |||
| #define XGEMM3M_INCOPYI xgemm3m_incopyi | |||
| #define XGEMM3M_ITCOPYB xgemm3m_itcopyb | |||
| #define XGEMM3M_ITCOPYR xgemm3m_itcopyr | |||
| #define XGEMM3M_ITCOPYI xgemm3m_itcopyi | |||
| #define XSYMM3M_ILCOPYB xsymm3m_ilcopyb | |||
| #define XSYMM3M_IUCOPYB xsymm3m_iucopyb | |||
| #define XSYMM3M_ILCOPYR xsymm3m_ilcopyr | |||
| #define XSYMM3M_IUCOPYR xsymm3m_iucopyr | |||
| #define XSYMM3M_ILCOPYI xsymm3m_ilcopyi | |||
| #define XSYMM3M_IUCOPYI xsymm3m_iucopyi | |||
| #define XSYMM3M_OLCOPYB xsymm3m_olcopyb | |||
| #define XSYMM3M_OUCOPYB xsymm3m_oucopyb | |||
| #define XSYMM3M_OLCOPYR xsymm3m_olcopyr | |||
| #define XSYMM3M_OUCOPYR xsymm3m_oucopyr | |||
| #define XSYMM3M_OLCOPYI xsymm3m_olcopyi | |||
| #define XSYMM3M_OUCOPYI xsymm3m_oucopyi | |||
| #define XHEMM3M_ILCOPYB xhemm3m_ilcopyb | |||
| #define XHEMM3M_IUCOPYB xhemm3m_iucopyb | |||
| #define XHEMM3M_ILCOPYR xhemm3m_ilcopyr | |||
| #define XHEMM3M_IUCOPYR xhemm3m_iucopyr | |||
| #define XHEMM3M_ILCOPYI xhemm3m_ilcopyi | |||
| #define XHEMM3M_IUCOPYI xhemm3m_iucopyi | |||
| #define XHEMM3M_OLCOPYB xhemm3m_olcopyb | |||
| #define XHEMM3M_OUCOPYB xhemm3m_oucopyb | |||
| #define XHEMM3M_OLCOPYR xhemm3m_olcopyr | |||
| #define XHEMM3M_OUCOPYR xhemm3m_oucopyr | |||
| #define XHEMM3M_OLCOPYI xhemm3m_olcopyi | |||
| #define XHEMM3M_OUCOPYI xhemm3m_oucopyi | |||
| #define XGEMM3M_KERNEL xgemm3m_kernel | |||
| #define XNEG_TCOPY xneg_tcopy | |||
| #define XLASWP_NCOPY xlaswp_ncopy | |||
| #else | |||
| #define XAMAX_K gotoblas -> xamax_k | |||
| #define XAMIN_K gotoblas -> xamin_k | |||
| #define XMAX_K gotoblas -> xmax_k | |||
| #define XMIN_K gotoblas -> xmin_k | |||
| #define IXAMAX_K gotoblas -> ixamax_k | |||
| #define IXAMIN_K gotoblas -> ixamin_k | |||
| #define IXMAX_K gotoblas -> ixmax_k | |||
| #define IXMIN_K gotoblas -> ixmin_k | |||
| #define XASUM_K gotoblas -> xasum_k | |||
| #define XAXPYU_K gotoblas -> xaxpy_k | |||
| #define XAXPYC_K gotoblas -> xaxpyc_k | |||
| #define XCOPY_K gotoblas -> xcopy_k | |||
| #define XDOTU_K gotoblas -> xdotu_k | |||
| #define XDOTC_K gotoblas -> xdotc_k | |||
| #define XNRM2_K gotoblas -> xnrm2_k | |||
| #define XSCAL_K gotoblas -> xscal_k | |||
| #define XSWAP_K gotoblas -> xswap_k | |||
| #define XROT_K gotoblas -> xqrot_k | |||
| #define XGEMV_N gotoblas -> xgemv_n | |||
| #define XGEMV_T gotoblas -> xgemv_t | |||
| #define XGEMV_R gotoblas -> xgemv_r | |||
| #define XGEMV_C gotoblas -> xgemv_c | |||
| #define XGEMV_O gotoblas -> xgemv_o | |||
| #define XGEMV_U gotoblas -> xgemv_u | |||
| #define XGEMV_S gotoblas -> xgemv_s | |||
| #define XGEMV_D gotoblas -> xgemv_d | |||
| #define XGERU_K gotoblas -> xgeru_k | |||
| #define XGERC_K gotoblas -> xgerc_k | |||
| #define XGERV_K gotoblas -> xgerv_k | |||
| #define XGERD_K gotoblas -> xgerd_k | |||
| #define XSYMV_U gotoblas -> xsymv_U | |||
| #define XSYMV_L gotoblas -> xsymv_L | |||
| #define XHEMV_U gotoblas -> xhemv_U | |||
| #define XHEMV_L gotoblas -> xhemv_L | |||
| #define XHEMV_V gotoblas -> xhemv_V | |||
| #define XHEMV_M gotoblas -> xhemv_M | |||
| #define XSYMV_THREAD_U xsymv_thread_U | |||
| #define XSYMV_THREAD_L xsymv_thread_L | |||
| #define XHEMV_THREAD_U xhemv_thread_U | |||
| #define XHEMV_THREAD_L xhemv_thread_L | |||
| #define XHEMV_THREAD_V xhemv_thread_V | |||
| #define XHEMV_THREAD_M xhemv_thread_M | |||
| #define XGEMM_ONCOPY gotoblas -> xgemm_oncopy | |||
| #define XGEMM_OTCOPY gotoblas -> xgemm_otcopy | |||
| #define XGEMM_INCOPY gotoblas -> xgemm_incopy | |||
| #define XGEMM_ITCOPY gotoblas -> xgemm_itcopy | |||
| #define XTRMM_OUNUCOPY gotoblas -> xtrmm_ounucopy | |||
| #define XTRMM_OUTUCOPY gotoblas -> xtrmm_outucopy | |||
| #define XTRMM_OLNUCOPY gotoblas -> xtrmm_olnucopy | |||
| #define XTRMM_OLTUCOPY gotoblas -> xtrmm_oltucopy | |||
| #define XTRSM_OUNUCOPY gotoblas -> xtrsm_ounucopy | |||
| #define XTRSM_OUTUCOPY gotoblas -> xtrsm_outucopy | |||
| #define XTRSM_OLNUCOPY gotoblas -> xtrsm_olnucopy | |||
| #define XTRSM_OLTUCOPY gotoblas -> xtrsm_oltucopy | |||
| #define XTRMM_IUNUCOPY gotoblas -> xtrmm_iunucopy | |||
| #define XTRMM_IUTUCOPY gotoblas -> xtrmm_iutucopy | |||
| #define XTRMM_ILNUCOPY gotoblas -> xtrmm_ilnucopy | |||
| #define XTRMM_ILTUCOPY gotoblas -> xtrmm_iltucopy | |||
| #define XTRSM_IUNUCOPY gotoblas -> xtrsm_iunucopy | |||
| #define XTRSM_IUTUCOPY gotoblas -> xtrsm_iutucopy | |||
| #define XTRSM_ILNUCOPY gotoblas -> xtrsm_ilnucopy | |||
| #define XTRSM_ILTUCOPY gotoblas -> xtrsm_iltucopy | |||
| #define XTRMM_OUNNCOPY gotoblas -> xtrmm_ounncopy | |||
| #define XTRMM_OUTNCOPY gotoblas -> xtrmm_outncopy | |||
| #define XTRMM_OLNNCOPY gotoblas -> xtrmm_olnncopy | |||
| #define XTRMM_OLTNCOPY gotoblas -> xtrmm_oltncopy | |||
| #define XTRSM_OUNNCOPY gotoblas -> xtrsm_ounncopy | |||
| #define XTRSM_OUTNCOPY gotoblas -> xtrsm_outncopy | |||
| #define XTRSM_OLNNCOPY gotoblas -> xtrsm_olnncopy | |||
| #define XTRSM_OLTNCOPY gotoblas -> xtrsm_oltncopy | |||
| #define XTRMM_IUNNCOPY gotoblas -> xtrmm_iunncopy | |||
| #define XTRMM_IUTNCOPY gotoblas -> xtrmm_iutncopy | |||
| #define XTRMM_ILNNCOPY gotoblas -> xtrmm_ilnncopy | |||
| #define XTRMM_ILTNCOPY gotoblas -> xtrmm_iltncopy | |||
| #define XTRSM_IUNNCOPY gotoblas -> xtrsm_iunncopy | |||
| #define XTRSM_IUTNCOPY gotoblas -> xtrsm_iutncopy | |||
| #define XTRSM_ILNNCOPY gotoblas -> xtrsm_ilnncopy | |||
| #define XTRSM_ILTNCOPY gotoblas -> xtrsm_iltncopy | |||
| #define XGEMM_BETA gotoblas -> xgemm_beta | |||
| #define XGEMM_KERNEL_N gotoblas -> xgemm_kernel_n | |||
| #define XGEMM_KERNEL_L gotoblas -> xgemm_kernel_l | |||
| #define XGEMM_KERNEL_R gotoblas -> xgemm_kernel_r | |||
| #define XGEMM_KERNEL_B gotoblas -> xgemm_kernel_b | |||
| #define XTRMM_KERNEL_LN gotoblas -> xtrmm_kernel_LN | |||
| #define XTRMM_KERNEL_LT gotoblas -> xtrmm_kernel_LT | |||
| #define XTRMM_KERNEL_LR gotoblas -> xtrmm_kernel_LR | |||
| #define XTRMM_KERNEL_LC gotoblas -> xtrmm_kernel_LC | |||
| #define XTRMM_KERNEL_RN gotoblas -> xtrmm_kernel_RN | |||
| #define XTRMM_KERNEL_RT gotoblas -> xtrmm_kernel_RT | |||
| #define XTRMM_KERNEL_RR gotoblas -> xtrmm_kernel_RR | |||
| #define XTRMM_KERNEL_RC gotoblas -> xtrmm_kernel_RC | |||
| #define XTRSM_KERNEL_LN gotoblas -> xtrsm_kernel_LN | |||
| #define XTRSM_KERNEL_LT gotoblas -> xtrsm_kernel_LT | |||
| #define XTRSM_KERNEL_LR gotoblas -> xtrsm_kernel_LR | |||
| #define XTRSM_KERNEL_LC gotoblas -> xtrsm_kernel_LC | |||
| #define XTRSM_KERNEL_RN gotoblas -> xtrsm_kernel_RN | |||
| #define XTRSM_KERNEL_RT gotoblas -> xtrsm_kernel_RT | |||
| #define XTRSM_KERNEL_RR gotoblas -> xtrsm_kernel_RR | |||
| #define XTRSM_KERNEL_RC gotoblas -> xtrsm_kernel_RC | |||
| #define XSYMM_IUTCOPY gotoblas -> xsymm_iutcopy | |||
| #define XSYMM_ILTCOPY gotoblas -> xsymm_iltcopy | |||
| #define XSYMM_OUTCOPY gotoblas -> xsymm_outcopy | |||
| #define XSYMM_OLTCOPY gotoblas -> xsymm_oltcopy | |||
| #define XHEMM_OUTCOPY gotoblas -> xhemm_outcopy | |||
| #define XHEMM_OLTCOPY gotoblas -> xhemm_oltcopy | |||
| #define XHEMM_IUTCOPY gotoblas -> xhemm_iutcopy | |||
| #define XHEMM_ILTCOPY gotoblas -> xhemm_iltcopy | |||
| #define XGEMM3M_ONCOPYB gotoblas -> xgemm3m_oncopyb | |||
| #define XGEMM3M_ONCOPYR gotoblas -> xgemm3m_oncopyr | |||
| #define XGEMM3M_ONCOPYI gotoblas -> xgemm3m_oncopyi | |||
| #define XGEMM3M_OTCOPYB gotoblas -> xgemm3m_otcopyb | |||
| #define XGEMM3M_OTCOPYR gotoblas -> xgemm3m_otcopyr | |||
| #define XGEMM3M_OTCOPYI gotoblas -> xgemm3m_otcopyi | |||
| #define XGEMM3M_INCOPYB gotoblas -> xgemm3m_incopyb | |||
| #define XGEMM3M_INCOPYR gotoblas -> xgemm3m_incopyr | |||
| #define XGEMM3M_INCOPYI gotoblas -> xgemm3m_incopyi | |||
| #define XGEMM3M_ITCOPYB gotoblas -> xgemm3m_itcopyb | |||
| #define XGEMM3M_ITCOPYR gotoblas -> xgemm3m_itcopyr | |||
| #define XGEMM3M_ITCOPYI gotoblas -> xgemm3m_itcopyi | |||
| #define XSYMM3M_ILCOPYB gotoblas -> xsymm3m_ilcopyb | |||
| #define XSYMM3M_IUCOPYB gotoblas -> xsymm3m_iucopyb | |||
| #define XSYMM3M_ILCOPYR gotoblas -> xsymm3m_ilcopyr | |||
| #define XSYMM3M_IUCOPYR gotoblas -> xsymm3m_iucopyr | |||
| #define XSYMM3M_ILCOPYI gotoblas -> xsymm3m_ilcopyi | |||
| #define XSYMM3M_IUCOPYI gotoblas -> xsymm3m_iucopyi | |||
| #define XSYMM3M_OLCOPYB gotoblas -> xsymm3m_olcopyb | |||
| #define XSYMM3M_OUCOPYB gotoblas -> xsymm3m_oucopyb | |||
| #define XSYMM3M_OLCOPYR gotoblas -> xsymm3m_olcopyr | |||
| #define XSYMM3M_OUCOPYR gotoblas -> xsymm3m_oucopyr | |||
| #define XSYMM3M_OLCOPYI gotoblas -> xsymm3m_olcopyi | |||
| #define XSYMM3M_OUCOPYI gotoblas -> xsymm3m_oucopyi | |||
| #define XHEMM3M_ILCOPYB gotoblas -> xhemm3m_ilcopyb | |||
| #define XHEMM3M_IUCOPYB gotoblas -> xhemm3m_iucopyb | |||
| #define XHEMM3M_ILCOPYR gotoblas -> xhemm3m_ilcopyr | |||
| #define XHEMM3M_IUCOPYR gotoblas -> xhemm3m_iucopyr | |||
| #define XHEMM3M_ILCOPYI gotoblas -> xhemm3m_ilcopyi | |||
| #define XHEMM3M_IUCOPYI gotoblas -> xhemm3m_iucopyi | |||
| #define XHEMM3M_OLCOPYB gotoblas -> xhemm3m_olcopyb | |||
| #define XHEMM3M_OUCOPYB gotoblas -> xhemm3m_oucopyb | |||
| #define XHEMM3M_OLCOPYR gotoblas -> xhemm3m_olcopyr | |||
| #define XHEMM3M_OUCOPYR gotoblas -> xhemm3m_oucopyr | |||
| #define XHEMM3M_OLCOPYI gotoblas -> xhemm3m_olcopyi | |||
| #define XHEMM3M_OUCOPYI gotoblas -> xhemm3m_oucopyi | |||
| #define XGEMM3M_KERNEL gotoblas -> xgemm3m_kernel | |||
| #define XNEG_TCOPY gotoblas -> xneg_tcopy | |||
| #define XLASWP_NCOPY gotoblas -> xlaswp_ncopy | |||
| #endif | |||
| #define XGEMM_NN xgemm_nn | |||
| #define XGEMM_CN xgemm_cn | |||
| #define XGEMM_TN xgemm_tn | |||
| #define XGEMM_NC xgemm_nc | |||
| #define XGEMM_NT xgemm_nt | |||
| #define XGEMM_CC xgemm_cc | |||
| #define XGEMM_CT xgemm_ct | |||
| #define XGEMM_TC xgemm_tc | |||
| #define XGEMM_TT xgemm_tt | |||
| #define XGEMM_NR xgemm_nr | |||
| #define XGEMM_TR xgemm_tr | |||
| #define XGEMM_CR xgemm_cr | |||
| #define XGEMM_RN xgemm_rn | |||
| #define XGEMM_RT xgemm_rt | |||
| #define XGEMM_RC xgemm_rc | |||
| #define XGEMM_RR xgemm_rr | |||
| #define XSYMM_LU xsymm_LU | |||
| #define XSYMM_LL xsymm_LL | |||
| #define XSYMM_RU xsymm_RU | |||
| #define XSYMM_RL xsymm_RL | |||
| #define XHEMM_LU xhemm_LU | |||
| #define XHEMM_LL xhemm_LL | |||
| #define XHEMM_RU xhemm_RU | |||
| #define XHEMM_RL xhemm_RL | |||
| #define XSYRK_UN xsyrk_UN | |||
| #define XSYRK_UT xsyrk_UT | |||
| #define XSYRK_LN xsyrk_LN | |||
| #define XSYRK_LT xsyrk_LT | |||
| #define XSYRK_UR xsyrk_UN | |||
| #define XSYRK_UC xsyrk_UT | |||
| #define XSYRK_LR xsyrk_LN | |||
| #define XSYRK_LC xsyrk_LT | |||
| #define XSYRK_KERNEL_U xsyrk_kernel_U | |||
| #define XSYRK_KERNEL_L xsyrk_kernel_L | |||
| #define XHERK_UN xherk_UN | |||
| #define XHERK_LN xherk_LN | |||
| #define XHERK_UC xherk_UC | |||
| #define XHERK_LC xherk_LC | |||
| #define XHER2K_UN xher2k_UN | |||
| #define XHER2K_LN xher2k_LN | |||
| #define XHER2K_UC xher2k_UC | |||
| #define XHER2K_LC xher2k_LC | |||
| #define XSYR2K_UN xsyr2k_UN | |||
| #define XSYR2K_UT xsyr2k_UT | |||
| #define XSYR2K_LN xsyr2k_LN | |||
| #define XSYR2K_LT xsyr2k_LT | |||
| #define XSYR2K_UR xsyr2k_UN | |||
| #define XSYR2K_UC xsyr2k_UT | |||
| #define XSYR2K_LR xsyr2k_LN | |||
| #define XSYR2K_LC xsyr2k_LT | |||
| #define XSYR2K_KERNEL_U xsyr2k_kernel_U | |||
| #define XSYR2K_KERNEL_L xsyr2k_kernel_L | |||
| #define XTRMM_LNUU xtrmm_LNUU | |||
| #define XTRMM_LNUN xtrmm_LNUN | |||
| #define XTRMM_LNLU xtrmm_LNLU | |||
| #define XTRMM_LNLN xtrmm_LNLN | |||
| #define XTRMM_LTUU xtrmm_LTUU | |||
| #define XTRMM_LTUN xtrmm_LTUN | |||
| #define XTRMM_LTLU xtrmm_LTLU | |||
| #define XTRMM_LTLN xtrmm_LTLN | |||
| #define XTRMM_LRUU xtrmm_LRUU | |||
| #define XTRMM_LRUN xtrmm_LRUN | |||
| #define XTRMM_LRLU xtrmm_LRLU | |||
| #define XTRMM_LRLN xtrmm_LRLN | |||
| #define XTRMM_LCUU xtrmm_LCUU | |||
| #define XTRMM_LCUN xtrmm_LCUN | |||
| #define XTRMM_LCLU xtrmm_LCLU | |||
| #define XTRMM_LCLN xtrmm_LCLN | |||
| #define XTRMM_RNUU xtrmm_RNUU | |||
| #define XTRMM_RNUN xtrmm_RNUN | |||
| #define XTRMM_RNLU xtrmm_RNLU | |||
| #define XTRMM_RNLN xtrmm_RNLN | |||
| #define XTRMM_RTUU xtrmm_RTUU | |||
| #define XTRMM_RTUN xtrmm_RTUN | |||
| #define XTRMM_RTLU xtrmm_RTLU | |||
| #define XTRMM_RTLN xtrmm_RTLN | |||
| #define XTRMM_RRUU xtrmm_RRUU | |||
| #define XTRMM_RRUN xtrmm_RRUN | |||
| #define XTRMM_RRLU xtrmm_RRLU | |||
| #define XTRMM_RRLN xtrmm_RRLN | |||
| #define XTRMM_RCUU xtrmm_RCUU | |||
| #define XTRMM_RCUN xtrmm_RCUN | |||
| #define XTRMM_RCLU xtrmm_RCLU | |||
| #define XTRMM_RCLN xtrmm_RCLN | |||
| #define XTRSM_LNUU xtrsm_LNUU | |||
| #define XTRSM_LNUN xtrsm_LNUN | |||
| #define XTRSM_LNLU xtrsm_LNLU | |||
| #define XTRSM_LNLN xtrsm_LNLN | |||
| #define XTRSM_LTUU xtrsm_LTUU | |||
| #define XTRSM_LTUN xtrsm_LTUN | |||
| #define XTRSM_LTLU xtrsm_LTLU | |||
| #define XTRSM_LTLN xtrsm_LTLN | |||
| #define XTRSM_LRUU xtrsm_LRUU | |||
| #define XTRSM_LRUN xtrsm_LRUN | |||
| #define XTRSM_LRLU xtrsm_LRLU | |||
| #define XTRSM_LRLN xtrsm_LRLN | |||
| #define XTRSM_LCUU xtrsm_LCUU | |||
| #define XTRSM_LCUN xtrsm_LCUN | |||
| #define XTRSM_LCLU xtrsm_LCLU | |||
| #define XTRSM_LCLN xtrsm_LCLN | |||
| #define XTRSM_RNUU xtrsm_RNUU | |||
| #define XTRSM_RNUN xtrsm_RNUN | |||
| #define XTRSM_RNLU xtrsm_RNLU | |||
| #define XTRSM_RNLN xtrsm_RNLN | |||
| #define XTRSM_RTUU xtrsm_RTUU | |||
| #define XTRSM_RTUN xtrsm_RTUN | |||
| #define XTRSM_RTLU xtrsm_RTLU | |||
| #define XTRSM_RTLN xtrsm_RTLN | |||
| #define XTRSM_RRUU xtrsm_RRUU | |||
| #define XTRSM_RRUN xtrsm_RRUN | |||
| #define XTRSM_RRLU xtrsm_RRLU | |||
| #define XTRSM_RRLN xtrsm_RRLN | |||
| #define XTRSM_RCUU xtrsm_RCUU | |||
| #define XTRSM_RCUN xtrsm_RCUN | |||
| #define XTRSM_RCLU xtrsm_RCLU | |||
| #define XTRSM_RCLN xtrsm_RCLN | |||
| #define XGEMM_THREAD_NN xgemm_thread_nn | |||
| #define XGEMM_THREAD_CN xgemm_thread_cn | |||
| #define XGEMM_THREAD_TN xgemm_thread_tn | |||
| #define XGEMM_THREAD_NC xgemm_thread_nc | |||
| #define XGEMM_THREAD_NT xgemm_thread_nt | |||
| #define XGEMM_THREAD_CC xgemm_thread_cc | |||
| #define XGEMM_THREAD_CT xgemm_thread_ct | |||
| #define XGEMM_THREAD_TC xgemm_thread_tc | |||
| #define XGEMM_THREAD_TT xgemm_thread_tt | |||
| #define XGEMM_THREAD_NR xgemm_thread_nr | |||
| #define XGEMM_THREAD_TR xgemm_thread_tr | |||
| #define XGEMM_THREAD_CR xgemm_thread_cr | |||
| #define XGEMM_THREAD_RN xgemm_thread_rn | |||
| #define XGEMM_THREAD_RT xgemm_thread_rt | |||
| #define XGEMM_THREAD_RC xgemm_thread_rc | |||
| #define XGEMM_THREAD_RR xgemm_thread_rr | |||
| #define XSYMM_THREAD_LU xsymm_thread_LU | |||
| #define XSYMM_THREAD_LL xsymm_thread_LL | |||
| #define XSYMM_THREAD_RU xsymm_thread_RU | |||
| #define XSYMM_THREAD_RL xsymm_thread_RL | |||
| #define XHEMM_THREAD_LU xhemm_thread_LU | |||
| #define XHEMM_THREAD_LL xhemm_thread_LL | |||
| #define XHEMM_THREAD_RU xhemm_thread_RU | |||
| #define XHEMM_THREAD_RL xhemm_thread_RL | |||
| #define XSYRK_THREAD_UN xsyrk_thread_UN | |||
| #define XSYRK_THREAD_UT xsyrk_thread_UT | |||
| #define XSYRK_THREAD_LN xsyrk_thread_LN | |||
| #define XSYRK_THREAD_LT xsyrk_thread_LT | |||
| #define XSYRK_THREAD_UR xsyrk_thread_UN | |||
| #define XSYRK_THREAD_UC xsyrk_thread_UT | |||
| #define XSYRK_THREAD_LR xsyrk_thread_LN | |||
| #define XSYRK_THREAD_LC xsyrk_thread_LT | |||
| #define XHERK_THREAD_UN xherk_thread_UN | |||
| #define XHERK_THREAD_UT xherk_thread_UT | |||
| #define XHERK_THREAD_LN xherk_thread_LN | |||
| #define XHERK_THREAD_LT xherk_thread_LT | |||
| #define XHERK_THREAD_UR xherk_thread_UR | |||
| #define XHERK_THREAD_UC xherk_thread_UC | |||
| #define XHERK_THREAD_LR xherk_thread_LR | |||
| #define XHERK_THREAD_LC xherk_thread_LC | |||
| #define XGEMM3M_NN xgemm3m_nn | |||
| #define XGEMM3M_CN xgemm3m_cn | |||
| #define XGEMM3M_TN xgemm3m_tn | |||
| #define XGEMM3M_NC xgemm3m_nc | |||
| #define XGEMM3M_NT xgemm3m_nt | |||
| #define XGEMM3M_CC xgemm3m_cc | |||
| #define XGEMM3M_CT xgemm3m_ct | |||
| #define XGEMM3M_TC xgemm3m_tc | |||
| #define XGEMM3M_TT xgemm3m_tt | |||
| #define XGEMM3M_NR xgemm3m_nr | |||
| #define XGEMM3M_TR xgemm3m_tr | |||
| #define XGEMM3M_CR xgemm3m_cr | |||
| #define XGEMM3M_RN xgemm3m_rn | |||
| #define XGEMM3M_RT xgemm3m_rt | |||
| #define XGEMM3M_RC xgemm3m_rc | |||
| #define XGEMM3M_RR xgemm3m_rr | |||
| #define XGEMM3M_THREAD_NN xgemm3m_thread_nn | |||
| #define XGEMM3M_THREAD_CN xgemm3m_thread_cn | |||
| #define XGEMM3M_THREAD_TN xgemm3m_thread_tn | |||
| #define XGEMM3M_THREAD_NC xgemm3m_thread_nc | |||
| #define XGEMM3M_THREAD_NT xgemm3m_thread_nt | |||
| #define XGEMM3M_THREAD_CC xgemm3m_thread_cc | |||
| #define XGEMM3M_THREAD_CT xgemm3m_thread_ct | |||
| #define XGEMM3M_THREAD_TC xgemm3m_thread_tc | |||
| #define XGEMM3M_THREAD_TT xgemm3m_thread_tt | |||
| #define XGEMM3M_THREAD_NR xgemm3m_thread_nr | |||
| #define XGEMM3M_THREAD_TR xgemm3m_thread_tr | |||
| #define XGEMM3M_THREAD_CR xgemm3m_thread_cr | |||
| #define XGEMM3M_THREAD_RN xgemm3m_thread_rn | |||
| #define XGEMM3M_THREAD_RT xgemm3m_thread_rt | |||
| #define XGEMM3M_THREAD_RC xgemm3m_thread_rc | |||
| #define XGEMM3M_THREAD_RR xgemm3m_thread_rr | |||
| #define XSYMM3M_LU xsymm3m_LU | |||
| #define XSYMM3M_LL xsymm3m_LL | |||
| #define XSYMM3M_RU xsymm3m_RU | |||
| #define XSYMM3M_RL xsymm3m_RL | |||
| #define XSYMM3M_THREAD_LU xsymm3m_thread_LU | |||
| #define XSYMM3M_THREAD_LL xsymm3m_thread_LL | |||
| #define XSYMM3M_THREAD_RU xsymm3m_thread_RU | |||
| #define XSYMM3M_THREAD_RL xsymm3m_thread_RL | |||
| #define XHEMM3M_LU xhemm3m_LU | |||
| #define XHEMM3M_LL xhemm3m_LL | |||
| #define XHEMM3M_RU xhemm3m_RU | |||
| #define XHEMM3M_RL xhemm3m_RL | |||
| #define XHEMM3M_THREAD_LU xhemm3m_thread_LU | |||
| #define XHEMM3M_THREAD_LL xhemm3m_thread_LL | |||
| #define XHEMM3M_THREAD_RU xhemm3m_thread_RU | |||
| #define XHEMM3M_THREAD_RL xhemm3m_thread_RL | |||
| #endif | |||
| @@ -0,0 +1,359 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_X86 | |||
| #define COMMON_X86 | |||
| #ifndef ASSEMBLER | |||
| #define MB | |||
| #define WMB | |||
| #ifdef C_SUN | |||
| #define __asm__ __asm | |||
| #define __volatile__ | |||
| #endif | |||
| static void __inline blas_lock(volatile BLASULONG *address){ | |||
| int ret; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| __asm__ __volatile__( | |||
| "xchgl %0, %1\n" | |||
| : "=r"(ret), "=m"(*address) | |||
| : "0"(1), "m"(*address) | |||
| : "memory"); | |||
| } while (ret); | |||
| } | |||
| static __inline unsigned long long rpcc(void){ | |||
| unsigned int a, d; | |||
| __asm__ __volatile__ ("rdtsc" : "=a" (a), "=d" (d)); | |||
| return ((unsigned long long)a + ((unsigned long long)d << 32)); | |||
| }; | |||
| static __inline unsigned long getstackaddr(void){ | |||
| unsigned long addr; | |||
| __asm__ __volatile__ ("mov %%esp, %0" | |||
| : "=r"(addr) : : "memory"); | |||
| return addr; | |||
| }; | |||
| static __inline long double sqrt_long(long double val) { | |||
| long double result; | |||
| __asm__ __volatile__ ("fldt %1\n" | |||
| "fsqrt\n" | |||
| "fstpt %0\n" : "=m" (result) : "m"(val)); | |||
| return result; | |||
| } | |||
| #define SQRT(a) sqrt_long(a) | |||
| /* This is due to gcc's bug */ | |||
| void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx); | |||
| #define WHEREAMI | |||
| static inline int WhereAmI(void){ | |||
| int eax, ebx, ecx, edx; | |||
| int apicid; | |||
| cpuid(1, &eax, &ebx, &ecx, &edx); | |||
| apicid = BITMASK(ebx, 24, 0xff); | |||
| return apicid; | |||
| } | |||
| #ifdef ENABLE_SSE_EXCEPTION | |||
| #define IDEBUG_START \ | |||
| { \ | |||
| unsigned int fp_sse_mode, new_fp_mode; \ | |||
| __asm__ __volatile__ ("stmxcsr %0" : "=m" (fp_sse_mode) : ); \ | |||
| new_fp_mode = fp_sse_mode & ~0xd00; \ | |||
| __asm__ __volatile__ ("ldmxcsr %0" : : "m" (new_fp_mode) ); | |||
| #define IDEBUG_END \ | |||
| __asm__ __volatile__ ("ldmxcsr %0" : : "m" (fp_sse_mode) ); \ | |||
| } | |||
| #endif | |||
| #ifdef XDOUBLE | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fstpt %0" : "=m"(res) : : "memory") | |||
| #elif defined(DOUBLE) | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fstpl %0" : "=m"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fstps %0" : "=m"(res) : : "memory"); | |||
| #endif | |||
| #define GET_IMAGE_CANCEL __asm__ __volatile__ ("ffree %st") | |||
| #ifdef SMP | |||
| extern unsigned int blas_quick_divide_table[]; | |||
| static __inline int blas_quickdivide(unsigned int x, unsigned int y){ | |||
| unsigned int result; | |||
| if (y <= 1) return x; | |||
| y = blas_quick_divide_table[y]; | |||
| __asm__ __volatile__ ("mull %0" :"=d" (result) :"a"(x), "0" (y)); | |||
| return result; | |||
| } | |||
| #endif | |||
| #endif | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE ( 4 << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE ( 4 << 20) | |||
| #define BUFFER_SIZE (16 << 20) | |||
| #define SEEK_ADDRESS | |||
| #if defined(DOUBLE) || defined(XDOUBLE) | |||
| #define MMXLOAD movq | |||
| #define MMXSTORE movq | |||
| #else | |||
| #define MMXLOAD movd | |||
| #define MMXSTORE movd | |||
| #endif | |||
| #if defined(HAVE_3DNOW) | |||
| #define EMMS femms | |||
| #elif defined(HAVE_MMX) | |||
| #define EMMS emms | |||
| #endif | |||
| #ifndef EMMS | |||
| #define EMMS | |||
| #endif | |||
| #if defined(CORE2) || defined(PENTIUM4) | |||
| #define movapd movaps | |||
| #endif | |||
| #define BRANCH .byte 0x3e | |||
| #define NOBRANCH .byte 0x2e | |||
| #define PADDING .byte 0x66; | |||
| #define HALT hlt | |||
| #ifndef COMPLEX | |||
| #ifdef XDOUBLE | |||
| #define LOCAL_BUFFER_SIZE QLOCAL_BUFFER_SIZE | |||
| #elif defined DOUBLE | |||
| #define LOCAL_BUFFER_SIZE DLOCAL_BUFFER_SIZE | |||
| #else | |||
| #define LOCAL_BUFFER_SIZE SLOCAL_BUFFER_SIZE | |||
| #endif | |||
| #else | |||
| #ifdef XDOUBLE | |||
| #define LOCAL_BUFFER_SIZE XLOCAL_BUFFER_SIZE | |||
| #elif defined DOUBLE | |||
| #define LOCAL_BUFFER_SIZE ZLOCAL_BUFFER_SIZE | |||
| #else | |||
| #define LOCAL_BUFFER_SIZE CLOCAL_BUFFER_SIZE | |||
| #endif | |||
| #endif | |||
| #if defined(OS_WINDOWS) | |||
| #if LOCAL_BUFFER_SIZE > 16384 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 4(%esp);\ | |||
| movl $0, 4096 * 3(%esp);\ | |||
| movl $0, 4096 * 2(%esp);\ | |||
| movl $0, 4096 * 1(%esp); | |||
| #elif LOCAL_BUFFER_SIZE > 12288 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 3(%esp);\ | |||
| movl $0, 4096 * 2(%esp);\ | |||
| movl $0, 4096 * 1(%esp); | |||
| #elif LOCAL_BUFFER_SIZE > 8192 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 2(%esp);\ | |||
| movl $0, 4096 * 1(%esp); | |||
| #elif LOCAL_BUFFER_SIZE > 4096 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 1(%esp); | |||
| #else | |||
| #define STACK_TOUCHING | |||
| #endif | |||
| #else | |||
| #define STACK_TOUCHING | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #if defined(F_INTERFACE_PATHSCALE) || defined(F_INTERFACE_OPEN64) | |||
| #define RETURN_BY_STRUCT | |||
| #elif defined(F_INTERFACE_GFORT) || defined(F_INTERFACE_G95) | |||
| #define RETURN_BY_COMPLEX | |||
| #else | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef OS_DARWIN | |||
| #define PROLOGUE .text;.align 5; .globl REALNAME; REALNAME: | |||
| #define EPILOGUE .subsections_via_symbols | |||
| #define PROFCODE | |||
| #endif | |||
| #if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_INERIX) | |||
| #define SAVEREGISTERS \ | |||
| subl $32, %esp;\ | |||
| movups %xmm6, 0(%esp);\ | |||
| movups %xmm7, 16(%esp) | |||
| #define RESTOREREGISTERS \ | |||
| movups 0(%esp), %xmm6;\ | |||
| movups 16(%esp), %xmm7;\ | |||
| addl $32, %esp | |||
| #else | |||
| #define SAVEREGISTERS | |||
| #define RESTOREREGISTERS | |||
| #endif | |||
| #if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_INERIX) | |||
| #define PROLOGUE \ | |||
| .text; \ | |||
| .align 16; \ | |||
| .globl REALNAME ;\ | |||
| .def REALNAME;.scl 2;.type 32;.endef; \ | |||
| REALNAME: | |||
| #define PROFCODE | |||
| #define EPILOGUE .end REALNAME | |||
| #endif | |||
| #if defined(OS_LINUX) || defined(OS_FreeBSD) || defined(OS_NetBSD) || defined(__ELF__) | |||
| #define PROLOGUE \ | |||
| .text; \ | |||
| .align 16; \ | |||
| .globl REALNAME ;\ | |||
| .type REALNAME, @function; \ | |||
| REALNAME: | |||
| #ifdef PROFILE | |||
| #define PROFCODE call mcount | |||
| #else | |||
| #define PROFCODE | |||
| #endif | |||
| #define EPILOGUE .size REALNAME, .-REALNAME | |||
| #endif | |||
| #ifdef XDOUBLE | |||
| #define FLD fldt | |||
| #define FST fstpt | |||
| #define FSTU fstt | |||
| #define FMUL fmult | |||
| #define FADD faddt | |||
| #define FSUB fsubt | |||
| #define FSUBR fsubrt | |||
| #elif defined(DOUBLE) | |||
| #define FLD fldl | |||
| #define FST fstpl | |||
| #define FSTU fstl | |||
| #define FMUL fmull | |||
| #define FADD faddl | |||
| #define FSUB fsubl | |||
| #define FSUBR fsubrl | |||
| #else | |||
| #define FLD flds | |||
| #define FST fstps | |||
| #define FSTU fsts | |||
| #define FMUL fmuls | |||
| #define FADD fadds | |||
| #define FSUB fsubs | |||
| #define FSUBR fsubrs | |||
| #endif | |||
| #endif | |||
| #ifdef C_SUN | |||
| #define ffreep fstp | |||
| #endif | |||
| #ifdef __APPLE__ | |||
| #define ALIGN_2 .align 2 | |||
| #define ALIGN_3 .align 3 | |||
| #define ALIGN_4 .align 4 | |||
| #define ffreep fstp | |||
| #endif | |||
| #ifndef ALIGN_2 | |||
| #define ALIGN_2 .align 4 | |||
| #endif | |||
| #ifndef ALIGN_3 | |||
| #define ALIGN_3 .align 8 | |||
| #endif | |||
| #ifndef ALIGN_4 | |||
| #define ALIGN_4 .align 16 | |||
| #endif | |||
| #ifndef ALIGN_5 | |||
| #define ALIGN_5 .align 32 | |||
| #endif | |||
| #ifndef ALIGN_6 | |||
| #define ALIGN_6 .align 64 | |||
| #endif | |||
| @@ -0,0 +1,451 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef COMMON_X86 | |||
| #define COMMON_X86 | |||
| #ifndef ASSEMBLER | |||
| #ifdef C_SUN | |||
| #define __asm__ __asm | |||
| #define __volatile__ | |||
| #endif | |||
| #ifdef HAVE_SSE2 | |||
| #define MB __asm__ __volatile__ ("mfence"); | |||
| #define WMB __asm__ __volatile__ ("sfence"); | |||
| #else | |||
| #define MB | |||
| #define WMB | |||
| #endif | |||
| static void __inline blas_lock(volatile BLASULONG *address){ | |||
| int ret; | |||
| do { | |||
| while (*address) {YIELDING;}; | |||
| __asm__ __volatile__( | |||
| "xchgl %0, %1\n" | |||
| : "=r"(ret), "=m"(*address) | |||
| : "0"(1), "m"(*address) | |||
| : "memory"); | |||
| } while (ret); | |||
| } | |||
| static __inline BLASULONG rpcc(void){ | |||
| BLASULONG a, d; | |||
| __asm__ __volatile__ ("rdtsc" : "=a" (a), "=d" (d)); | |||
| return ((BLASULONG)a + ((BLASULONG)d << 32)); | |||
| } | |||
| #define RPCC64BIT | |||
| static __inline BLASULONG getstackaddr(void){ | |||
| BLASULONG addr; | |||
| __asm__ __volatile__ ("movq %%rsp, %0" | |||
| : "=r"(addr) : : "memory"); | |||
| return addr; | |||
| } | |||
| static __inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){ | |||
| __asm__ __volatile__("cpuid" | |||
| : "=a" (*eax), | |||
| "=b" (*ebx), | |||
| "=c" (*ecx), | |||
| "=d" (*edx) | |||
| : "0" (op)); | |||
| } | |||
| #define WHEREAMI | |||
| static inline int WhereAmI(void){ | |||
| int eax, ebx, ecx, edx; | |||
| int apicid; | |||
| cpuid(1, &eax, &ebx, &ecx, &edx); | |||
| apicid = BITMASK(ebx, 24, 0xff); | |||
| return apicid; | |||
| } | |||
| #ifdef CORE_BARCELONA | |||
| #define IFLUSH gotoblas_iflush() | |||
| #define IFLUSH_HALF gotoblas_iflush_half() | |||
| #endif | |||
| #ifdef ENABLE_SSE_EXCEPTION | |||
| #define IDEBUG_START \ | |||
| { \ | |||
| unsigned int fp_sse_mode, new_fp_mode; \ | |||
| __asm__ __volatile__ ("stmxcsr %0" : "=m" (fp_sse_mode) : ); \ | |||
| new_fp_mode = fp_sse_mode & ~0xd00; \ | |||
| __asm__ __volatile__ ("ldmxcsr %0" : : "m" (new_fp_mode) ); | |||
| #define IDEBUG_END \ | |||
| __asm__ __volatile__ ("ldmxcsr %0" : : "m" (fp_sse_mode) ); \ | |||
| } | |||
| #endif | |||
| #ifdef XDOUBLE | |||
| #define GET_IMAGE(res) __asm__ __volatile__("fstpt %0" : "=m"(res) : : "memory") | |||
| #elif defined(DOUBLE) | |||
| #define GET_IMAGE(res) __asm__ __volatile__("movsd %%xmm1, %0" : "=m"(res) : : "memory") | |||
| #else | |||
| #define GET_IMAGE(res) __asm__ __volatile__("movss %%xmm1, %0" : "=m"(res) : : "memory") | |||
| #endif | |||
| #define GET_IMAGE_CANCEL | |||
| #ifdef SMP | |||
| #ifdef USE64BITINT | |||
| static __inline blasint blas_quickdivide(blasint x, blasint y){ | |||
| return x / y; | |||
| } | |||
| #else | |||
| extern unsigned int blas_quick_divide_table[]; | |||
| static __inline int blas_quickdivide(unsigned int x, unsigned int y){ | |||
| unsigned int result; | |||
| if (y <= 1) return x; | |||
| y = blas_quick_divide_table[y]; | |||
| __asm__ __volatile__ ("mull %0" :"=d" (result) :"a"(x), "0" (y)); | |||
| return result; | |||
| } | |||
| #endif | |||
| #endif | |||
| #endif | |||
| #ifndef PAGESIZE | |||
| #define PAGESIZE ( 4 << 10) | |||
| #endif | |||
| #define HUGE_PAGESIZE ( 2 << 20) | |||
| #define BUFFER_SIZE (32 << 20) | |||
| #define SEEK_ADDRESS | |||
| #ifdef F_INTERFACE_G77 | |||
| #define RETURN_BY_STACK | |||
| #define NEED_F2CCONV | |||
| #endif | |||
| #ifdef F_INTERFACE_G95 | |||
| #define RETURN_BY_PACKED | |||
| #endif | |||
| #ifdef F_INTERFACE_GFORT | |||
| #ifdef OS_WINDOWS | |||
| #ifndef DOUBLE | |||
| #define RETURN_BY_REGS | |||
| #else | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #else | |||
| #define RETURN_BY_PACKED | |||
| #endif | |||
| #endif | |||
| #ifdef F_INTERFACE_INTEL | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef F_INTERFACE_FUJITSU | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef F_INTERFACE_PGI | |||
| #define RETURN_BY_STACK | |||
| #endif | |||
| #ifdef F_INTERFACE_PATHSCALE | |||
| #define RETURN_BY_PACKED | |||
| #endif | |||
| #ifdef F_INTERFACE_SUN | |||
| #define RETURN_BY_PACKED | |||
| #endif | |||
| #ifdef ASSEMBLER | |||
| #if defined(HAVE_3DNOW) | |||
| #define EMMS femms | |||
| #elif defined(HAVE_MMX) | |||
| #define EMMS emms | |||
| #endif | |||
| #ifndef EMMS | |||
| #define EMMS | |||
| #endif | |||
| #define BRANCH .byte 0x3e | |||
| #define NOBRANCH .byte 0x2e | |||
| #define PADDING .byte 0x66 | |||
| #ifdef OS_WINDOWS | |||
| #define ARG1 %rcx | |||
| #define ARG2 %rdx | |||
| #define ARG3 %r8 | |||
| #define ARG4 %r9 | |||
| #else | |||
| #define ARG1 %rdi | |||
| #define ARG2 %rsi | |||
| #define ARG3 %rdx | |||
| #define ARG4 %rcx | |||
| #define ARG5 %r8 | |||
| #define ARG6 %r9 | |||
| #endif | |||
| #ifndef COMPLEX | |||
| #ifdef XDOUBLE | |||
| #define LOCAL_BUFFER_SIZE QLOCAL_BUFFER_SIZE | |||
| #elif defined DOUBLE | |||
| #define LOCAL_BUFFER_SIZE DLOCAL_BUFFER_SIZE | |||
| #else | |||
| #define LOCAL_BUFFER_SIZE SLOCAL_BUFFER_SIZE | |||
| #endif | |||
| #else | |||
| #ifdef XDOUBLE | |||
| #define LOCAL_BUFFER_SIZE XLOCAL_BUFFER_SIZE | |||
| #elif defined DOUBLE | |||
| #define LOCAL_BUFFER_SIZE ZLOCAL_BUFFER_SIZE | |||
| #else | |||
| #define LOCAL_BUFFER_SIZE CLOCAL_BUFFER_SIZE | |||
| #endif | |||
| #endif | |||
| #if defined(OS_WINDOWS) | |||
| #if LOCAL_BUFFER_SIZE > 16384 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 4(%rsp);\ | |||
| movl $0, 4096 * 3(%rsp);\ | |||
| movl $0, 4096 * 2(%rsp);\ | |||
| movl $0, 4096 * 1(%rsp); | |||
| #elif LOCAL_BUFFER_SIZE > 12288 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 3(%rsp);\ | |||
| movl $0, 4096 * 2(%rsp);\ | |||
| movl $0, 4096 * 1(%rsp); | |||
| #elif LOCAL_BUFFER_SIZE > 8192 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 2(%rsp);\ | |||
| movl $0, 4096 * 1(%rsp); | |||
| #elif LOCAL_BUFFER_SIZE > 4096 | |||
| #define STACK_TOUCHING \ | |||
| movl $0, 4096 * 1(%rsp); | |||
| #else | |||
| #define STACK_TOUCHING | |||
| #endif | |||
| #else | |||
| #define STACK_TOUCHING | |||
| #endif | |||
| #if defined(CORE2) | |||
| #define movapd movaps | |||
| #define andpd andps | |||
| #define movlpd movlps | |||
| #define movhpd movhps | |||
| #endif | |||
| #ifndef F_INTERFACE | |||
| #define REALNAME ASMNAME | |||
| #else | |||
| #define REALNAME ASMFNAME | |||
| #endif | |||
| #ifdef OS_DARWIN | |||
| #define PROLOGUE .text;.align 5; .globl REALNAME; REALNAME: | |||
| #define EPILOGUE .subsections_via_symbols | |||
| #define PROFCODE | |||
| #endif | |||
| #ifdef OS_WINDOWS | |||
| #define SAVEREGISTERS \ | |||
| subq $256, %rsp;\ | |||
| movups %xmm6, 0(%rsp);\ | |||
| movups %xmm7, 16(%rsp);\ | |||
| movups %xmm8, 32(%rsp);\ | |||
| movups %xmm9, 48(%rsp);\ | |||
| movups %xmm10, 64(%rsp);\ | |||
| movups %xmm11, 80(%rsp);\ | |||
| movups %xmm12, 96(%rsp);\ | |||
| movups %xmm13, 112(%rsp);\ | |||
| movups %xmm14, 128(%rsp);\ | |||
| movups %xmm15, 144(%rsp) | |||
| #define RESTOREREGISTERS \ | |||
| movups 0(%rsp), %xmm6;\ | |||
| movups 16(%rsp), %xmm7;\ | |||
| movups 32(%rsp), %xmm8;\ | |||
| movups 48(%rsp), %xmm9;\ | |||
| movups 64(%rsp), %xmm10;\ | |||
| movups 80(%rsp), %xmm11;\ | |||
| movups 96(%rsp), %xmm12;\ | |||
| movups 112(%rsp), %xmm13;\ | |||
| movups 128(%rsp), %xmm14;\ | |||
| movups 144(%rsp), %xmm15;\ | |||
| addq $256, %rsp | |||
| #else | |||
| #define SAVEREGISTERS | |||
| #define RESTOREREGISTERS | |||
| #endif | |||
| #if defined(OS_WINDOWS) && !defined(C_PGI) | |||
| #define PROLOGUE \ | |||
| .text; \ | |||
| .align 16; \ | |||
| .globl REALNAME ;\ | |||
| .def REALNAME;.scl 2;.type 32;.endef; \ | |||
| REALNAME: | |||
| #define PROFCODE | |||
| #define EPILOGUE .end REALNAME | |||
| #endif | |||
| #if defined(OS_LINUX) || defined(OS_FreeBSD) || defined(OS_NetBSD) || defined(__ELF__) || defined(C_PGI) | |||
| #define PROLOGUE \ | |||
| .text; \ | |||
| .align 512; \ | |||
| .globl REALNAME ;\ | |||
| .type REALNAME, @function; \ | |||
| REALNAME: | |||
| #ifdef PROFILE | |||
| #define PROFCODE call *mcount@GOTPCREL(%rip) | |||
| #else | |||
| #define PROFCODE | |||
| #endif | |||
| #define EPILOGUE .size REALNAME, .-REALNAME | |||
| #endif | |||
| #endif | |||
| #ifdef XDOUBLE | |||
| #define FLD fldt | |||
| #define FST fstpt | |||
| #define MOVQ movq | |||
| #elif defined(DOUBLE) | |||
| #define FLD fldl | |||
| #define FST fstpl | |||
| #define FSTU fstl | |||
| #define FMUL fmull | |||
| #define FADD faddl | |||
| #define MOVSD movsd | |||
| #define MULSD mulsd | |||
| #define MULPD mulpd | |||
| #define CMPEQPD cmpeqpd | |||
| #define COMISD comisd | |||
| #define PSRLQ psrlq | |||
| #define ANDPD andpd | |||
| #define ADDPD addpd | |||
| #define ADDSD addsd | |||
| #define SUBPD subpd | |||
| #define SUBSD subsd | |||
| #define MOVQ movq | |||
| #define MOVUPD movupd | |||
| #define XORPD xorpd | |||
| #else | |||
| #define FLD flds | |||
| #define FST fstps | |||
| #define FSTU fsts | |||
| #define FMUL fmuls | |||
| #define FADD fadds | |||
| #define MOVSD movss | |||
| #define MULSD mulss | |||
| #define MULPD mulps | |||
| #define CMPEQPD cmpeqps | |||
| #define COMISD comiss | |||
| #define PSRLQ psrld | |||
| #define ANDPD andps | |||
| #define ADDPD addps | |||
| #define ADDSD addss | |||
| #define SUBPD subps | |||
| #define SUBSD subss | |||
| #define MOVQ movd | |||
| #define MOVUPD movups | |||
| #define XORPD xorps | |||
| #endif | |||
| #define HALT hlt | |||
| #ifdef OS_DARWIN | |||
| #define ALIGN_2 .align 2 | |||
| #define ALIGN_3 .align 3 | |||
| #define ALIGN_4 .align 4 | |||
| #define ffreep fstp | |||
| #endif | |||
| #ifndef ALIGN_2 | |||
| #define ALIGN_2 .align 4 | |||
| #endif | |||
| #ifndef ALIGN_3 | |||
| #define ALIGN_3 .align 8 | |||
| #endif | |||
| #ifndef ALIGN_4 | |||
| #define ALIGN_4 .align 16 | |||
| #endif | |||
| #ifndef ALIGN_5 | |||
| #define ALIGN_5 .align 32 | |||
| #endif | |||
| #ifndef ALIGN_6 | |||
| #define ALIGN_6 .align 64 | |||
| #endif | |||
| #endif | |||
| @@ -0,0 +1,611 @@ | |||
| #ifndef COMMON_Z_H | |||
| #define COMMON_Z_H | |||
| #ifndef DYNAMIC_ARCH | |||
| #define ZAMAX_K zamax_k | |||
| #define ZAMIN_K zamin_k | |||
| #define ZMAX_K zmax_k | |||
| #define ZMIN_K zmin_k | |||
| #define IZAMAX_K izamax_k | |||
| #define IZAMIN_K izamin_k | |||
| #define IZMAX_K izmax_k | |||
| #define IZMIN_K izmin_k | |||
| #define ZASUM_K zasum_k | |||
| #define ZAXPYU_K zaxpy_k | |||
| #define ZAXPYC_K zaxpyc_k | |||
| #define ZCOPY_K zcopy_k | |||
| #define ZDOTU_K zdotu_k | |||
| #define ZDOTC_K zdotc_k | |||
| #define ZNRM2_K znrm2_k | |||
| #define ZSCAL_K zscal_k | |||
| #define ZSWAP_K zswap_k | |||
| #define ZROT_K zdrot_k | |||
| #define ZGEMV_N zgemv_n | |||
| #define ZGEMV_T zgemv_t | |||
| #define ZGEMV_R zgemv_r | |||
| #define ZGEMV_C zgemv_c | |||
| #define ZGEMV_O zgemv_o | |||
| #define ZGEMV_U zgemv_u | |||
| #define ZGEMV_S zgemv_s | |||
| #define ZGEMV_D zgemv_d | |||
| #define ZGERU_K zgeru_k | |||
| #define ZGERC_K zgerc_k | |||
| #define ZGERV_K zgerv_k | |||
| #define ZGERD_K zgerd_k | |||
| #define ZSYMV_U zsymv_U | |||
| #define ZSYMV_L zsymv_L | |||
| #define ZHEMV_U zhemv_U | |||
| #define ZHEMV_L zhemv_L | |||
| #define ZHEMV_V zhemv_V | |||
| #define ZHEMV_M zhemv_M | |||
| #define ZSYMV_THREAD_U zsymv_thread_U | |||
| #define ZSYMV_THREAD_L zsymv_thread_L | |||
| #define ZHEMV_THREAD_U zhemv_thread_U | |||
| #define ZHEMV_THREAD_L zhemv_thread_L | |||
| #define ZHEMV_THREAD_V zhemv_thread_V | |||
| #define ZHEMV_THREAD_M zhemv_thread_M | |||
| #define ZGEMM_ONCOPY zgemm_oncopy | |||
| #define ZGEMM_OTCOPY zgemm_otcopy | |||
| #if ZGEMM_DEFAULT_UNROLL_M == ZGEMM_DEFAULT_UNROLL_N | |||
| #define ZGEMM_INCOPY zgemm_oncopy | |||
| #define ZGEMM_ITCOPY zgemm_otcopy | |||
| #else | |||
| #define ZGEMM_INCOPY zgemm_incopy | |||
| #define ZGEMM_ITCOPY zgemm_itcopy | |||
| #endif | |||
| #define ZTRMM_OUNUCOPY ztrmm_ounucopy | |||
| #define ZTRMM_OUNNCOPY ztrmm_ounncopy | |||
| #define ZTRMM_OUTUCOPY ztrmm_outucopy | |||
| #define ZTRMM_OUTNCOPY ztrmm_outncopy | |||
| #define ZTRMM_OLNUCOPY ztrmm_olnucopy | |||
| #define ZTRMM_OLNNCOPY ztrmm_olnncopy | |||
| #define ZTRMM_OLTUCOPY ztrmm_oltucopy | |||
| #define ZTRMM_OLTNCOPY ztrmm_oltncopy | |||
| #define ZTRSM_OUNUCOPY ztrsm_ounucopy | |||
| #define ZTRSM_OUNNCOPY ztrsm_ounncopy | |||
| #define ZTRSM_OUTUCOPY ztrsm_outucopy | |||
| #define ZTRSM_OUTNCOPY ztrsm_outncopy | |||
| #define ZTRSM_OLNUCOPY ztrsm_olnucopy | |||
| #define ZTRSM_OLNNCOPY ztrsm_olnncopy | |||
| #define ZTRSM_OLTUCOPY ztrsm_oltucopy | |||
| #define ZTRSM_OLTNCOPY ztrsm_oltncopy | |||
| #if ZGEMM_DEFAULT_UNROLL_M == ZGEMM_DEFAULT_UNROLL_N | |||
| #define ZTRMM_IUNUCOPY ztrmm_ounucopy | |||
| #define ZTRMM_IUNNCOPY ztrmm_ounncopy | |||
| #define ZTRMM_IUTUCOPY ztrmm_outucopy | |||
| #define ZTRMM_IUTNCOPY ztrmm_outncopy | |||
| #define ZTRMM_ILNUCOPY ztrmm_olnucopy | |||
| #define ZTRMM_ILNNCOPY ztrmm_olnncopy | |||
| #define ZTRMM_ILTUCOPY ztrmm_oltucopy | |||
| #define ZTRMM_ILTNCOPY ztrmm_oltncopy | |||
| #define ZTRSM_IUNUCOPY ztrsm_ounucopy | |||
| #define ZTRSM_IUNNCOPY ztrsm_ounncopy | |||
| #define ZTRSM_IUTUCOPY ztrsm_outucopy | |||
| #define ZTRSM_IUTNCOPY ztrsm_outncopy | |||
| #define ZTRSM_ILNUCOPY ztrsm_olnucopy | |||
| #define ZTRSM_ILNNCOPY ztrsm_olnncopy | |||
| #define ZTRSM_ILTUCOPY ztrsm_oltucopy | |||
| #define ZTRSM_ILTNCOPY ztrsm_oltncopy | |||
| #else | |||
| #define ZTRMM_IUNUCOPY ztrmm_iunucopy | |||
| #define ZTRMM_IUNNCOPY ztrmm_iunncopy | |||
| #define ZTRMM_IUTUCOPY ztrmm_iutucopy | |||
| #define ZTRMM_IUTNCOPY ztrmm_iutncopy | |||
| #define ZTRMM_ILNUCOPY ztrmm_ilnucopy | |||
| #define ZTRMM_ILNNCOPY ztrmm_ilnncopy | |||
| #define ZTRMM_ILTUCOPY ztrmm_iltucopy | |||
| #define ZTRMM_ILTNCOPY ztrmm_iltncopy | |||
| #define ZTRSM_IUNUCOPY ztrsm_iunucopy | |||
| #define ZTRSM_IUNNCOPY ztrsm_iunncopy | |||
| #define ZTRSM_IUTUCOPY ztrsm_iutucopy | |||
| #define ZTRSM_IUTNCOPY ztrsm_iutncopy | |||
| #define ZTRSM_ILNUCOPY ztrsm_ilnucopy | |||
| #define ZTRSM_ILNNCOPY ztrsm_ilnncopy | |||
| #define ZTRSM_ILTUCOPY ztrsm_iltucopy | |||
| #define ZTRSM_ILTNCOPY ztrsm_iltncopy | |||
| #endif | |||
| #define ZGEMM_BETA zgemm_beta | |||
| #define ZGEMM_KERNEL_N zgemm_kernel_n | |||
| #define ZGEMM_KERNEL_L zgemm_kernel_l | |||
| #define ZGEMM_KERNEL_R zgemm_kernel_r | |||
| #define ZGEMM_KERNEL_B zgemm_kernel_b | |||
| #define ZTRMM_KERNEL_LN ztrmm_kernel_LN | |||
| #define ZTRMM_KERNEL_LT ztrmm_kernel_LT | |||
| #define ZTRMM_KERNEL_LR ztrmm_kernel_LR | |||
| #define ZTRMM_KERNEL_LC ztrmm_kernel_LC | |||
| #define ZTRMM_KERNEL_RN ztrmm_kernel_RN | |||
| #define ZTRMM_KERNEL_RT ztrmm_kernel_RT | |||
| #define ZTRMM_KERNEL_RR ztrmm_kernel_RR | |||
| #define ZTRMM_KERNEL_RC ztrmm_kernel_RC | |||
| #define ZTRSM_KERNEL_LN ztrsm_kernel_LN | |||
| #define ZTRSM_KERNEL_LT ztrsm_kernel_LT | |||
| #define ZTRSM_KERNEL_LR ztrsm_kernel_LR | |||
| #define ZTRSM_KERNEL_LC ztrsm_kernel_LC | |||
| #define ZTRSM_KERNEL_RN ztrsm_kernel_RN | |||
| #define ZTRSM_KERNEL_RT ztrsm_kernel_RT | |||
| #define ZTRSM_KERNEL_RR ztrsm_kernel_RR | |||
| #define ZTRSM_KERNEL_RC ztrsm_kernel_RC | |||
| #define ZSYMM_OUTCOPY zsymm_outcopy | |||
| #define ZSYMM_OLTCOPY zsymm_oltcopy | |||
| #if ZGEMM_DEFAULT_UNROLL_M == ZGEMM_DEFAULT_UNROLL_N | |||
| #define ZSYMM_IUTCOPY zsymm_outcopy | |||
| #define ZSYMM_ILTCOPY zsymm_oltcopy | |||
| #else | |||
| #define ZSYMM_IUTCOPY zsymm_iutcopy | |||
| #define ZSYMM_ILTCOPY zsymm_iltcopy | |||
| #endif | |||
| #define ZHEMM_OUTCOPY zhemm_outcopy | |||
| #define ZHEMM_OLTCOPY zhemm_oltcopy | |||
| #if ZGEMM_DEFAULT_UNROLL_M == ZGEMM_DEFAULT_UNROLL_N | |||
| #define ZHEMM_IUTCOPY zhemm_outcopy | |||
| #define ZHEMM_ILTCOPY zhemm_oltcopy | |||
| #else | |||
| #define ZHEMM_IUTCOPY zhemm_iutcopy | |||
| #define ZHEMM_ILTCOPY zhemm_iltcopy | |||
| #endif | |||
| #define ZGEMM3M_ONCOPYB zgemm3m_oncopyb | |||
| #define ZGEMM3M_ONCOPYR zgemm3m_oncopyr | |||
| #define ZGEMM3M_ONCOPYI zgemm3m_oncopyi | |||
| #define ZGEMM3M_OTCOPYB zgemm3m_otcopyb | |||
| #define ZGEMM3M_OTCOPYR zgemm3m_otcopyr | |||
| #define ZGEMM3M_OTCOPYI zgemm3m_otcopyi | |||
| #define ZGEMM3M_INCOPYB zgemm3m_incopyb | |||
| #define ZGEMM3M_INCOPYR zgemm3m_incopyr | |||
| #define ZGEMM3M_INCOPYI zgemm3m_incopyi | |||
| #define ZGEMM3M_ITCOPYB zgemm3m_itcopyb | |||
| #define ZGEMM3M_ITCOPYR zgemm3m_itcopyr | |||
| #define ZGEMM3M_ITCOPYI zgemm3m_itcopyi | |||
| #define ZSYMM3M_ILCOPYB zsymm3m_ilcopyb | |||
| #define ZSYMM3M_IUCOPYB zsymm3m_iucopyb | |||
| #define ZSYMM3M_ILCOPYR zsymm3m_ilcopyr | |||
| #define ZSYMM3M_IUCOPYR zsymm3m_iucopyr | |||
| #define ZSYMM3M_ILCOPYI zsymm3m_ilcopyi | |||
| #define ZSYMM3M_IUCOPYI zsymm3m_iucopyi | |||
| #define ZSYMM3M_OLCOPYB zsymm3m_olcopyb | |||
| #define ZSYMM3M_OUCOPYB zsymm3m_oucopyb | |||
| #define ZSYMM3M_OLCOPYR zsymm3m_olcopyr | |||
| #define ZSYMM3M_OUCOPYR zsymm3m_oucopyr | |||
| #define ZSYMM3M_OLCOPYI zsymm3m_olcopyi | |||
| #define ZSYMM3M_OUCOPYI zsymm3m_oucopyi | |||
| #define ZHEMM3M_ILCOPYB zhemm3m_ilcopyb | |||
| #define ZHEMM3M_IUCOPYB zhemm3m_iucopyb | |||
| #define ZHEMM3M_ILCOPYR zhemm3m_ilcopyr | |||
| #define ZHEMM3M_IUCOPYR zhemm3m_iucopyr | |||
| #define ZHEMM3M_ILCOPYI zhemm3m_ilcopyi | |||
| #define ZHEMM3M_IUCOPYI zhemm3m_iucopyi | |||
| #define ZHEMM3M_OLCOPYB zhemm3m_olcopyb | |||
| #define ZHEMM3M_OUCOPYB zhemm3m_oucopyb | |||
| #define ZHEMM3M_OLCOPYR zhemm3m_olcopyr | |||
| #define ZHEMM3M_OUCOPYR zhemm3m_oucopyr | |||
| #define ZHEMM3M_OLCOPYI zhemm3m_olcopyi | |||
| #define ZHEMM3M_OUCOPYI zhemm3m_oucopyi | |||
| #define ZGEMM3M_KERNEL zgemm3m_kernel | |||
| #define ZNEG_TCOPY zneg_tcopy | |||
| #define ZLASWP_NCOPY zlaswp_ncopy | |||
| #else | |||
| #define ZAMAX_K gotoblas -> zamax_k | |||
| #define ZAMIN_K gotoblas -> zamin_k | |||
| #define ZMAX_K gotoblas -> zmax_k | |||
| #define ZMIN_K gotoblas -> zmin_k | |||
| #define IZAMAX_K gotoblas -> izamax_k | |||
| #define IZAMIN_K gotoblas -> izamin_k | |||
| #define IZMAX_K gotoblas -> izmax_k | |||
| #define IZMIN_K gotoblas -> izmin_k | |||
| #define ZASUM_K gotoblas -> zasum_k | |||
| #define ZAXPYU_K gotoblas -> zaxpy_k | |||
| #define ZAXPYC_K gotoblas -> zaxpyc_k | |||
| #define ZCOPY_K gotoblas -> zcopy_k | |||
| #define ZDOTU_K gotoblas -> zdotu_k | |||
| #define ZDOTC_K gotoblas -> zdotc_k | |||
| #define ZNRM2_K gotoblas -> znrm2_k | |||
| #define ZSCAL_K gotoblas -> zscal_k | |||
| #define ZSWAP_K gotoblas -> zswap_k | |||
| #define ZROT_K gotoblas -> zdrot_k | |||
| #define ZGEMV_N gotoblas -> zgemv_n | |||
| #define ZGEMV_T gotoblas -> zgemv_t | |||
| #define ZGEMV_R gotoblas -> zgemv_r | |||
| #define ZGEMV_C gotoblas -> zgemv_c | |||
| #define ZGEMV_O gotoblas -> zgemv_o | |||
| #define ZGEMV_U gotoblas -> zgemv_u | |||
| #define ZGEMV_S gotoblas -> zgemv_s | |||
| #define ZGEMV_D gotoblas -> zgemv_d | |||
| #define ZGERU_K gotoblas -> zgeru_k | |||
| #define ZGERC_K gotoblas -> zgerc_k | |||
| #define ZGERV_K gotoblas -> zgerv_k | |||
| #define ZGERD_K gotoblas -> zgerd_k | |||
| #define ZSYMV_U gotoblas -> zsymv_U | |||
| #define ZSYMV_L gotoblas -> zsymv_L | |||
| #define ZHEMV_U gotoblas -> zhemv_U | |||
| #define ZHEMV_L gotoblas -> zhemv_L | |||
| #define ZHEMV_V gotoblas -> zhemv_V | |||
| #define ZHEMV_M gotoblas -> zhemv_M | |||
| #define ZSYMV_THREAD_U zsymv_thread_U | |||
| #define ZSYMV_THREAD_L zsymv_thread_L | |||
| #define ZHEMV_THREAD_U zhemv_thread_U | |||
| #define ZHEMV_THREAD_L zhemv_thread_L | |||
| #define ZHEMV_THREAD_V zhemv_thread_V | |||
| #define ZHEMV_THREAD_M zhemv_thread_M | |||
| #define ZGEMM_ONCOPY gotoblas -> zgemm_oncopy | |||
| #define ZGEMM_OTCOPY gotoblas -> zgemm_otcopy | |||
| #define ZGEMM_INCOPY gotoblas -> zgemm_incopy | |||
| #define ZGEMM_ITCOPY gotoblas -> zgemm_itcopy | |||
| #define ZTRMM_OUNUCOPY gotoblas -> ztrmm_ounucopy | |||
| #define ZTRMM_OUTUCOPY gotoblas -> ztrmm_outucopy | |||
| #define ZTRMM_OLNUCOPY gotoblas -> ztrmm_olnucopy | |||
| #define ZTRMM_OLTUCOPY gotoblas -> ztrmm_oltucopy | |||
| #define ZTRSM_OUNUCOPY gotoblas -> ztrsm_ounucopy | |||
| #define ZTRSM_OUTUCOPY gotoblas -> ztrsm_outucopy | |||
| #define ZTRSM_OLNUCOPY gotoblas -> ztrsm_olnucopy | |||
| #define ZTRSM_OLTUCOPY gotoblas -> ztrsm_oltucopy | |||
| #define ZTRMM_IUNUCOPY gotoblas -> ztrmm_iunucopy | |||
| #define ZTRMM_IUTUCOPY gotoblas -> ztrmm_iutucopy | |||
| #define ZTRMM_ILNUCOPY gotoblas -> ztrmm_ilnucopy | |||
| #define ZTRMM_ILTUCOPY gotoblas -> ztrmm_iltucopy | |||
| #define ZTRSM_IUNUCOPY gotoblas -> ztrsm_iunucopy | |||
| #define ZTRSM_IUTUCOPY gotoblas -> ztrsm_iutucopy | |||
| #define ZTRSM_ILNUCOPY gotoblas -> ztrsm_ilnucopy | |||
| #define ZTRSM_ILTUCOPY gotoblas -> ztrsm_iltucopy | |||
| #define ZTRMM_OUNNCOPY gotoblas -> ztrmm_ounncopy | |||
| #define ZTRMM_OUTNCOPY gotoblas -> ztrmm_outncopy | |||
| #define ZTRMM_OLNNCOPY gotoblas -> ztrmm_olnncopy | |||
| #define ZTRMM_OLTNCOPY gotoblas -> ztrmm_oltncopy | |||
| #define ZTRSM_OUNNCOPY gotoblas -> ztrsm_ounncopy | |||
| #define ZTRSM_OUTNCOPY gotoblas -> ztrsm_outncopy | |||
| #define ZTRSM_OLNNCOPY gotoblas -> ztrsm_olnncopy | |||
| #define ZTRSM_OLTNCOPY gotoblas -> ztrsm_oltncopy | |||
| #define ZTRMM_IUNNCOPY gotoblas -> ztrmm_iunncopy | |||
| #define ZTRMM_IUTNCOPY gotoblas -> ztrmm_iutncopy | |||
| #define ZTRMM_ILNNCOPY gotoblas -> ztrmm_ilnncopy | |||
| #define ZTRMM_ILTNCOPY gotoblas -> ztrmm_iltncopy | |||
| #define ZTRSM_IUNNCOPY gotoblas -> ztrsm_iunncopy | |||
| #define ZTRSM_IUTNCOPY gotoblas -> ztrsm_iutncopy | |||
| #define ZTRSM_ILNNCOPY gotoblas -> ztrsm_ilnncopy | |||
| #define ZTRSM_ILTNCOPY gotoblas -> ztrsm_iltncopy | |||
| #define ZGEMM_BETA gotoblas -> zgemm_beta | |||
| #define ZGEMM_KERNEL_N gotoblas -> zgemm_kernel_n | |||
| #define ZGEMM_KERNEL_L gotoblas -> zgemm_kernel_l | |||
| #define ZGEMM_KERNEL_R gotoblas -> zgemm_kernel_r | |||
| #define ZGEMM_KERNEL_B gotoblas -> zgemm_kernel_b | |||
| #define ZTRMM_KERNEL_LN gotoblas -> ztrmm_kernel_LN | |||
| #define ZTRMM_KERNEL_LT gotoblas -> ztrmm_kernel_LT | |||
| #define ZTRMM_KERNEL_LR gotoblas -> ztrmm_kernel_LR | |||
| #define ZTRMM_KERNEL_LC gotoblas -> ztrmm_kernel_LC | |||
| #define ZTRMM_KERNEL_RN gotoblas -> ztrmm_kernel_RN | |||
| #define ZTRMM_KERNEL_RT gotoblas -> ztrmm_kernel_RT | |||
| #define ZTRMM_KERNEL_RR gotoblas -> ztrmm_kernel_RR | |||
| #define ZTRMM_KERNEL_RC gotoblas -> ztrmm_kernel_RC | |||
| #define ZTRSM_KERNEL_LN gotoblas -> ztrsm_kernel_LN | |||
| #define ZTRSM_KERNEL_LT gotoblas -> ztrsm_kernel_LT | |||
| #define ZTRSM_KERNEL_LR gotoblas -> ztrsm_kernel_LR | |||
| #define ZTRSM_KERNEL_LC gotoblas -> ztrsm_kernel_LC | |||
| #define ZTRSM_KERNEL_RN gotoblas -> ztrsm_kernel_RN | |||
| #define ZTRSM_KERNEL_RT gotoblas -> ztrsm_kernel_RT | |||
| #define ZTRSM_KERNEL_RR gotoblas -> ztrsm_kernel_RR | |||
| #define ZTRSM_KERNEL_RC gotoblas -> ztrsm_kernel_RC | |||
| #define ZSYMM_IUTCOPY gotoblas -> zsymm_iutcopy | |||
| #define ZSYMM_ILTCOPY gotoblas -> zsymm_iltcopy | |||
| #define ZSYMM_OUTCOPY gotoblas -> zsymm_outcopy | |||
| #define ZSYMM_OLTCOPY gotoblas -> zsymm_oltcopy | |||
| #define ZHEMM_OUTCOPY gotoblas -> zhemm_outcopy | |||
| #define ZHEMM_OLTCOPY gotoblas -> zhemm_oltcopy | |||
| #define ZHEMM_IUTCOPY gotoblas -> zhemm_iutcopy | |||
| #define ZHEMM_ILTCOPY gotoblas -> zhemm_iltcopy | |||
| #define ZGEMM3M_ONCOPYB gotoblas -> zgemm3m_oncopyb | |||
| #define ZGEMM3M_ONCOPYR gotoblas -> zgemm3m_oncopyr | |||
| #define ZGEMM3M_ONCOPYI gotoblas -> zgemm3m_oncopyi | |||
| #define ZGEMM3M_OTCOPYB gotoblas -> zgemm3m_otcopyb | |||
| #define ZGEMM3M_OTCOPYR gotoblas -> zgemm3m_otcopyr | |||
| #define ZGEMM3M_OTCOPYI gotoblas -> zgemm3m_otcopyi | |||
| #define ZGEMM3M_INCOPYB gotoblas -> zgemm3m_incopyb | |||
| #define ZGEMM3M_INCOPYR gotoblas -> zgemm3m_incopyr | |||
| #define ZGEMM3M_INCOPYI gotoblas -> zgemm3m_incopyi | |||
| #define ZGEMM3M_ITCOPYB gotoblas -> zgemm3m_itcopyb | |||
| #define ZGEMM3M_ITCOPYR gotoblas -> zgemm3m_itcopyr | |||
| #define ZGEMM3M_ITCOPYI gotoblas -> zgemm3m_itcopyi | |||
| #define ZSYMM3M_ILCOPYB gotoblas -> zsymm3m_ilcopyb | |||
| #define ZSYMM3M_IUCOPYB gotoblas -> zsymm3m_iucopyb | |||
| #define ZSYMM3M_ILCOPYR gotoblas -> zsymm3m_ilcopyr | |||
| #define ZSYMM3M_IUCOPYR gotoblas -> zsymm3m_iucopyr | |||
| #define ZSYMM3M_ILCOPYI gotoblas -> zsymm3m_ilcopyi | |||
| #define ZSYMM3M_IUCOPYI gotoblas -> zsymm3m_iucopyi | |||
| #define ZSYMM3M_OLCOPYB gotoblas -> zsymm3m_olcopyb | |||
| #define ZSYMM3M_OUCOPYB gotoblas -> zsymm3m_oucopyb | |||
| #define ZSYMM3M_OLCOPYR gotoblas -> zsymm3m_olcopyr | |||
| #define ZSYMM3M_OUCOPYR gotoblas -> zsymm3m_oucopyr | |||
| #define ZSYMM3M_OLCOPYI gotoblas -> zsymm3m_olcopyi | |||
| #define ZSYMM3M_OUCOPYI gotoblas -> zsymm3m_oucopyi | |||
| #define ZHEMM3M_ILCOPYB gotoblas -> zhemm3m_ilcopyb | |||
| #define ZHEMM3M_IUCOPYB gotoblas -> zhemm3m_iucopyb | |||
| #define ZHEMM3M_ILCOPYR gotoblas -> zhemm3m_ilcopyr | |||
| #define ZHEMM3M_IUCOPYR gotoblas -> zhemm3m_iucopyr | |||
| #define ZHEMM3M_ILCOPYI gotoblas -> zhemm3m_ilcopyi | |||
| #define ZHEMM3M_IUCOPYI gotoblas -> zhemm3m_iucopyi | |||
| #define ZHEMM3M_OLCOPYB gotoblas -> zhemm3m_olcopyb | |||
| #define ZHEMM3M_OUCOPYB gotoblas -> zhemm3m_oucopyb | |||
| #define ZHEMM3M_OLCOPYR gotoblas -> zhemm3m_olcopyr | |||
| #define ZHEMM3M_OUCOPYR gotoblas -> zhemm3m_oucopyr | |||
| #define ZHEMM3M_OLCOPYI gotoblas -> zhemm3m_olcopyi | |||
| #define ZHEMM3M_OUCOPYI gotoblas -> zhemm3m_oucopyi | |||
| #define ZGEMM3M_KERNEL gotoblas -> zgemm3m_kernel | |||
| #define ZNEG_TCOPY gotoblas -> zneg_tcopy | |||
| #define ZLASWP_NCOPY gotoblas -> zlaswp_ncopy | |||
| #endif | |||
| #define ZGEMM_NN zgemm_nn | |||
| #define ZGEMM_CN zgemm_cn | |||
| #define ZGEMM_TN zgemm_tn | |||
| #define ZGEMM_NC zgemm_nc | |||
| #define ZGEMM_NT zgemm_nt | |||
| #define ZGEMM_CC zgemm_cc | |||
| #define ZGEMM_CT zgemm_ct | |||
| #define ZGEMM_TC zgemm_tc | |||
| #define ZGEMM_TT zgemm_tt | |||
| #define ZGEMM_NR zgemm_nr | |||
| #define ZGEMM_TR zgemm_tr | |||
| #define ZGEMM_CR zgemm_cr | |||
| #define ZGEMM_RN zgemm_rn | |||
| #define ZGEMM_RT zgemm_rt | |||
| #define ZGEMM_RC zgemm_rc | |||
| #define ZGEMM_RR zgemm_rr | |||
| #define ZSYMM_LU zsymm_LU | |||
| #define ZSYMM_LL zsymm_LL | |||
| #define ZSYMM_RU zsymm_RU | |||
| #define ZSYMM_RL zsymm_RL | |||
| #define ZHEMM_LU zhemm_LU | |||
| #define ZHEMM_LL zhemm_LL | |||
| #define ZHEMM_RU zhemm_RU | |||
| #define ZHEMM_RL zhemm_RL | |||
| #define ZSYRK_UN zsyrk_UN | |||
| #define ZSYRK_UT zsyrk_UT | |||
| #define ZSYRK_LN zsyrk_LN | |||
| #define ZSYRK_LT zsyrk_LT | |||
| #define ZSYRK_UR zsyrk_UN | |||
| #define ZSYRK_UC zsyrk_UT | |||
| #define ZSYRK_LR zsyrk_LN | |||
| #define ZSYRK_LC zsyrk_LT | |||
| #define ZSYRK_KERNEL_U zsyrk_kernel_U | |||
| #define ZSYRK_KERNEL_L zsyrk_kernel_L | |||
| #define ZHERK_UN zherk_UN | |||
| #define ZHERK_LN zherk_LN | |||
| #define ZHERK_UC zherk_UC | |||
| #define ZHERK_LC zherk_LC | |||
| #define ZHER2K_UN zher2k_UN | |||
| #define ZHER2K_LN zher2k_LN | |||
| #define ZHER2K_UC zher2k_UC | |||
| #define ZHER2K_LC zher2k_LC | |||
| #define ZSYR2K_UN zsyr2k_UN | |||
| #define ZSYR2K_UT zsyr2k_UT | |||
| #define ZSYR2K_LN zsyr2k_LN | |||
| #define ZSYR2K_LT zsyr2k_LT | |||
| #define ZSYR2K_UR zsyr2k_UN | |||
| #define ZSYR2K_UC zsyr2k_UT | |||
| #define ZSYR2K_LR zsyr2k_LN | |||
| #define ZSYR2K_LC zsyr2k_LT | |||
| #define ZSYR2K_KERNEL_U zsyr2k_kernel_U | |||
| #define ZSYR2K_KERNEL_L zsyr2k_kernel_L | |||
| #define ZTRMM_LNUU ztrmm_LNUU | |||
| #define ZTRMM_LNUN ztrmm_LNUN | |||
| #define ZTRMM_LNLU ztrmm_LNLU | |||
| #define ZTRMM_LNLN ztrmm_LNLN | |||
| #define ZTRMM_LTUU ztrmm_LTUU | |||
| #define ZTRMM_LTUN ztrmm_LTUN | |||
| #define ZTRMM_LTLU ztrmm_LTLU | |||
| #define ZTRMM_LTLN ztrmm_LTLN | |||
| #define ZTRMM_LRUU ztrmm_LRUU | |||
| #define ZTRMM_LRUN ztrmm_LRUN | |||
| #define ZTRMM_LRLU ztrmm_LRLU | |||
| #define ZTRMM_LRLN ztrmm_LRLN | |||
| #define ZTRMM_LCUU ztrmm_LCUU | |||
| #define ZTRMM_LCUN ztrmm_LCUN | |||
| #define ZTRMM_LCLU ztrmm_LCLU | |||
| #define ZTRMM_LCLN ztrmm_LCLN | |||
| #define ZTRMM_RNUU ztrmm_RNUU | |||
| #define ZTRMM_RNUN ztrmm_RNUN | |||
| #define ZTRMM_RNLU ztrmm_RNLU | |||
| #define ZTRMM_RNLN ztrmm_RNLN | |||
| #define ZTRMM_RTUU ztrmm_RTUU | |||
| #define ZTRMM_RTUN ztrmm_RTUN | |||
| #define ZTRMM_RTLU ztrmm_RTLU | |||
| #define ZTRMM_RTLN ztrmm_RTLN | |||
| #define ZTRMM_RRUU ztrmm_RRUU | |||
| #define ZTRMM_RRUN ztrmm_RRUN | |||
| #define ZTRMM_RRLU ztrmm_RRLU | |||
| #define ZTRMM_RRLN ztrmm_RRLN | |||
| #define ZTRMM_RCUU ztrmm_RCUU | |||
| #define ZTRMM_RCUN ztrmm_RCUN | |||
| #define ZTRMM_RCLU ztrmm_RCLU | |||
| #define ZTRMM_RCLN ztrmm_RCLN | |||
| #define ZTRSM_LNUU ztrsm_LNUU | |||
| #define ZTRSM_LNUN ztrsm_LNUN | |||
| #define ZTRSM_LNLU ztrsm_LNLU | |||
| #define ZTRSM_LNLN ztrsm_LNLN | |||
| #define ZTRSM_LTUU ztrsm_LTUU | |||
| #define ZTRSM_LTUN ztrsm_LTUN | |||
| #define ZTRSM_LTLU ztrsm_LTLU | |||
| #define ZTRSM_LTLN ztrsm_LTLN | |||
| #define ZTRSM_LRUU ztrsm_LRUU | |||
| #define ZTRSM_LRUN ztrsm_LRUN | |||
| #define ZTRSM_LRLU ztrsm_LRLU | |||
| #define ZTRSM_LRLN ztrsm_LRLN | |||
| #define ZTRSM_LCUU ztrsm_LCUU | |||
| #define ZTRSM_LCUN ztrsm_LCUN | |||
| #define ZTRSM_LCLU ztrsm_LCLU | |||
| #define ZTRSM_LCLN ztrsm_LCLN | |||
| #define ZTRSM_RNUU ztrsm_RNUU | |||
| #define ZTRSM_RNUN ztrsm_RNUN | |||
| #define ZTRSM_RNLU ztrsm_RNLU | |||
| #define ZTRSM_RNLN ztrsm_RNLN | |||
| #define ZTRSM_RTUU ztrsm_RTUU | |||
| #define ZTRSM_RTUN ztrsm_RTUN | |||
| #define ZTRSM_RTLU ztrsm_RTLU | |||
| #define ZTRSM_RTLN ztrsm_RTLN | |||
| #define ZTRSM_RRUU ztrsm_RRUU | |||
| #define ZTRSM_RRUN ztrsm_RRUN | |||
| #define ZTRSM_RRLU ztrsm_RRLU | |||
| #define ZTRSM_RRLN ztrsm_RRLN | |||
| #define ZTRSM_RCUU ztrsm_RCUU | |||
| #define ZTRSM_RCUN ztrsm_RCUN | |||
| #define ZTRSM_RCLU ztrsm_RCLU | |||
| #define ZTRSM_RCLN ztrsm_RCLN | |||
| #define ZGEMM_THREAD_NN zgemm_thread_nn | |||
| #define ZGEMM_THREAD_CN zgemm_thread_cn | |||
| #define ZGEMM_THREAD_TN zgemm_thread_tn | |||
| #define ZGEMM_THREAD_NC zgemm_thread_nc | |||
| #define ZGEMM_THREAD_NT zgemm_thread_nt | |||
| #define ZGEMM_THREAD_CC zgemm_thread_cc | |||
| #define ZGEMM_THREAD_CT zgemm_thread_ct | |||
| #define ZGEMM_THREAD_TC zgemm_thread_tc | |||
| #define ZGEMM_THREAD_TT zgemm_thread_tt | |||
| #define ZGEMM_THREAD_NR zgemm_thread_nr | |||
| #define ZGEMM_THREAD_TR zgemm_thread_tr | |||
| #define ZGEMM_THREAD_CR zgemm_thread_cr | |||
| #define ZGEMM_THREAD_RN zgemm_thread_rn | |||
| #define ZGEMM_THREAD_RT zgemm_thread_rt | |||
| #define ZGEMM_THREAD_RC zgemm_thread_rc | |||
| #define ZGEMM_THREAD_RR zgemm_thread_rr | |||
| #define ZSYMM_THREAD_LU zsymm_thread_LU | |||
| #define ZSYMM_THREAD_LL zsymm_thread_LL | |||
| #define ZSYMM_THREAD_RU zsymm_thread_RU | |||
| #define ZSYMM_THREAD_RL zsymm_thread_RL | |||
| #define ZHEMM_THREAD_LU zhemm_thread_LU | |||
| #define ZHEMM_THREAD_LL zhemm_thread_LL | |||
| #define ZHEMM_THREAD_RU zhemm_thread_RU | |||
| #define ZHEMM_THREAD_RL zhemm_thread_RL | |||
| #define ZSYRK_THREAD_UN zsyrk_thread_UN | |||
| #define ZSYRK_THREAD_UT zsyrk_thread_UT | |||
| #define ZSYRK_THREAD_LN zsyrk_thread_LN | |||
| #define ZSYRK_THREAD_LT zsyrk_thread_LT | |||
| #define ZSYRK_THREAD_UR zsyrk_thread_UN | |||
| #define ZSYRK_THREAD_UC zsyrk_thread_UT | |||
| #define ZSYRK_THREAD_LR zsyrk_thread_LN | |||
| #define ZSYRK_THREAD_LC zsyrk_thread_LT | |||
| #define ZHERK_THREAD_UN zherk_thread_UN | |||
| #define ZHERK_THREAD_UT zherk_thread_UT | |||
| #define ZHERK_THREAD_LN zherk_thread_LN | |||
| #define ZHERK_THREAD_LT zherk_thread_LT | |||
| #define ZHERK_THREAD_UR zherk_thread_UR | |||
| #define ZHERK_THREAD_UC zherk_thread_UC | |||
| #define ZHERK_THREAD_LR zherk_thread_LR | |||
| #define ZHERK_THREAD_LC zherk_thread_LC | |||
| #define ZGEMM3M_NN zgemm3m_nn | |||
| #define ZGEMM3M_CN zgemm3m_cn | |||
| #define ZGEMM3M_TN zgemm3m_tn | |||
| #define ZGEMM3M_NC zgemm3m_nc | |||
| #define ZGEMM3M_NT zgemm3m_nt | |||
| #define ZGEMM3M_CC zgemm3m_cc | |||
| #define ZGEMM3M_CT zgemm3m_ct | |||
| #define ZGEMM3M_TC zgemm3m_tc | |||
| #define ZGEMM3M_TT zgemm3m_tt | |||
| #define ZGEMM3M_NR zgemm3m_nr | |||
| #define ZGEMM3M_TR zgemm3m_tr | |||
| #define ZGEMM3M_CR zgemm3m_cr | |||
| #define ZGEMM3M_RN zgemm3m_rn | |||
| #define ZGEMM3M_RT zgemm3m_rt | |||
| #define ZGEMM3M_RC zgemm3m_rc | |||
| #define ZGEMM3M_RR zgemm3m_rr | |||
| #define ZGEMM3M_THREAD_NN zgemm3m_thread_nn | |||
| #define ZGEMM3M_THREAD_CN zgemm3m_thread_cn | |||
| #define ZGEMM3M_THREAD_TN zgemm3m_thread_tn | |||
| #define ZGEMM3M_THREAD_NC zgemm3m_thread_nc | |||
| #define ZGEMM3M_THREAD_NT zgemm3m_thread_nt | |||
| #define ZGEMM3M_THREAD_CC zgemm3m_thread_cc | |||
| #define ZGEMM3M_THREAD_CT zgemm3m_thread_ct | |||
| #define ZGEMM3M_THREAD_TC zgemm3m_thread_tc | |||
| #define ZGEMM3M_THREAD_TT zgemm3m_thread_tt | |||
| #define ZGEMM3M_THREAD_NR zgemm3m_thread_nr | |||
| #define ZGEMM3M_THREAD_TR zgemm3m_thread_tr | |||
| #define ZGEMM3M_THREAD_CR zgemm3m_thread_cr | |||
| #define ZGEMM3M_THREAD_RN zgemm3m_thread_rn | |||
| #define ZGEMM3M_THREAD_RT zgemm3m_thread_rt | |||
| #define ZGEMM3M_THREAD_RC zgemm3m_thread_rc | |||
| #define ZGEMM3M_THREAD_RR zgemm3m_thread_rr | |||
| #define ZSYMM3M_LU zsymm3m_LU | |||
| #define ZSYMM3M_LL zsymm3m_LL | |||
| #define ZSYMM3M_RU zsymm3m_RU | |||
| #define ZSYMM3M_RL zsymm3m_RL | |||
| #define ZSYMM3M_THREAD_LU zsymm3m_thread_LU | |||
| #define ZSYMM3M_THREAD_LL zsymm3m_thread_LL | |||
| #define ZSYMM3M_THREAD_RU zsymm3m_thread_RU | |||
| #define ZSYMM3M_THREAD_RL zsymm3m_thread_RL | |||
| #define ZHEMM3M_LU zhemm3m_LU | |||
| #define ZHEMM3M_LL zhemm3m_LL | |||
| #define ZHEMM3M_RU zhemm3m_RU | |||
| #define ZHEMM3M_RL zhemm3m_RL | |||
| #define ZHEMM3M_THREAD_LU zhemm3m_thread_LU | |||
| #define ZHEMM3M_THREAD_LL zhemm3m_thread_LL | |||
| #define ZHEMM3M_THREAD_RU zhemm3m_thread_RU | |||
| #define ZHEMM3M_THREAD_RL zhemm3m_thread_RL | |||
| #endif | |||
| @@ -0,0 +1,67 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #if defined(__APPLE__) && defined(__i386__) | |||
| /* Quick hack for Darwin/x86 */ | |||
| .text | |||
| .globl _cpuid | |||
| _cpuid: | |||
| pushl %esi | |||
| pushl %ebx | |||
| movl 12(%esp), %eax | |||
| cpuid | |||
| movl 16(%esp), %esi | |||
| movl %eax, (%esi) | |||
| movl 20(%esp), %esi | |||
| movl %ebx, (%esi) | |||
| movl 24(%esp), %esi | |||
| movl %ecx, (%esi) | |||
| movl 28(%esp), %esi | |||
| movl %edx, (%esi) | |||
| popl %ebx | |||
| popl %esi | |||
| ret | |||
| .subsections_via_symbols | |||
| #endif | |||
| @@ -0,0 +1,191 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| #ifndef CPUID_H | |||
| #define CPUID_H | |||
| #define VENDOR_INTEL 1 | |||
| #define VENDOR_UMC 2 | |||
| #define VENDOR_AMD 3 | |||
| #define VENDOR_CYRIX 4 | |||
| #define VENDOR_NEXGEN 5 | |||
| #define VENDOR_CENTAUR 6 | |||
| #define VENDOR_RISE 7 | |||
| #define VENDOR_SIS 8 | |||
| #define VENDOR_TRANSMETA 9 | |||
| #define VENDOR_NSC 10 | |||
| #define VENDOR_UNKNOWN 99 | |||
| #define BITMASK(a, b, c) ((((a) >> (b)) & (c))) | |||
| #define FAMILY_80486 4 | |||
| #define FAMILY_P5 5 | |||
| #define FAMILY_P6 6 | |||
| #define FAMILY_PM 7 | |||
| #define FAMILY_IA64 8 | |||
| #if defined(__i386__) || defined(__x86_64__) | |||
| #define GET_EXFAMILY 1 | |||
| #define GET_EXMODEL 2 | |||
| #define GET_TYPE 3 | |||
| #define GET_FAMILY 4 | |||
| #define GET_MODEL 5 | |||
| #define GET_APICID 6 | |||
| #define GET_LCOUNT 7 | |||
| #define GET_CHUNKS 8 | |||
| #define GET_STEPPING 9 | |||
| #define GET_BLANDID 10 | |||
| #define GET_FEATURE 11 | |||
| #define GET_NUMSHARE 12 | |||
| #define GET_NUMCORES 13 | |||
| #endif | |||
| #ifdef __ia64__ | |||
| #define GET_ARCHREV 1 | |||
| #define GET_FAMILY 2 | |||
| #define GET_MODEL 3 | |||
| #define GET_REVISION 4 | |||
| #define GET_NUMBER 5 | |||
| #endif | |||
| #define CORE_UNKNOWN 0 | |||
| #define CORE_80486 1 | |||
| #define CORE_P5 2 | |||
| #define CORE_P6 3 | |||
| #define CORE_KATMAI 4 | |||
| #define CORE_COPPERMINE 5 | |||
| #define CORE_NORTHWOOD 6 | |||
| #define CORE_PRESCOTT 7 | |||
| #define CORE_BANIAS 8 | |||
| #define CORE_ATHLON 9 | |||
| #define CORE_OPTERON 10 | |||
| #define CORE_BARCELONA 11 | |||
| #define CORE_VIAC3 12 | |||
| #define CORE_YONAH 13 | |||
| #define CORE_CORE2 14 | |||
| #define CORE_PENRYN 15 | |||
| #define CORE_DUNNINGTON 16 | |||
| #define CORE_NEHALEM 17 | |||
| #define CORE_ATOM 18 | |||
| #define CORE_NANO 19 | |||
| #define HAVE_SSE (1 << 0) | |||
| #define HAVE_SSE2 (1 << 1) | |||
| #define HAVE_SSE3 (1 << 2) | |||
| #define HAVE_SSSE3 (1 << 3) | |||
| #define HAVE_SSE4_1 (1 << 4) | |||
| #define HAVE_SSE4_2 (1 << 5) | |||
| #define HAVE_SSE4A (1 << 6) | |||
| #define HAVE_SSE5 (1 << 7) | |||
| #define HAVE_MMX (1 << 8) | |||
| #define HAVE_3DNOW (1 << 9) | |||
| #define HAVE_3DNOWEX (1 << 10) | |||
| #define HAVE_CMOV (1 << 11) | |||
| #define HAVE_PSE (1 << 12) | |||
| #define HAVE_CFLUSH (1 << 13) | |||
| #define HAVE_HIT (1 << 14) | |||
| #define HAVE_MISALIGNSSE (1 << 15) | |||
| #define HAVE_128BITFPU (1 << 16) | |||
| #define HAVE_FASTMOVU (1 << 17) | |||
| #define CACHE_INFO_L1_I 1 | |||
| #define CACHE_INFO_L1_D 2 | |||
| #define CACHE_INFO_L2 3 | |||
| #define CACHE_INFO_L3 4 | |||
| #define CACHE_INFO_L1_ITB 5 | |||
| #define CACHE_INFO_L1_DTB 6 | |||
| #define CACHE_INFO_L1_LITB 7 | |||
| #define CACHE_INFO_L1_LDTB 8 | |||
| #define CACHE_INFO_L2_ITB 9 | |||
| #define CACHE_INFO_L2_DTB 10 | |||
| #define CACHE_INFO_L2_LITB 11 | |||
| #define CACHE_INFO_L2_LDTB 12 | |||
| typedef struct { | |||
| int size; | |||
| int associative; | |||
| int linesize; | |||
| int shared; | |||
| } cache_info_t; | |||
| #define CPUTYPE_UNKNOWN 0 | |||
| #define CPUTYPE_INTEL_UNKNOWN 1 | |||
| #define CPUTYPE_UMC_UNKNOWN 2 | |||
| #define CPUTYPE_AMD_UNKNOWN 3 | |||
| #define CPUTYPE_CYRIX_UNKNOWN 4 | |||
| #define CPUTYPE_NEXGEN_UNKNOWN 5 | |||
| #define CPUTYPE_CENTAUR_UNKNOWN 6 | |||
| #define CPUTYPE_RISE_UNKNOWN 7 | |||
| #define CPUTYPE_SIS_UNKNOWN 8 | |||
| #define CPUTYPE_TRANSMETA_UNKNOWN 9 | |||
| #define CPUTYPE_NSC_UNKNOWN 10 | |||
| #define CPUTYPE_80386 11 | |||
| #define CPUTYPE_80486 12 | |||
| #define CPUTYPE_PENTIUM 13 | |||
| #define CPUTYPE_PENTIUM2 14 | |||
| #define CPUTYPE_PENTIUM3 15 | |||
| #define CPUTYPE_PENTIUMM 16 | |||
| #define CPUTYPE_PENTIUM4 17 | |||
| #define CPUTYPE_CORE2 18 | |||
| #define CPUTYPE_PENRYN 19 | |||
| #define CPUTYPE_DUNNINGTON 20 | |||
| #define CPUTYPE_NEHALEM 21 | |||
| #define CPUTYPE_ATOM 22 | |||
| #define CPUTYPE_ITANIUM 23 | |||
| #define CPUTYPE_ITANIUM2 24 | |||
| #define CPUTYPE_AMD5X86 25 | |||
| #define CPUTYPE_AMDK6 26 | |||
| #define CPUTYPE_ATHLON 27 | |||
| #define CPUTYPE_DURON 28 | |||
| #define CPUTYPE_OPTERON 29 | |||
| #define CPUTYPE_BARCELONA 30 | |||
| #define CPUTYPE_SHANGHAI 31 | |||
| #define CPUTYPE_ISTANBUL 32 | |||
| #define CPUTYPE_CYRIX5X86 33 | |||
| #define CPUTYPE_CYRIXM1 34 | |||
| #define CPUTYPE_CYRIXM2 35 | |||
| #define CPUTYPE_NEXGENNX586 36 | |||
| #define CPUTYPE_CENTAURC6 37 | |||
| #define CPUTYPE_RISEMP6 38 | |||
| #define CPUTYPE_SYS55X 39 | |||
| #define CPUTYPE_CRUSOETM3X 40 | |||
| #define CPUTYPE_NSGEODE 41 | |||
| #define CPUTYPE_VIAC3 42 | |||
| #define CPUTYPE_NANO 43 | |||
| #endif | |||
| @@ -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. */ | |||
| /*********************************************************************/ | |||
| #if defined(__alpha) && defined(__DECC) | |||
| #include <c_asm.h> | |||
| #endif | |||
| int implver(void){ | |||
| int arch; | |||
| #ifndef __DECC | |||
| asm __volatile__("implver %0" : "=r"(arch) : : "memory"); | |||
| #else | |||
| arch = asm("implver %v0"); | |||
| #endif | |||
| return arch; | |||
| } | |||
| void get_architecture(void){ | |||
| printf("ALPHA"); | |||
| } | |||
| void get_subarchitecture(void){ | |||
| printf("ev%d", implver() + 4); | |||
| } | |||
| void get_subdirname(void){ | |||
| printf("alpha"); | |||
| } | |||
| void get_cpuconfig(void){ | |||
| printf("#define EV%d\n", implver() + 4); | |||
| switch (implver()){ | |||
| case 0: | |||
| printf("#define L1_DATA_SIZE 16384\n"); | |||
| printf("#define L1_DATA_LINESIZE 32\n"); | |||
| printf("#define L2_SIZE 2097152\n"); | |||
| printf("#define L2_LINESIZE 32\n"); | |||
| printf("#define DTB_ENTRIES 32\n"); | |||
| printf("#define DTB_SIZE 8192\n"); | |||
| break; | |||
| case 1: | |||
| printf("#define L1_DATA_SIZE 16384\n"); | |||
| printf("#define L1_DATA_LINESIZE 32\n"); | |||
| printf("#define L2_SIZE 2097152\n"); | |||
| printf("#define L2_LINESIZE 64\n"); | |||
| printf("#define DTB_ENTRIES 64\n"); | |||
| printf("#define DTB_SIZE 8192\n"); | |||
| break; | |||
| case 2: | |||
| printf("#define L1_DATA_SIZE 32768\n"); | |||
| printf("#define L1_DATA_LINESIZE 64\n"); | |||
| printf("#define L2_SIZE 4194304\n"); | |||
| printf("#define L2_LINESIZE 64\n"); | |||
| printf("#define DTB_ENTRIES 64\n"); | |||
| printf("#define DTB_SIZE 8192\n"); | |||
| break; | |||
| } | |||
| } | |||
| void get_libname(void){ | |||
| printf("ev%d\n", implver() + 4); | |||
| } | |||
| @@ -0,0 +1,138 @@ | |||
| /*********************************************************************/ | |||
| /* 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 <stdio.h> | |||
| #include <string.h> | |||
| #include <sys/sysinfo.h> | |||
| #include "cpuid.h" | |||
| #ifdef __ECC | |||
| #include <ia64intrin.h> | |||
| #endif | |||
| static inline unsigned long cpuid(unsigned long regnum){ | |||
| unsigned long value; | |||
| #ifdef __ECC | |||
| value = __getIndReg(_IA64_REG_INDR_CPUID, regnum); | |||
| #else | |||
| asm ("mov %0=cpuid[%r1]" : "=r"(value) : "rO"(regnum)); | |||
| #endif | |||
| return value; | |||
| } | |||
| int have_cpuid(void){ return 1;} | |||
| int get_vendor(void){ | |||
| unsigned long cpuid0, cpuid1; | |||
| char vendor[18]; | |||
| cpuid0 = cpuid(0); | |||
| cpuid1 = cpuid(1); | |||
| *(unsigned long *)(&vendor[0]) = cpuid0; | |||
| *(unsigned long *)(&vendor[8]) = cpuid1; | |||
| vendor[17] = (char)0; | |||
| if (!strcmp(vendor, "GenuineIntel")) return VENDOR_INTEL; | |||
| return VENDOR_UNKNOWN; | |||
| } | |||
| int get_cputype(int gettype){ | |||
| unsigned long cpuid3; | |||
| cpuid3 = cpuid(3); | |||
| switch (gettype) { | |||
| case GET_ARCHREV : | |||
| return BITMASK(cpuid3, 32, 0xff); | |||
| case GET_FAMILY : | |||
| return BITMASK(cpuid3, 24, 0xff); | |||
| case GET_MODEL : | |||
| return BITMASK(cpuid3, 16, 0xff); | |||
| case GET_REVISION : | |||
| return BITMASK(cpuid3, 8, 0xff); | |||
| case GET_NUMBER : | |||
| return BITMASK(cpuid3, 0, 0xff); | |||
| } | |||
| return 0; | |||
| } | |||
| char *get_cpunamechar(void){ | |||
| if (get_cputype(GET_FAMILY) == 0x07) return "ITANIUM"; | |||
| if (get_cputype(GET_FAMILY) == 0x1f) return "ITANIUM2"; | |||
| if (get_cputype(GET_FAMILY) == 0x20) return "ITANIUM2"; | |||
| return "UNKNOWN"; | |||
| } | |||
| char *get_libname(void){ | |||
| if (get_cputype(GET_FAMILY) == 0x07) { printf("itanium"); return NULL;} | |||
| if (get_cputype(GET_FAMILY) == 0x1f) { printf("itanium2"); return NULL;} | |||
| if (get_cputype(GET_FAMILY) == 0x20) { printf("itanium2"); return NULL;} | |||
| printf("UNKNOWN"); | |||
| return NULL; | |||
| } | |||
| void get_architecture(void){ | |||
| printf("IA64"); | |||
| } | |||
| void get_subarchitecture(void){ | |||
| printf("%s", get_cpunamechar()); | |||
| } | |||
| void get_subdirname(void){ | |||
| printf("ia64"); | |||
| } | |||
| void get_cpuconfig(void){ | |||
| printf("#define %s\n", get_cpunamechar()); | |||
| printf("#define L1_DATA_SIZE 262144\n"); | |||
| printf("#define L1_DATA_LINESIZE 128\n"); | |||
| printf("#define L2_SIZE 1572864\n"); | |||
| printf("#define L2_LINESIZE 128\n"); | |||
| printf("#define DTB_SIZE 16384\n"); | |||
| printf("#define DTB_ENTRIES 128\n"); | |||
| } | |||
| @@ -0,0 +1,68 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| void get_architecture(void){ | |||
| printf("MIPS64"); | |||
| } | |||
| void get_subarchitecture(void){ | |||
| printf("SICORTEX"); | |||
| } | |||
| void get_subdirname(void){ | |||
| printf("mips64"); | |||
| } | |||
| void get_cpuconfig(void){ | |||
| printf("#define SICORTEX\n"); | |||
| printf("#define L1_DATA_SIZE 32768\n"); | |||
| printf("#define L1_DATA_LINESIZE 32\n"); | |||
| printf("#define L2_SIZE 512488\n"); | |||
| printf("#define L2_LINESIZE 32\n"); | |||
| printf("#define DTB_ENTRIES 32\n"); | |||
| printf("#define DTB_SIZE 4096\n"); | |||
| printf("#define L2_ASSOCIATIVE 8\n"); | |||
| } | |||
| void get_libname(void){ | |||
| #ifdef __mips64 | |||
| printf("mips64\n"); | |||
| #else | |||
| printf("mips32\n"); | |||
| #endif | |||
| } | |||
| @@ -0,0 +1,190 @@ | |||
| /*********************************************************************/ | |||
| /* 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 <sys/utsname.h> | |||
| #ifdef _AIX | |||
| #include <sys/vminfo.h> | |||
| #endif | |||
| #ifdef __APPLE__ | |||
| #include <mach/mach.h> | |||
| #include <mach/mach_host.h> | |||
| #include <mach/host_info.h> | |||
| #include <mach/machine.h> | |||
| #endif | |||
| #define CPUTYPE_UNKNOWN 0 | |||
| #define CPUTYPE_POWER3 1 | |||
| #define CPUTYPE_POWER4 2 | |||
| #define CPUTYPE_PPC970 3 | |||
| #define CPUTYPE_POWER5 4 | |||
| #define CPUTYPE_POWER6 5 | |||
| #define CPUTYPE_CELL 6 | |||
| #define CPUTYPE_PPCG4 7 | |||
| char *cpuname[] = { | |||
| "UNKNOWN", | |||
| "POWER3", | |||
| "POWER4", | |||
| "PPC970", | |||
| "POWER5", | |||
| "POWER6", | |||
| "CELL", | |||
| "PPCG4", | |||
| }; | |||
| char *lowercpuname[] = { | |||
| "unknown", | |||
| "power3", | |||
| "power4", | |||
| "ppc970", | |||
| "power5", | |||
| "power6", | |||
| "cell", | |||
| "ppcg4", | |||
| }; | |||
| char *corename[] = { | |||
| "UNKNOWN", | |||
| "POWER3", | |||
| "POWER4", | |||
| "POWER4", | |||
| "POWER4", | |||
| "POWER6", | |||
| "CELL", | |||
| "PPCG4", | |||
| }; | |||
| int detect(void){ | |||
| #ifdef linux | |||
| FILE *infile; | |||
| char buffer[512], *p; | |||
| p = (char *)NULL; | |||
| infile = fopen("/proc/cpuinfo", "r"); | |||
| while (fgets(buffer, sizeof(buffer), infile)){ | |||
| if (!strncmp("cpu", buffer, 3)){ | |||
| p = strchr(buffer, ':') + 2; | |||
| #if 0 | |||
| fprintf(stderr, "%s\n", p); | |||
| #endif | |||
| break; | |||
| } | |||
| } | |||
| fclose(infile); | |||
| if (!strncasecmp(p, "POWER3", 6)) return CPUTYPE_POWER3; | |||
| if (!strncasecmp(p, "POWER4", 6)) return CPUTYPE_POWER4; | |||
| if (!strncasecmp(p, "PPC970", 6)) return CPUTYPE_PPC970; | |||
| if (!strncasecmp(p, "POWER5", 6)) return CPUTYPE_POWER5; | |||
| if (!strncasecmp(p, "POWER6", 6)) return CPUTYPE_POWER6; | |||
| if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL; | |||
| if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4; | |||
| return CPUTYPE_UNKNOWN; | |||
| #endif | |||
| #ifdef _AIX | |||
| return CPUTYPE_POWER5; | |||
| #endif | |||
| #ifdef __APPLE__ | |||
| host_basic_info_data_t hostInfo; | |||
| mach_msg_type_number_t infoCount; | |||
| infoCount = HOST_BASIC_INFO_COUNT; | |||
| host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostInfo, &infoCount); | |||
| if (hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_7450) return CPUTYPE_PPCG4; | |||
| if (hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_970) return CPUTYPE_PPC970; | |||
| return CPUTYPE_PPC970; | |||
| #endif | |||
| } | |||
| void get_architecture(void){ | |||
| printf("POWER"); | |||
| } | |||
| void get_subdirname(void){ | |||
| printf("power"); | |||
| } | |||
| void get_subarchitecture(void){ | |||
| printf("%s", cpuname[detect()]); | |||
| } | |||
| void get_cpuconfig(void){ | |||
| #if 0 | |||
| #ifdef _AIX | |||
| struct vminfo info; | |||
| #endif | |||
| #endif | |||
| printf("#define %s\n", cpuname[detect()]); | |||
| printf("#define CORE_%s\n", corename[detect()]); | |||
| printf("#define L1_DATA_SIZE 32768\n"); | |||
| printf("#define L1_DATA_LINESIZE 128\n"); | |||
| printf("#define L2_SIZE 524288\n"); | |||
| printf("#define L2_LINESIZE 128 \n"); | |||
| printf("#define DTB_ENTRIES 128\n"); | |||
| printf("#define DTB_SIZE 4096\n"); | |||
| printf("#define L2_ASSOCIATIVE 8\n"); | |||
| #if 0 | |||
| #ifdef _AIX | |||
| if (vmgetinfo(&info, VMINFO, 0) == 0) { | |||
| if ((info.lgpg_size >> 20) >= 1024) { | |||
| printf("#define ALLOC_HUGETLB\n"); | |||
| } | |||
| } | |||
| #endif | |||
| #endif | |||
| } | |||
| void get_libname(void){ | |||
| printf("%s", lowercpuname[detect()]); | |||
| } | |||
| char *get_corename(void){ | |||
| return cpuname[detect()]; | |||
| } | |||
| @@ -0,0 +1,58 @@ | |||
| /*********************************************************************/ | |||
| /* 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. */ | |||
| /*********************************************************************/ | |||
| void get_architecture(void){ | |||
| printf("SPARC"); | |||
| } | |||
| void get_subarchitecture(void){ | |||
| printf("v9"); | |||
| } | |||
| void get_subdirname(void){ | |||
| printf("sparc"); | |||
| } | |||
| void get_cpuconfig(void){ | |||
| printf("#define V9\n"); | |||
| printf("#define DTB_ENTRIES 32\n"); | |||
| } | |||
| void get_libname(void){ | |||
| printf("v9\n"); | |||
| } | |||
| @@ -0,0 +1,107 @@ | |||
| #if defined(__PGI) || defined(__PGIC__) | |||
| COMPILER_PGI | |||
| #endif | |||
| #if defined(__PATHSCALE__) || defined(__PATHCC__) | |||
| COMPILER_PATHSCALE | |||
| #endif | |||
| #if defined(__INTEL_COMPILER) || defined(__ICC) || defined(__ECC) | |||
| COMPILER_INTEL | |||
| #endif | |||
| #if defined(__OPENCC__) | |||
| COMPILER_OPEN64 | |||
| #endif | |||
| #if defined(__SUNPRO_C) | |||
| COMPILER_SUN | |||
| #endif | |||
| #if defined(__IBMC__) || defined(__xlc__) | |||
| COMPILER_IBM | |||
| #endif | |||
| #if defined(__DECCC__) | |||
| COMPILER_DEC | |||
| #endif | |||
| #if defined(__GNUC__) | |||
| COMPILER_GNU | |||
| #endif | |||
| #if defined(__linux__) | |||
| OS_LINUX | |||
| #endif | |||
| #if defined(__FreeBSD__) | |||
| OS_FreeBSD | |||
| #endif | |||
| #if defined(__NetBSD__) | |||
| OS_NetBSD | |||
| #endif | |||
| #if defined(__sun) | |||
| OS_SunOS | |||
| #endif | |||
| #if defined(__APPLE__) | |||
| OS_Darwin | |||
| #endif | |||
| #if defined(_AIX) | |||
| OS_AIX | |||
| #endif | |||
| #if defined(__OSF) | |||
| OS_OSF | |||
| #endif | |||
| #if defined(__WIN32) || defined(__WIN64) || defined(__WINNT) | |||
| OS_WINNT | |||
| #endif | |||
| #if defined(__CYGWIN__) | |||
| OS_CYGWIN | |||
| #endif | |||
| #if defined(__INTERIX) | |||
| OS_INTERIX | |||
| #endif | |||
| #if defined(__i386) || defined(_X86) | |||
| ARCH_X86 | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__amd64__) | |||
| ARCH_X86_64 | |||
| #endif | |||
| #if defined(__powerpc___) || defined(__PPC__) || defined(_POWER) | |||
| ARCH_POWER | |||
| #endif | |||
| #ifdef __mips64 | |||
| ARCH_MIPS64 | |||
| #endif | |||
| #if defined(__mips32) || defined(__mips) | |||
| ARCH_MIPS32 | |||
| #endif | |||
| #ifdef __alpha | |||
| ARCH_ALPHA | |||
| #endif | |||
| #if defined(__sparc) || defined(__sparc__) | |||
| ARCH_SPARC | |||
| #endif | |||
| #if defined(__ia64__) || defined(__ia64) | |||
| ARCH_IA64 | |||
| #endif | |||
| #if defined(__LP64) || defined(__LP64__) || defined(__ptr64) || defined(__x86_64__) || defined(__amd64__) || defined(__64BIT__) | |||
| BINARY_64 | |||
| #endif | |||
| @@ -0,0 +1,23 @@ | |||
| This directory contains the reference implementation of BLAS | |||
| which is obtainable at: http://netlib.org/blas/ | |||
| The license, obtained from http://netlib.org/blas/faq.html#2 on November 3, | |||
| 2010, is as follows: | |||
| 2) Are there legal restrictions on the use of BLAS reference implementation | |||
| software? | |||
| The reference BLAS is a freely-available software package. It is available from | |||
| netlib via anonymous ftp and the World Wide Web. Thus, it can be included in | |||
| commercial software packages (and has been). We only ask that proper credit be | |||
| given to the authors. | |||
| Like all software, it is copyrighted. It is not trademarked, but we do ask the | |||
| following: | |||
| If you modify the source for these routines we ask that you change the name of | |||
| the routine and comment the changes made to the original. | |||
| We will gladly answer any questions regarding the software. If a modification | |||
| is done, however, it is the responsibility of the person who modified the | |||
| routine to provide support. | |||
| @@ -0,0 +1,93 @@ | |||
| # | |||
| # The Makefile compiles c wrappers and testers for CBLAS. | |||
| # | |||
| TOPDIR = .. | |||
| include $(TOPDIR)/Makefile.system | |||
| CFLAGS += -DADD$(BU) -DCBLAS | |||
| LIB = $(TOPDIR)/$(LIBNAME) | |||
| stestl1o = c_sblas1.o | |||
| stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o constant.o | |||
| stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o constant.o | |||
| dtestl1o = c_dblas1.o | |||
| dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o constant.o | |||
| dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o constant.o | |||
| ctestl1o = c_cblas1.o | |||
| ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o constant.o | |||
| ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o constant.o | |||
| ztestl1o = c_zblas1.o | |||
| ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o constant.o | |||
| ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o constant.o | |||
| all :: all1 all2 all3 | |||
| all1: xscblat1 xdcblat1 xccblat1 xzcblat1 | |||
| GOTO_NUM_THREADS=2 ./xscblat1 | |||
| GOTO_NUM_THREADS=2 ./xdcblat1 | |||
| GOTO_NUM_THREADS=2 ./xccblat1 | |||
| GOTO_NUM_THREADS=2 ./xzcblat1 | |||
| all2: xscblat2 xdcblat2 xccblat2 xzcblat2 | |||
| GOTO_NUM_THREADS=2 ./xscblat2 < sin2 | |||
| GOTO_NUM_THREADS=2 ./xdcblat2 < din2 | |||
| GOTO_NUM_THREADS=2 ./xccblat2 < cin2 | |||
| GOTO_NUM_THREADS=2 ./xzcblat2 < zin2 | |||
| all3: xscblat3 xdcblat3 xccblat3 xzcblat3 | |||
| GOTO_NUM_THREADS=2 ./xscblat3 < sin3 | |||
| GOTO_NUM_THREADS=2 ./xdcblat3 < din3 | |||
| GOTO_NUM_THREADS=2 ./xccblat3 < cin3 | |||
| GOTO_NUM_THREADS=2 ./xzcblat3 < zin3 | |||
| clean :: | |||
| rm -f x* | |||
| FLDFLAGS = $(FFLAGS:-fPIC=) | |||
| CEXTRALIB = | |||
| # Single real | |||
| xscblat1: $(stestl1o) c_sblat1.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xscblat2: $(stestl2o) c_sblat2.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xscblat3: $(stestl3o) c_sblat3.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| # Double real | |||
| xdcblat1: $(dtestl1o) c_dblat1.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xdcblat2: $(dtestl2o) c_dblat2.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xdcblat3: $(dtestl3o) c_dblat3.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| # Single complex | |||
| xccblat1: $(ctestl1o) c_cblat1.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xccblat2: $(ctestl2o) c_cblat2.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xccblat3: $(ctestl3o) c_cblat3.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| # Double complex | |||
| xzcblat1: $(ztestl1o) c_zblat1.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xzcblat2: $(ztestl2o) c_zblat2.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| xzcblat3: $(ztestl3o) c_zblat3.o $(TOPDIR)/$(LIBNAME) | |||
| $(FC) $(FLDFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB) | |||
| include $(TOPDIR)/Makefile.tail | |||
| @@ -0,0 +1,38 @@ | |||
| /* | |||
| * Written by T. H. Do, 1/23/98, SGI/CRAY Research. | |||
| */ | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void get_transpose_type(char *type, enum CBLAS_TRANSPOSE *trans) { | |||
| if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) ) | |||
| *trans = CblasNoTrans; | |||
| else if( (strncmp( type,"t",1 )==0)||(strncmp( type,"T",1 )==0) ) | |||
| *trans = CblasTrans; | |||
| else if( (strncmp( type,"c",1 )==0)||(strncmp( type,"C",1 )==0) ) | |||
| *trans = CblasConjTrans; | |||
| else *trans = UNDEFINED; | |||
| } | |||
| void get_uplo_type(char *type, enum CBLAS_UPLO *uplo) { | |||
| if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) ) | |||
| *uplo = CblasUpper; | |||
| else if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) ) | |||
| *uplo = CblasLower; | |||
| else *uplo = UNDEFINED; | |||
| } | |||
| void get_diag_type(char *type, enum CBLAS_DIAG *diag) { | |||
| if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) ) | |||
| *diag = CblasUnit; | |||
| else if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) ) | |||
| *diag = CblasNonUnit; | |||
| else *diag = UNDEFINED; | |||
| } | |||
| void get_side_type(char *type, enum CBLAS_SIDE *side) { | |||
| if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) ) | |||
| *side = CblasLeft; | |||
| else if( (strncmp( type,"r",1 )==0)||(strncmp( type,"R",1 )==0) ) | |||
| *side = CblasRight; | |||
| else *side = UNDEFINED; | |||
| } | |||
| @@ -0,0 +1,826 @@ | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| int cblas_ok, cblas_lerr, cblas_info; | |||
| int link_xerbla=TRUE; | |||
| char *cblas_rout; | |||
| #ifdef F77_Char | |||
| void F77_xerbla(F77_Char F77_srname, void *vinfo); | |||
| #else | |||
| void F77_xerbla(char *srname, void *vinfo); | |||
| #endif | |||
| void chkxer(void) { | |||
| extern int cblas_ok, cblas_lerr, cblas_info; | |||
| extern int link_xerbla; | |||
| extern char *cblas_rout; | |||
| if (cblas_lerr == 1 ) { | |||
| printf("***** ILLEGAL VALUE OF PARAMETER NUMBER %d NOT DETECTED BY %s *****\n", cblas_info, cblas_rout); | |||
| cblas_ok = 0 ; | |||
| } | |||
| cblas_lerr = 1 ; | |||
| } | |||
| void F77_c2chke(char *rout) { | |||
| char *sf = ( rout ) ; | |||
| float A[2] = {0.0,0.0}, | |||
| X[2] = {0.0,0.0}, | |||
| Y[2] = {0.0,0.0}, | |||
| ALPHA[2] = {0.0,0.0}, | |||
| BETA[2] = {0.0,0.0}, | |||
| RALPHA = 0.0; | |||
| extern int cblas_info, cblas_lerr, cblas_ok; | |||
| extern int RowMajorStrg; | |||
| extern char *cblas_rout; | |||
| if (link_xerbla) /* call these first to link */ | |||
| { | |||
| cblas_xerbla(cblas_info,cblas_rout,""); | |||
| F77_xerbla(cblas_rout,&cblas_info); | |||
| } | |||
| cblas_ok = TRUE ; | |||
| cblas_lerr = PASSED ; | |||
| if (strncmp( sf,"cblas_cgemv",11)==0) { | |||
| cblas_rout = "cblas_cgemv"; | |||
| cblas_info = 1; | |||
| cblas_cgemv(INVALID, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, CblasNoTrans, 2, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_cgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, CblasNoTrans, 0, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_cgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_cgbmv",11)==0) { | |||
| cblas_rout = "cblas_cgbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(INVALID, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = FALSE; | |||
| cblas_cgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = TRUE; | |||
| cblas_cgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_chemv",11)==0) { | |||
| cblas_rout = "cblas_chemv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_chemv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chemv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chemv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_chemv(CblasColMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_chemv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_chemv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_chemv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_chemv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_chemv(CblasRowMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_chemv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_chemv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_chbmv",11)==0) { | |||
| cblas_rout = "cblas_chbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_chbmv(INVALID, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_chbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_chbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_chpmv",11)==0) { | |||
| cblas_rout = "cblas_chpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_chpmv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chpmv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chpmv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_chpmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_chpmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_chpmv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_chpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_chpmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_chpmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctrmv",11)==0) { | |||
| cblas_rout = "cblas_ctrmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctbmv",11)==0) { | |||
| cblas_rout = "cblas_ctbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_ctbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_ctbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctpmv",11)==0) { | |||
| cblas_rout = "cblas_ctpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ctpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctpmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ctpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctrsv",11)==0) { | |||
| cblas_rout = "cblas_ctrsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctbsv",11)==0) { | |||
| cblas_rout = "cblas_ctbsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_ctbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_ctbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ctpsv",11)==0) { | |||
| cblas_rout = "cblas_ctpsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ctpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ctpsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ctpsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ctpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ctpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ctpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_cgeru",10)==0) { | |||
| cblas_rout = "cblas_cgeru"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_cgeru(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cgeru(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cgeru(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_cgeru(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_cgeru(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_cgeru(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_cgeru(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cgeru(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_cgeru(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_cgeru(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_cgeru(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_cgerc",10)==0) { | |||
| cblas_rout = "cblas_cgerc"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_cgerc(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cgerc(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cgerc(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_cgerc(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_cgerc(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_cgerc(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_cgerc(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cgerc(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_cgerc(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_cgerc(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_cgerc(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_cher2",11)==0) { | |||
| cblas_rout = "cblas_cher2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_cher2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cher2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cher2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_cher2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_cher2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_cher2(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_cher2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cher2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_cher2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_cher2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_cher2(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_chpr2",11)==0) { | |||
| cblas_rout = "cblas_chpr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_chpr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chpr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chpr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_chpr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_chpr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_chpr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_chpr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_chpr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_chpr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_cher",10)==0) { | |||
| cblas_rout = "cblas_cher"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_cher(INVALID, CblasUpper, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_cher(CblasColMajor, INVALID, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_cher(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_cher(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_cher(CblasColMajor, CblasUpper, 2, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_cher(CblasRowMajor, INVALID, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_cher(CblasRowMajor, CblasUpper, INVALID, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_cher(CblasRowMajor, CblasUpper, 0, RALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_cher(CblasRowMajor, CblasUpper, 2, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_chpr",10)==0) { | |||
| cblas_rout = "cblas_chpr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_chpr(INVALID, CblasUpper, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, INVALID, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, INVALID, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_chpr(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A ); | |||
| chkxer(); | |||
| } | |||
| if (cblas_ok == TRUE) | |||
| printf(" %-12s PASSED THE TESTS OF ERROR-EXITS\n", cblas_rout); | |||
| else | |||
| printf("******* %s FAILED THE TESTS OF ERROR-EXITS *******\n",cblas_rout); | |||
| } | |||
| @@ -0,0 +1,75 @@ | |||
| /* | |||
| * c_cblas1.c | |||
| * | |||
| * The program is a C wrapper for ccblat1. | |||
| * | |||
| * Written by Keita Teranishi. 2/11/1998 | |||
| * | |||
| */ | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_caxpy(const int *N, const void *alpha, void *X, | |||
| const int *incX, void *Y, const int *incY) | |||
| { | |||
| cblas_caxpy(*N, alpha, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| void F77_ccopy(const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY) | |||
| { | |||
| cblas_ccopy(*N, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| void F77_cdotc(const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY, void *dotc) | |||
| { | |||
| cblas_cdotc_sub(*N, X, *incX, Y, *incY, dotc); | |||
| return; | |||
| } | |||
| void F77_cdotu(const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY,void *dotu) | |||
| { | |||
| cblas_cdotu_sub(*N, X, *incX, Y, *incY, dotu); | |||
| return; | |||
| } | |||
| void F77_cscal(const int *N, const void * *alpha, void *X, | |||
| const int *incX) | |||
| { | |||
| cblas_cscal(*N, alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_csscal(const int *N, const float *alpha, void *X, | |||
| const int *incX) | |||
| { | |||
| cblas_csscal(*N, *alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_cswap( const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY) | |||
| { | |||
| cblas_cswap(*N,X,*incX,Y,*incY); | |||
| return; | |||
| } | |||
| int F77_icamax(const int *N, const void *X, const int *incX) | |||
| { | |||
| if (*N < 1 || *incX < 1) return(0); | |||
| return (cblas_icamax(*N, X, *incX)+1); | |||
| } | |||
| float F77_scnrm2(const int *N, const void *X, const int *incX) | |||
| { | |||
| return cblas_scnrm2(*N, X, *incX); | |||
| } | |||
| float F77_scasum(const int *N, void *X, const int *incX) | |||
| { | |||
| return cblas_scasum(*N, X, *incX); | |||
| } | |||
| @@ -0,0 +1,807 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 4/08/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_cgemv(int *order, char *transp, int *m, int *n, | |||
| const void *alpha, | |||
| CBLAS_TEST_COMPLEX *a, int *lda, const void *x, int *incx, | |||
| const void *beta, void *y, int *incy) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = (CBLAS_TEST_COMPLEX *)malloc( (*m)*LDA*sizeof( CBLAS_TEST_COMPLEX) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_cgemv( CblasRowMajor, trans, *m, *n, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cgemv( CblasColMajor, trans, | |||
| *m, *n, alpha, a, *lda, x, *incx, beta, y, *incy ); | |||
| else | |||
| cblas_cgemv( UNDEFINED, trans, | |||
| *m, *n, alpha, a, *lda, x, *incx, beta, y, *incy ); | |||
| } | |||
| void F77_cgbmv(int *order, char *transp, int *m, int *n, int *kl, int *ku, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, | |||
| CBLAS_TEST_COMPLEX *beta, CBLAS_TEST_COMPLEX *y, int *incy) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,irow,jcol,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *ku+*kl+2; | |||
| A=( CBLAS_TEST_COMPLEX* )malloc((*n+*kl)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*ku; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=(*ku)-i; | |||
| for( j=jcol; j<*n; j++ ){ | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*ku; | |||
| irow=*ku+*kl-i; | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=*ku+1; i<*ku+*kl+1; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=i-(*ku); | |||
| for( j=jcol; j<(*n+*kl); j++ ){ | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| cblas_cgbmv( CblasRowMajor, trans, *m, *n, *kl, *ku, alpha, A, LDA, x, | |||
| *incx, beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cgbmv( CblasColMajor, trans, *m, *n, *kl, *ku, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| else | |||
| cblas_cgbmv( UNDEFINED, trans, *m, *n, *kl, *ku, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| } | |||
| void F77_cgeru(int *order, int *m, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *y, int *incy, | |||
| CBLAS_TEST_COMPLEX *a, int *lda){ | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_cgeru( CblasRowMajor, *m, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cgeru( CblasColMajor, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| else | |||
| cblas_cgeru( UNDEFINED, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_cgerc(int *order, int *m, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *y, int *incy, | |||
| CBLAS_TEST_COMPLEX *a, int *lda) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_cgerc( CblasRowMajor, *m, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cgerc( CblasColMajor, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| else | |||
| cblas_cgerc( UNDEFINED, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_chemv(int *order, char *uplow, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, | |||
| int *incx, CBLAS_TEST_COMPLEX *beta, CBLAS_TEST_COMPLEX *y, int *incy){ | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = (CBLAS_TEST_COMPLEX *)malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_chemv( CblasRowMajor, uplo, *n, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chemv( CblasColMajor, uplo, *n, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| else | |||
| cblas_chemv( UNDEFINED, uplo, *n, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| } | |||
| void F77_chbmv(int *order, char *uplow, int *n, int *k, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *beta, | |||
| CBLAS_TEST_COMPLEX *y, int *incy){ | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,irow,j,jcol,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_chbmv(CblasRowMajor, UNDEFINED, *n, *k, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| else { | |||
| LDA = *k+2; | |||
| A =(CBLAS_TEST_COMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_chbmv( CblasRowMajor, uplo, *n, *k, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chbmv(CblasColMajor, uplo, *n, *k, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| else | |||
| cblas_chbmv(UNDEFINED, uplo, *n, *k, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| } | |||
| void F77_chpmv(int *order, char *uplow, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *ap, CBLAS_TEST_COMPLEX *x, int *incx, | |||
| CBLAS_TEST_COMPLEX *beta, CBLAS_TEST_COMPLEX *y, int *incy){ | |||
| CBLAS_TEST_COMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_chpmv(CblasRowMajor, UNDEFINED, *n, alpha, ap, x, *incx, | |||
| beta, y, *incy); | |||
| else { | |||
| LDA = *n; | |||
| A = (CBLAS_TEST_COMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX )); | |||
| AP = (CBLAS_TEST_COMPLEX* )malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_COMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_chpmv( CblasRowMajor, uplo, *n, alpha, AP, x, *incx, beta, y, | |||
| *incy ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chpmv( CblasColMajor, uplo, *n, alpha, ap, x, *incx, beta, y, | |||
| *incy ); | |||
| else | |||
| cblas_chpmv( UNDEFINED, uplo, *n, alpha, ap, x, *incx, beta, y, | |||
| *incy ); | |||
| } | |||
| void F77_ctbmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ctbmv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, | |||
| x, *incx); | |||
| else { | |||
| LDA = *k+2; | |||
| A=(CBLAS_TEST_COMPLEX *)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_ctbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, | |||
| *incx); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| else | |||
| cblas_ctbmv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_ctbsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ctbsv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, x, | |||
| *incx); | |||
| else { | |||
| LDA = *k+2; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_ctbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, | |||
| x, *incx); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| else | |||
| cblas_ctbsv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_ctpmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_COMPLEX *ap, CBLAS_TEST_COMPLEX *x, int *incx) { | |||
| CBLAS_TEST_COMPLEX *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ctpmv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| AP=(CBLAS_TEST_COMPLEX*)malloc((((LDA+1)*LDA)/2)* | |||
| sizeof(CBLAS_TEST_COMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_ctpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| else | |||
| cblas_ctpmv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_ctpsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_COMPLEX *ap, CBLAS_TEST_COMPLEX *x, int *incx) { | |||
| CBLAS_TEST_COMPLEX *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ctpsv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| AP=(CBLAS_TEST_COMPLEX*)malloc((((LDA+1)*LDA)/2)* | |||
| sizeof(CBLAS_TEST_COMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_ctpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| else | |||
| cblas_ctpsv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_ctrmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA=*n+1; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_ctrmv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctrmv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| else | |||
| cblas_ctrmv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| } | |||
| void F77_ctrsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A =(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_ctrsv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctrsv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| else | |||
| cblas_ctrsv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| } | |||
| void F77_chpr(int *order, char *uplow, int *n, float *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *ap) { | |||
| CBLAS_TEST_COMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_chpr(CblasRowMajor, UNDEFINED, *n, *alpha, x, *incx, ap ); | |||
| else { | |||
| LDA = *n; | |||
| A = (CBLAS_TEST_COMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| AP = ( CBLAS_TEST_COMPLEX* )malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_COMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ){ | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ){ | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ){ | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ){ | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_chpr(CblasRowMajor, uplo, *n, *alpha, x, *incx, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ){ | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ){ | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ){ | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ){ | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chpr(CblasColMajor, uplo, *n, *alpha, x, *incx, ap ); | |||
| else | |||
| cblas_chpr(UNDEFINED, uplo, *n, *alpha, x, *incx, ap ); | |||
| } | |||
| void F77_chpr2(int *order, char *uplow, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *y, int *incy, | |||
| CBLAS_TEST_COMPLEX *ap) { | |||
| CBLAS_TEST_COMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_chpr2( CblasRowMajor, UNDEFINED, *n, alpha, x, *incx, y, | |||
| *incy, ap ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc( LDA*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| AP=(CBLAS_TEST_COMPLEX*)malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_COMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_chpr2( CblasRowMajor, uplo, *n, alpha, x, *incx, y, *incy, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chpr2( CblasColMajor, uplo, *n, alpha, x, *incx, y, *incy, ap ); | |||
| else | |||
| cblas_chpr2( UNDEFINED, uplo, *n, alpha, x, *incx, y, *incy, ap ); | |||
| } | |||
| void F77_cher(int *order, char *uplow, int *n, float *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *a, int *lda) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc((*n)*LDA*sizeof( CBLAS_TEST_COMPLEX )); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_cher(CblasRowMajor, uplo, *n, *alpha, x, *incx, A, LDA ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cher( CblasColMajor, uplo, *n, *alpha, x, *incx, a, *lda ); | |||
| else | |||
| cblas_cher( UNDEFINED, uplo, *n, *alpha, x, *incx, a, *lda ); | |||
| } | |||
| void F77_cher2(int *order, char *uplow, int *n, CBLAS_TEST_COMPLEX *alpha, | |||
| CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *y, int *incy, | |||
| CBLAS_TEST_COMPLEX *a, int *lda) { | |||
| CBLAS_TEST_COMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A= ( CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_cher2(CblasRowMajor, uplo, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cher2( CblasColMajor, uplo, *n, alpha, x, *incx, y, *incy, a, *lda); | |||
| else | |||
| cblas_cher2( UNDEFINED, uplo, *n, alpha, x, *incx, y, *incy, a, *lda); | |||
| } | |||
| @@ -0,0 +1,565 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 4/15/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| #define TEST_COL_MJR 0 | |||
| #define TEST_ROW_MJR 1 | |||
| #define UNDEFINED -1 | |||
| void F77_cgemm(int *order, char *transpa, char *transpb, int *m, int *n, | |||
| int *k, CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *b, int *ldb, CBLAS_TEST_COMPLEX *beta, | |||
| CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_COMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_TRANSPOSE transa, transb; | |||
| get_transpose_type(transpa, &transa); | |||
| get_transpose_type(transpb, &transb); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (transa == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_COMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| if (transb == CblasNoTrans) { | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDB*sizeof(CBLAS_TEST_COMPLEX) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDB = *k+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc(LDB*(*n)*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_cgemm( CblasRowMajor, transa, transb, *m, *n, *k, alpha, A, LDA, | |||
| B, LDB, beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cgemm( CblasColMajor, transa, transb, *m, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| else | |||
| cblas_cgemm( UNDEFINED, transa, transb, *m, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| } | |||
| void F77_chemm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *b, int *ldb, CBLAS_TEST_COMPLEX *beta, | |||
| CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_COMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A= (CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_chemm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB, | |||
| beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_chemm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| else | |||
| cblas_chemm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| } | |||
| void F77_csymm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *b, int *ldb, CBLAS_TEST_COMPLEX *beta, | |||
| CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_COMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX )); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_csymm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB, | |||
| beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_csymm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| else | |||
| cblas_csymm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| } | |||
| void F77_cherk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| float *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| float *beta, CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| CBLAS_TEST_COMPLEX *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_cherk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cherk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_cherk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_csyrk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *beta, CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| CBLAS_TEST_COMPLEX *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_csyrk(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_csyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_csyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_cher2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *b, int *ldb, float *beta, | |||
| CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| CBLAS_TEST_COMPLEX *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX )); | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_COMPLEX )); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc( LDA*(*k)*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| B=(CBLAS_TEST_COMPLEX* )malloc( LDB*(*k)*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_cher2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_cher2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_cher2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_csyr2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, int *lda, | |||
| CBLAS_TEST_COMPLEX *b, int *ldb, CBLAS_TEST_COMPLEX *beta, | |||
| CBLAS_TEST_COMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| CBLAS_TEST_COMPLEX *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_COMPLEX)); | |||
| B=(CBLAS_TEST_COMPLEX* )malloc(LDB*(*k)*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_COMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_csyr2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, | |||
| B, LDB, beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_csyr2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| else | |||
| cblas_csyr2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| } | |||
| void F77_ctrmm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, | |||
| int *lda, CBLAS_TEST_COMPLEX *b, int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| CBLAS_TEST_COMPLEX *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| cblas_ctrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| b[j*(*ldb)+i].real=B[i*LDB+j].real; | |||
| b[j*(*ldb)+i].imag=B[i*LDB+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_ctrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| void F77_ctrsm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *a, | |||
| int *lda, CBLAS_TEST_COMPLEX *b, int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| CBLAS_TEST_COMPLEX *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc( (*m)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| cblas_ctrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| b[j*(*ldb)+i].real=B[i*LDB+j].real; | |||
| b[j*(*ldb)+i].imag=B[i*LDB+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ctrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_ctrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| @@ -0,0 +1,682 @@ | |||
| PROGRAM CCBLAT1 | |||
| * Test program for the COMPLEX Level 1 CBLAS. | |||
| * Based upon the original CBLAS test routine together with: | |||
| * F06GAF Example Program Text | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SFAC | |||
| INTEGER IC | |||
| * .. External Subroutines .. | |||
| EXTERNAL CHECK1, CHECK2, HEADER | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SFAC/9.765625E-4/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) | |||
| DO 20 IC = 1, 10 | |||
| ICASE = IC | |||
| CALL HEADER | |||
| * | |||
| * Initialize PASS, INCX, INCY, and MODE for a new case. | |||
| * The value 9999 for INCX, INCY or MODE will appear in the | |||
| * detailed output, if any, for cases that do not involve | |||
| * these parameters. | |||
| * | |||
| PASS = .TRUE. | |||
| INCX = 9999 | |||
| INCY = 9999 | |||
| MODE = 9999 | |||
| IF (ICASE.LE.5) THEN | |||
| CALL CHECK2(SFAC) | |||
| ELSE IF (ICASE.GE.6) THEN | |||
| CALL CHECK1(SFAC) | |||
| END IF | |||
| IF (PASS) WRITE (NOUT,99998) | |||
| 20 CONTINUE | |||
| STOP | |||
| * | |||
| 99999 FORMAT (' Complex CBLAS Test Program Results',/1X) | |||
| 99998 FORMAT (' ----- PASS -----') | |||
| END | |||
| SUBROUTINE HEADER | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Arrays .. | |||
| CHARACTER*15 L(10) | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA L(1)/'CBLAS_CDOTC'/ | |||
| DATA L(2)/'CBLAS_CDOTU'/ | |||
| DATA L(3)/'CBLAS_CAXPY'/ | |||
| DATA L(4)/'CBLAS_CCOPY'/ | |||
| DATA L(5)/'CBLAS_CSWAP'/ | |||
| DATA L(6)/'CBLAS_SCNRM2'/ | |||
| DATA L(7)/'CBLAS_SCASUM'/ | |||
| DATA L(8)/'CBLAS_CSCAL'/ | |||
| DATA L(9)/'CBLAS_CSSCAL'/ | |||
| DATA L(10)/'CBLAS_ICAMAX'/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) ICASE, L(ICASE) | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (/' Test of subprogram number',I3,9X,A15) | |||
| END | |||
| SUBROUTINE CHECK1(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| COMPLEX CA | |||
| REAL SA | |||
| INTEGER I, J, LEN, NP1 | |||
| * .. Local Arrays .. | |||
| COMPLEX CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8), | |||
| + MWPCS(5), MWPCT(5) | |||
| REAL STRUE2(5), STRUE4(5) | |||
| INTEGER ITRUE3(5) | |||
| * .. External Functions .. | |||
| REAL SCASUMTEST, SCNRM2TEST | |||
| INTEGER ICAMAXTEST | |||
| EXTERNAL SCASUMTEST, SCNRM2TEST, ICAMAXTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL CSCAL, CSSCALTEST, CTEST, ITEST1, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC MAX | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA, CA/0.3E0, (0.4E0,-0.7E0)/ | |||
| DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (0.3E0,-0.4E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (0.1E0,-0.3E0), (0.5E0,-0.1E0), (5.0E0,6.0E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (0.1E0,0.1E0), | |||
| + (-0.6E0,0.1E0), (0.1E0,-0.3E0), (7.0E0,8.0E0), | |||
| + (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0), | |||
| + (7.0E0,8.0E0), (0.3E0,0.1E0), (0.1E0,0.4E0), | |||
| + (0.4E0,0.1E0), (0.1E0,0.2E0), (2.0E0,3.0E0), | |||
| + (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/ | |||
| DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (0.3E0,-0.4E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (0.1E0,-0.3E0), (8.0E0,9.0E0), (0.5E0,-0.1E0), | |||
| + (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0), | |||
| + (2.0E0,5.0E0), (2.0E0,5.0E0), (0.1E0,0.1E0), | |||
| + (3.0E0,6.0E0), (-0.6E0,0.1E0), (4.0E0,7.0E0), | |||
| + (0.1E0,-0.3E0), (7.0E0,2.0E0), (7.0E0,2.0E0), | |||
| + (7.0E0,2.0E0), (0.3E0,0.1E0), (5.0E0,8.0E0), | |||
| + (0.1E0,0.4E0), (6.0E0,9.0E0), (0.4E0,0.1E0), | |||
| + (8.0E0,3.0E0), (0.1E0,0.2E0), (9.0E0,4.0E0)/ | |||
| DATA STRUE2/0.0E0, 0.5E0, 0.6E0, 0.7E0, 0.7E0/ | |||
| DATA STRUE4/0.0E0, 0.7E0, 1.0E0, 1.3E0, 1.7E0/ | |||
| DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (-0.16E0,-0.37E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (-0.17E0,-0.19E0), (0.13E0,-0.39E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0), | |||
| + (0.11E0,-0.03E0), (-0.17E0,0.46E0), | |||
| + (-0.17E0,-0.19E0), (7.0E0,8.0E0), (7.0E0,8.0E0), | |||
| + (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0), | |||
| + (0.19E0,-0.17E0), (0.32E0,0.09E0), | |||
| + (0.23E0,-0.24E0), (0.18E0,0.01E0), | |||
| + (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0), | |||
| + (2.0E0,3.0E0)/ | |||
| DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (-0.16E0,-0.37E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (-0.17E0,-0.19E0), (8.0E0,9.0E0), | |||
| + (0.13E0,-0.39E0), (2.0E0,5.0E0), (2.0E0,5.0E0), | |||
| + (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0), | |||
| + (0.11E0,-0.03E0), (3.0E0,6.0E0), | |||
| + (-0.17E0,0.46E0), (4.0E0,7.0E0), | |||
| + (-0.17E0,-0.19E0), (7.0E0,2.0E0), (7.0E0,2.0E0), | |||
| + (7.0E0,2.0E0), (0.19E0,-0.17E0), (5.0E0,8.0E0), | |||
| + (0.32E0,0.09E0), (6.0E0,9.0E0), | |||
| + (0.23E0,-0.24E0), (8.0E0,3.0E0), | |||
| + (0.18E0,0.01E0), (9.0E0,4.0E0)/ | |||
| DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0), | |||
| + (1.0E0,2.0E0), (0.09E0,-0.12E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0), | |||
| + (0.03E0,-0.09E0), (0.15E0,-0.03E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0), | |||
| + (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0), | |||
| + (0.03E0,0.03E0), (-0.18E0,0.03E0), | |||
| + (0.03E0,-0.09E0), (7.0E0,8.0E0), (7.0E0,8.0E0), | |||
| + (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0), | |||
| + (0.09E0,0.03E0), (0.03E0,0.12E0), | |||
| + (0.12E0,0.03E0), (0.03E0,0.06E0), (2.0E0,3.0E0), | |||
| + (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/ | |||
| DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0), | |||
| + (4.0E0,5.0E0), (0.09E0,-0.12E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0), | |||
| + (0.03E0,-0.09E0), (8.0E0,9.0E0), | |||
| + (0.15E0,-0.03E0), (2.0E0,5.0E0), (2.0E0,5.0E0), | |||
| + (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0), | |||
| + (0.03E0,0.03E0), (3.0E0,6.0E0), | |||
| + (-0.18E0,0.03E0), (4.0E0,7.0E0), | |||
| + (0.03E0,-0.09E0), (7.0E0,2.0E0), (7.0E0,2.0E0), | |||
| + (7.0E0,2.0E0), (0.09E0,0.03E0), (5.0E0,8.0E0), | |||
| + (0.03E0,0.12E0), (6.0E0,9.0E0), (0.12E0,0.03E0), | |||
| + (8.0E0,3.0E0), (0.03E0,0.06E0), (9.0E0,4.0E0)/ | |||
| DATA ITRUE3/0, 1, 2, 2, 2/ | |||
| * .. Executable Statements .. | |||
| DO 60 INCX = 1, 2 | |||
| DO 40 NP1 = 1, 5 | |||
| N = NP1 - 1 | |||
| LEN = 2*MAX(N,1) | |||
| * .. Set vector arguments .. | |||
| DO 20 I = 1, LEN | |||
| CX(I) = CV(I,NP1,INCX) | |||
| 20 CONTINUE | |||
| IF (ICASE.EQ.6) THEN | |||
| * .. SCNRM2TEST .. | |||
| CALL STEST1(SCNRM2TEST(N,CX,INCX),STRUE2(NP1), | |||
| + STRUE2(NP1), SFAC) | |||
| ELSE IF (ICASE.EQ.7) THEN | |||
| * .. SCASUMTEST .. | |||
| CALL STEST1(SCASUMTEST(N,CX,INCX),STRUE4(NP1), | |||
| + STRUE4(NP1),SFAC) | |||
| ELSE IF (ICASE.EQ.8) THEN | |||
| * .. CSCAL .. | |||
| CALL CSCAL(N,CA,CX,INCX) | |||
| CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX), | |||
| + SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * .. CSSCALTEST .. | |||
| CALL CSSCALTEST(N,SA,CX,INCX) | |||
| CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX), | |||
| + SFAC) | |||
| ELSE IF (ICASE.EQ.10) THEN | |||
| * .. ICAMAXTEST .. | |||
| CALL ITEST1(ICAMAXTEST(N,CX,INCX),ITRUE3(NP1)) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' | |||
| STOP | |||
| END IF | |||
| * | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| * | |||
| INCX = 1 | |||
| IF (ICASE.EQ.8) THEN | |||
| * CSCAL | |||
| * Add a test for alpha equal to zero. | |||
| CA = (0.0E0,0.0E0) | |||
| DO 80 I = 1, 5 | |||
| MWPCT(I) = (0.0E0,0.0E0) | |||
| MWPCS(I) = (1.0E0,1.0E0) | |||
| 80 CONTINUE | |||
| CALL CSCAL(5,CA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * CSSCALTEST | |||
| * Add a test for alpha equal to zero. | |||
| SA = 0.0E0 | |||
| DO 100 I = 1, 5 | |||
| MWPCT(I) = (0.0E0,0.0E0) | |||
| MWPCS(I) = (1.0E0,1.0E0) | |||
| 100 CONTINUE | |||
| CALL CSSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| * Add a test for alpha equal to one. | |||
| SA = 1.0E0 | |||
| DO 120 I = 1, 5 | |||
| MWPCT(I) = CX(I) | |||
| MWPCS(I) = CX(I) | |||
| 120 CONTINUE | |||
| CALL CSSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| * Add a test for alpha equal to minus one. | |||
| SA = -1.0E0 | |||
| DO 140 I = 1, 5 | |||
| MWPCT(I) = -CX(I) | |||
| MWPCS(I) = -CX(I) | |||
| 140 CONTINUE | |||
| CALL CSSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| END IF | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK2(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| COMPLEX CA,CTEMP | |||
| INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| COMPLEX CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14), | |||
| + CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4), | |||
| + CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4) | |||
| * .. External Functions .. | |||
| EXTERNAL CDOTCTEST, CDOTUTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL CAXPYTEST, CCOPYTEST, CSWAPTEST, CTEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA CA/(0.4E0,-0.7E0)/ | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA CX1/(0.7E0,-0.8E0), (-0.4E0,-0.7E0), | |||
| + (-0.1E0,-0.9E0), (0.2E0,-0.8E0), | |||
| + (-0.9E0,-0.4E0), (0.1E0,0.4E0), (-0.6E0,0.6E0)/ | |||
| DATA CY1/(0.6E0,-0.6E0), (-0.9E0,0.5E0), | |||
| + (0.7E0,-0.6E0), (0.1E0,-0.5E0), (-0.1E0,-0.2E0), | |||
| + (-0.5E0,-0.3E0), (0.8E0,-0.7E0)/ | |||
| DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.32E0,-1.41E0), | |||
| + (-1.55E0,0.5E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.32E0,-1.41E0), (-1.55E0,0.5E0), | |||
| + (0.03E0,-0.89E0), (-0.38E0,-0.96E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/ | |||
| DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (-0.07E0,-0.89E0), | |||
| + (-0.9E0,0.5E0), (0.42E0,-1.41E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.78E0,0.06E0), (-0.9E0,0.5E0), | |||
| + (0.06E0,-0.13E0), (0.1E0,-0.5E0), | |||
| + (-0.77E0,-0.49E0), (-0.5E0,-0.3E0), | |||
| + (0.52E0,-1.51E0)/ | |||
| DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (-0.07E0,-0.89E0), | |||
| + (-1.18E0,-0.31E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.78E0,0.06E0), (-1.54E0,0.97E0), | |||
| + (0.03E0,-0.89E0), (-0.18E0,-1.31E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/ | |||
| DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.32E0,-1.41E0), (-0.9E0,0.5E0), | |||
| + (0.05E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.32E0,-1.41E0), | |||
| + (-0.9E0,0.5E0), (0.05E0,-0.6E0), (0.1E0,-0.5E0), | |||
| + (-0.77E0,-0.49E0), (-0.5E0,-0.3E0), | |||
| + (0.32E0,-1.16E0)/ | |||
| DATA CT7/(0.0E0,0.0E0), (-0.06E0,-0.90E0), | |||
| + (0.65E0,-0.47E0), (-0.34E0,-1.22E0), | |||
| + (0.0E0,0.0E0), (-0.06E0,-0.90E0), | |||
| + (-0.59E0,-1.46E0), (-1.04E0,-0.04E0), | |||
| + (0.0E0,0.0E0), (-0.06E0,-0.90E0), | |||
| + (-0.83E0,0.59E0), (0.07E0,-0.37E0), | |||
| + (0.0E0,0.0E0), (-0.06E0,-0.90E0), | |||
| + (-0.76E0,-1.15E0), (-1.33E0,-1.82E0)/ | |||
| DATA CT6/(0.0E0,0.0E0), (0.90E0,0.06E0), | |||
| + (0.91E0,-0.77E0), (1.80E0,-0.10E0), | |||
| + (0.0E0,0.0E0), (0.90E0,0.06E0), (1.45E0,0.74E0), | |||
| + (0.20E0,0.90E0), (0.0E0,0.0E0), (0.90E0,0.06E0), | |||
| + (-0.55E0,0.23E0), (0.83E0,-0.39E0), | |||
| + (0.0E0,0.0E0), (0.90E0,0.06E0), (1.04E0,0.79E0), | |||
| + (1.95E0,1.22E0)/ | |||
| DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7E0,-0.8E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.6E0,-0.6E0), (-0.9E0,0.5E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0), | |||
| + (-0.9E0,0.5E0), (0.7E0,-0.6E0), (0.1E0,-0.5E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/ | |||
| DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7E0,-0.8E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.7E0,-0.6E0), (-0.4E0,-0.7E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.8E0,-0.7E0), | |||
| + (-0.4E0,-0.7E0), (-0.1E0,-0.2E0), | |||
| + (0.2E0,-0.8E0), (0.7E0,-0.6E0), (0.1E0,0.4E0), | |||
| + (0.6E0,-0.6E0)/ | |||
| DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7E0,-0.8E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (-0.9E0,0.5E0), (-0.4E0,-0.7E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.1E0,-0.5E0), | |||
| + (-0.4E0,-0.7E0), (0.7E0,-0.6E0), (0.2E0,-0.8E0), | |||
| + (-0.9E0,0.5E0), (0.1E0,0.4E0), (0.6E0,-0.6E0)/ | |||
| DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7E0,-0.8E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.6E0,-0.6E0), (0.7E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0), | |||
| + (0.7E0,-0.6E0), (-0.1E0,-0.2E0), (0.8E0,-0.7E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/ | |||
| DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.4E0,-0.7E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0), | |||
| + (-0.4E0,-0.7E0), (-0.1E0,-0.9E0), | |||
| + (0.2E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0)/ | |||
| DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (-0.1E0,-0.9E0), (-0.9E0,0.5E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0), | |||
| + (-0.9E0,0.5E0), (-0.9E0,-0.4E0), (0.1E0,-0.5E0), | |||
| + (-0.1E0,-0.9E0), (-0.5E0,-0.3E0), | |||
| + (0.7E0,-0.8E0)/ | |||
| DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (-0.1E0,-0.9E0), (0.7E0,-0.8E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0), | |||
| + (-0.9E0,-0.4E0), (-0.1E0,-0.9E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0)/ | |||
| DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.9E0,0.5E0), | |||
| + (-0.4E0,-0.7E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0), | |||
| + (-0.9E0,0.5E0), (-0.4E0,-0.7E0), (0.1E0,-0.5E0), | |||
| + (-0.1E0,-0.9E0), (-0.5E0,-0.3E0), | |||
| + (0.2E0,-0.8E0)/ | |||
| DATA CSIZE1/(0.0E0,0.0E0), (0.9E0,0.9E0), | |||
| + (1.63E0,1.73E0), (2.90E0,2.78E0)/ | |||
| DATA CSIZE3/(0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (1.17E0,1.17E0), | |||
| + (1.17E0,1.17E0), (1.17E0,1.17E0), | |||
| + (1.17E0,1.17E0), (1.17E0,1.17E0), | |||
| + (1.17E0,1.17E0), (1.17E0,1.17E0)/ | |||
| DATA CSIZE2/(0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0), | |||
| + (0.0E0,0.0E0), (0.0E0,0.0E0), (1.54E0,1.54E0), | |||
| + (1.54E0,1.54E0), (1.54E0,1.54E0), | |||
| + (1.54E0,1.54E0), (1.54E0,1.54E0), | |||
| + (1.54E0,1.54E0), (1.54E0,1.54E0)/ | |||
| * .. Executable Statements .. | |||
| DO 60 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 40 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * .. initialize all argument arrays .. | |||
| DO 20 I = 1, 7 | |||
| CX(I) = CX1(I) | |||
| CY(I) = CY1(I) | |||
| 20 CONTINUE | |||
| IF (ICASE.EQ.1) THEN | |||
| * .. CDOTCTEST .. | |||
| CALL CDOTCTEST(N,CX,INCX,CY,INCY,CTEMP) | |||
| CDOT(1) = CTEMP | |||
| CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.2) THEN | |||
| * .. CDOTUTEST .. | |||
| CALL CDOTUTEST(N,CX,INCX,CY,INCY,CTEMP) | |||
| CDOT(1) = CTEMP | |||
| CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.3) THEN | |||
| * .. CAXPYTEST .. | |||
| CALL CAXPYTEST(N,CA,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC) | |||
| ELSE IF (ICASE.EQ.4) THEN | |||
| * .. CCOPYTEST .. | |||
| CALL CCOPYTEST(N,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0) | |||
| ELSE IF (ICASE.EQ.5) THEN | |||
| * .. CSWAPTEST .. | |||
| CALL CSWAPTEST(N,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0E0) | |||
| CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' | |||
| STOP | |||
| END IF | |||
| * | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| * ********************************* STEST ************************** | |||
| * | |||
| * THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO | |||
| * SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE | |||
| * NEGLIGIBLE. | |||
| * | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SD | |||
| INTEGER I | |||
| * .. External Functions .. | |||
| REAL SDIFF | |||
| EXTERNAL SDIFF | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 40 I = 1, LEN | |||
| SD = SCOMP(I) - STRUE(I) | |||
| IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0) | |||
| + GO TO 40 | |||
| * | |||
| * HERE SCOMP(I) IS NOT CLOSE TO STRUE(I). | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I), | |||
| + STRUE(I), SD, SSIZE(I) | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE I ', | |||
| + ' COMP(I) TRUE(I) DIFFERENCE', | |||
| + ' SIZE(I)',/1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4) | |||
| END | |||
| SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC) | |||
| * ************************* STEST1 ***************************** | |||
| * | |||
| * THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN | |||
| * REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE | |||
| * ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT. | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| REAL SCOMP1, SFAC, STRUE1 | |||
| * .. Array Arguments .. | |||
| REAL SSIZE(*) | |||
| * .. Local Arrays .. | |||
| REAL SCOMP(1), STRUE(1) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Executable Statements .. | |||
| * | |||
| SCOMP(1) = SCOMP1 | |||
| STRUE(1) = STRUE1 | |||
| CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC) | |||
| * | |||
| RETURN | |||
| END | |||
| REAL FUNCTION SDIFF(SA,SB) | |||
| * ********************************* SDIFF ************************** | |||
| * COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| REAL SA, SB | |||
| * .. Executable Statements .. | |||
| SDIFF = SA - SB | |||
| RETURN | |||
| END | |||
| SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC) | |||
| * **************************** CTEST ***************************** | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| COMPLEX CCOMP(LEN), CSIZE(LEN), CTRUE(LEN) | |||
| * .. Local Scalars .. | |||
| INTEGER I | |||
| * .. Local Arrays .. | |||
| REAL SCOMP(20), SSIZE(20), STRUE(20) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC AIMAG, REAL | |||
| * .. Executable Statements .. | |||
| DO 20 I = 1, LEN | |||
| SCOMP(2*I-1) = REAL(CCOMP(I)) | |||
| SCOMP(2*I) = AIMAG(CCOMP(I)) | |||
| STRUE(2*I-1) = REAL(CTRUE(I)) | |||
| STRUE(2*I) = AIMAG(CTRUE(I)) | |||
| SSIZE(2*I-1) = REAL(CSIZE(I)) | |||
| SSIZE(2*I) = AIMAG(CSIZE(I)) | |||
| 20 CONTINUE | |||
| * | |||
| CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| RETURN | |||
| END | |||
| SUBROUTINE ITEST1(ICOMP,ITRUE) | |||
| * ********************************* ITEST1 ************************* | |||
| * | |||
| * THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR | |||
| * EQUALITY. | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| INTEGER ICOMP, ITRUE | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER ID | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| IF (ICOMP.EQ.ITRUE) GO TO 40 | |||
| * | |||
| * HERE ICOMP IS NOT EQUAL TO ITRUE. | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 ID = ICOMP - ITRUE | |||
| WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE ', | |||
| + ' COMP TRUE DIFFERENCE', | |||
| + /1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,2I36,I12) | |||
| END | |||
| @@ -0,0 +1,789 @@ | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| int cblas_ok, cblas_lerr, cblas_info; | |||
| int link_xerbla=TRUE; | |||
| char *cblas_rout; | |||
| #ifdef F77_Char | |||
| void F77_xerbla(F77_Char F77_srname, void *vinfo); | |||
| #else | |||
| void F77_xerbla(char *srname, void *vinfo); | |||
| #endif | |||
| void chkxer(void) { | |||
| extern int cblas_ok, cblas_lerr, cblas_info; | |||
| extern int link_xerbla; | |||
| extern char *cblas_rout; | |||
| if (cblas_lerr == 1 ) { | |||
| printf("***** ILLEGAL VALUE OF PARAMETER NUMBER %d NOT DETECTED BY %s *****\n", cblas_info, cblas_rout); | |||
| cblas_ok = 0 ; | |||
| } | |||
| cblas_lerr = 1 ; | |||
| } | |||
| void F77_d2chke(char *rout) { | |||
| char *sf = ( rout ) ; | |||
| double A[2] = {0.0,0.0}, | |||
| X[2] = {0.0,0.0}, | |||
| Y[2] = {0.0,0.0}, | |||
| ALPHA=0.0, BETA=0.0; | |||
| extern int cblas_info, cblas_lerr, cblas_ok; | |||
| extern int RowMajorStrg; | |||
| extern char *cblas_rout; | |||
| if (link_xerbla) /* call these first to link */ | |||
| { | |||
| cblas_xerbla(cblas_info,cblas_rout,""); | |||
| F77_xerbla(cblas_rout,&cblas_info); | |||
| } | |||
| cblas_ok = TRUE ; | |||
| cblas_lerr = PASSED ; | |||
| if (strncmp( sf,"cblas_dgemv",11)==0) { | |||
| cblas_rout = "cblas_dgemv"; | |||
| cblas_info = 1; | |||
| cblas_dgemv(INVALID, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, CblasNoTrans, 2, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_dgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_dgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dgbmv",11)==0) { | |||
| cblas_rout = "cblas_dgbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(INVALID, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = FALSE; | |||
| cblas_dgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = TRUE; | |||
| cblas_dgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dsymv",11)==0) { | |||
| cblas_rout = "cblas_dsymv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dsymv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dsymv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dsymv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dsymv(CblasColMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dsymv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_dsymv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dsymv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dsymv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dsymv(CblasRowMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dsymv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_dsymv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dsbmv",11)==0) { | |||
| cblas_rout = "cblas_dsbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(INVALID, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_dsbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_dsbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dspmv",11)==0) { | |||
| cblas_rout = "cblas_dspmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dspmv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dspmv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dspmv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_dspmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_dspmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dspmv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dspmv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_dspmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_dspmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtrmv",11)==0) { | |||
| cblas_rout = "cblas_dtrmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtbmv",11)==0) { | |||
| cblas_rout = "cblas_dtbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_dtbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_dtbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtpmv",11)==0) { | |||
| cblas_rout = "cblas_dtpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtpmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtrsv",11)==0) { | |||
| cblas_rout = "cblas_dtrsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtbsv",11)==0) { | |||
| cblas_rout = "cblas_dtbsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_dtbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dtpsv",11)==0) { | |||
| cblas_rout = "cblas_dtpsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dtpsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dtpsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dger",10)==0) { | |||
| cblas_rout = "cblas_dger"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dger(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dger(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dger(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dger(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dger(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_dger(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dger(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dger(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dger(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dger(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_dger(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dsyr2",11)==0) { | |||
| cblas_rout = "cblas_dsyr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_dsyr2(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dsyr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dsyr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dsyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dsyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_dsyr2(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dspr2",11)==0) { | |||
| cblas_rout = "cblas_dspr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dspr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dspr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dspr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dspr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dspr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dsyr",10)==0) { | |||
| cblas_rout = "cblas_dsyr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dsyr(INVALID, CblasUpper, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dsyr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dsyr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dsyr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_dsyr(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_dsyr(CblasRowMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_dsyr(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_dsyr(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_dsyr(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_dspr",10)==0) { | |||
| cblas_rout = "cblas_dspr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_dspr(INVALID, CblasUpper, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_dspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); | |||
| chkxer(); | |||
| } | |||
| if (cblas_ok == TRUE) | |||
| printf(" %-12s PASSED THE TESTS OF ERROR-EXITS\n", cblas_rout); | |||
| else | |||
| printf("******* %s FAILED THE TESTS OF ERROR-EXITS *******\n",cblas_rout); | |||
| } | |||
| @@ -0,0 +1,84 @@ | |||
| /* | |||
| * c_dblas1.c | |||
| * | |||
| * The program is a C wrapper for dcblat1. | |||
| * | |||
| * Written by Keita Teranishi. 2/11/1998 | |||
| * | |||
| */ | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| double F77_dasum(const int *N, double *X, const int *incX) | |||
| { | |||
| return cblas_dasum(*N, X, *incX); | |||
| } | |||
| void F77_daxpy(const int *N, const double *alpha, const double *X, | |||
| const int *incX, double *Y, const int *incY) | |||
| { | |||
| cblas_daxpy(*N, *alpha, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| void F77_dcopy(const int *N, double *X, const int *incX, | |||
| double *Y, const int *incY) | |||
| { | |||
| cblas_dcopy(*N, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| double F77_ddot(const int *N, const double *X, const int *incX, | |||
| const double *Y, const int *incY) | |||
| { | |||
| return cblas_ddot(*N, X, *incX, Y, *incY); | |||
| } | |||
| double F77_dnrm2(const int *N, const double *X, const int *incX) | |||
| { | |||
| return cblas_dnrm2(*N, X, *incX); | |||
| } | |||
| void F77_drotg( double *a, double *b, double *c, double *s) | |||
| { | |||
| cblas_drotg(a,b,c,s); | |||
| return; | |||
| } | |||
| void F77_drot( const int *N, double *X, const int *incX, double *Y, | |||
| const int *incY, const double *c, const double *s) | |||
| { | |||
| cblas_drot(*N,X,*incX,Y,*incY,*c,*s); | |||
| return; | |||
| } | |||
| void F77_dscal(const int *N, const double *alpha, double *X, | |||
| const int *incX) | |||
| { | |||
| cblas_dscal(*N, *alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_dswap( const int *N, double *X, const int *incX, | |||
| double *Y, const int *incY) | |||
| { | |||
| cblas_dswap(*N,X,*incX,Y,*incY); | |||
| return; | |||
| } | |||
| double F77_dzasum(const int *N, void *X, const int *incX) | |||
| { | |||
| return cblas_dzasum(*N, X, *incX); | |||
| } | |||
| double F77_dznrm2(const int *N, const void *X, const int *incX) | |||
| { | |||
| return cblas_dznrm2(*N, X, *incX); | |||
| } | |||
| int F77_idamax(const int *N, const double *X, const int *incX) | |||
| { | |||
| if (*N < 1 || *incX < 1) return(0); | |||
| return (cblas_idamax(*N, X, *incX)+1); | |||
| } | |||
| @@ -0,0 +1,583 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 1/23/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_dgemv(int *order, char *transp, int *m, int *n, double *alpha, | |||
| double *a, int *lda, double *x, int *incx, double *beta, | |||
| double *y, int *incy ) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dgemv( CblasRowMajor, trans, | |||
| *m, *n, *alpha, A, LDA, x, *incx, *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dgemv( CblasColMajor, trans, | |||
| *m, *n, *alpha, a, *lda, x, *incx, *beta, y, *incy ); | |||
| else | |||
| cblas_dgemv( UNDEFINED, trans, | |||
| *m, *n, *alpha, a, *lda, x, *incx, *beta, y, *incy ); | |||
| } | |||
| void F77_dger(int *order, int *m, int *n, double *alpha, double *x, int *incx, | |||
| double *y, int *incy, double *a, int *lda ) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) { | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| } | |||
| cblas_dger(CblasRowMajor, *m, *n, *alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dger( CblasColMajor, *m, *n, *alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_dtrmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, double *a, int *lda, double *x, int *incx) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dtrmv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dtrmv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| else { | |||
| cblas_dtrmv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| } | |||
| } | |||
| void F77_dtrsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, double *a, int *lda, double *x, int *incx ) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dtrsv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dtrsv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| } | |||
| void F77_dsymv(int *order, char *uplow, int *n, double *alpha, double *a, | |||
| int *lda, double *x, int *incx, double *beta, double *y, | |||
| int *incy) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dsymv(CblasRowMajor, uplo, *n, *alpha, A, LDA, x, *incx, | |||
| *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dsymv(CblasColMajor, uplo, *n, *alpha, a, *lda, x, *incx, | |||
| *beta, y, *incy ); | |||
| } | |||
| void F77_dsyr(int *order, char *uplow, int *n, double *alpha, double *x, | |||
| int *incx, double *a, int *lda) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dsyr(CblasRowMajor, uplo, *n, *alpha, x, *incx, A, LDA); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dsyr(CblasColMajor, uplo, *n, *alpha, x, *incx, a, *lda); | |||
| } | |||
| void F77_dsyr2(int *order, char *uplow, int *n, double *alpha, double *x, | |||
| int *incx, double *y, int *incy, double *a, int *lda) { | |||
| double *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_dsyr2(CblasRowMajor, uplo, *n, *alpha, x, *incx, y, *incy, A, LDA); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dsyr2(CblasColMajor, uplo, *n, *alpha, x, *incx, y, *incy, a, *lda); | |||
| } | |||
| void F77_dgbmv(int *order, char *transp, int *m, int *n, int *kl, int *ku, | |||
| double *alpha, double *a, int *lda, double *x, int *incx, | |||
| double *beta, double *y, int *incy ) { | |||
| double *A; | |||
| int i,irow,j,jcol,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *ku+*kl+2; | |||
| A = ( double* )malloc( (*n+*kl)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*ku; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=(*ku)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*ku; | |||
| irow=*ku+*kl-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=*ku+1; i<*ku+*kl+1; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=i-(*ku); | |||
| for( j=jcol; j<(*n+*kl); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| cblas_dgbmv( CblasRowMajor, trans, *m, *n, *kl, *ku, *alpha, | |||
| A, LDA, x, *incx, *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dgbmv( CblasColMajor, trans, *m, *n, *kl, *ku, *alpha, | |||
| a, *lda, x, *incx, *beta, y, *incy ); | |||
| } | |||
| void F77_dtbmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, double *a, int *lda, double *x, int *incx) { | |||
| double *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( double* )malloc( (*n+*k)*LDA*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_dtbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dtbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_dtbsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, double *a, int *lda, double *x, int *incx) { | |||
| double *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( double* )malloc( (*n+*k)*LDA*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_dtbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dtbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_dsbmv(int *order, char *uplow, int *n, int *k, double *alpha, | |||
| double *a, int *lda, double *x, int *incx, double *beta, | |||
| double *y, int *incy) { | |||
| double *A; | |||
| int i,j,irow,jcol,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( double* )malloc( (*n+*k)*LDA*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_dsbmv(CblasRowMajor, uplo, *n, *k, *alpha, A, LDA, x, *incx, | |||
| *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_dsbmv(CblasColMajor, uplo, *n, *k, *alpha, a, *lda, x, *incx, | |||
| *beta, y, *incy ); | |||
| } | |||
| void F77_dspmv(int *order, char *uplow, int *n, double *alpha, double *ap, | |||
| double *x, int *incx, double *beta, double *y, int *incy) { | |||
| double *A,*AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( double* )malloc( LDA*LDA*sizeof( double ) ); | |||
| AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_dspmv( CblasRowMajor, uplo, *n, *alpha, AP, x, *incx, *beta, y, | |||
| *incy ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_dspmv( CblasColMajor, uplo, *n, *alpha, ap, x, *incx, *beta, y, | |||
| *incy ); | |||
| } | |||
| void F77_dtpmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, double *ap, double *x, int *incx) { | |||
| double *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( double* )malloc( LDA*LDA*sizeof( double ) ); | |||
| AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_dtpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_dtpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_dtpsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, double *ap, double *x, int *incx) { | |||
| double *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( double* )malloc( LDA*LDA*sizeof( double ) ); | |||
| AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_dtpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_dtpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_dspr(int *order, char *uplow, int *n, double *alpha, double *x, | |||
| int *incx, double *ap ){ | |||
| double *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( double* )malloc( LDA*LDA*sizeof( double ) ); | |||
| AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_dspr( CblasRowMajor, uplo, *n, *alpha, x, *incx, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_dspr( CblasColMajor, uplo, *n, *alpha, x, *incx, ap ); | |||
| } | |||
| void F77_dspr2(int *order, char *uplow, int *n, double *alpha, double *x, | |||
| int *incx, double *y, int *incy, double *ap ){ | |||
| double *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( double* )malloc( LDA*LDA*sizeof( double ) ); | |||
| AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_dspr2( CblasRowMajor, uplo, *n, *alpha, x, *incx, y, *incy, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_dspr2( CblasColMajor, uplo, *n, *alpha, x, *incx, y, *incy, ap ); | |||
| } | |||
| @@ -0,0 +1,334 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 2/19/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| #define TEST_COL_MJR 0 | |||
| #define TEST_ROW_MJR 1 | |||
| #define UNDEFINED -1 | |||
| void F77_dgemm(int *order, char *transpa, char *transpb, int *m, int *n, | |||
| int *k, double *alpha, double *a, int *lda, double *b, int *ldb, | |||
| double *beta, double *c, int *ldc ) { | |||
| double *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_TRANSPOSE transa, transb; | |||
| get_transpose_type(transpa, &transa); | |||
| get_transpose_type(transpb, &transb); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (transa == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A = (double *)malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else { | |||
| LDA = *m+1; | |||
| A = ( double* )malloc( LDA*(*k)*sizeof( double ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| if (transb == CblasNoTrans) { | |||
| LDB = *n+1; | |||
| B = ( double* )malloc( (*k)*LDB*sizeof( double ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| else { | |||
| LDB = *k+1; | |||
| B = ( double* )malloc( LDB*(*n)*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| LDC = *n+1; | |||
| C = ( double* )malloc( (*m)*LDC*sizeof( double ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_dgemm( CblasRowMajor, transa, transb, *m, *n, *k, *alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dgemm( CblasColMajor, transa, transb, *m, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_dgemm( UNDEFINED, transa, transb, *m, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_dsymm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| double *alpha, double *a, int *lda, double *b, int *ldb, | |||
| double *beta, double *c, int *ldc ) { | |||
| double *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( double* )malloc( (*m)*LDB*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| LDC = *n+1; | |||
| C = ( double* )malloc( (*m)*LDC*sizeof( double ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_dsymm( CblasRowMajor, side, uplo, *m, *n, *alpha, A, LDA, B, LDB, | |||
| *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dsymm( CblasColMajor, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb, | |||
| *beta, c, *ldc ); | |||
| else | |||
| cblas_dsymm( UNDEFINED, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb, | |||
| *beta, c, *ldc ); | |||
| } | |||
| void F77_dsyrk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| double *alpha, double *a, int *lda, | |||
| double *beta, double *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| double *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*k)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDC = *n+1; | |||
| C = ( double* )malloc( (*n)*LDC*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_dsyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dsyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_dsyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_dsyr2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| double *alpha, double *a, int *lda, double *b, int *ldb, | |||
| double *beta, double *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| double *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| B = ( double* )malloc( (*n)*LDB*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A = ( double* )malloc( LDA*(*k)*sizeof( double ) ); | |||
| B = ( double* )malloc( LDB*(*k)*sizeof( double ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C = ( double* )malloc( (*n)*LDC*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_dsyr2k(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dsyr2k(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_dsyr2k(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_dtrmm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, double *alpha, double *a, int *lda, double *b, | |||
| int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| double *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( double* )malloc( (*m)*LDB*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| cblas_dtrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| b[j*(*ldb)+i]=B[i*LDB+j]; | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dtrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_dtrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| void F77_dtrsm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, double *alpha, double *a, int *lda, double *b, | |||
| int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| double *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( double* )malloc( (*m)*LDB*sizeof( double ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| cblas_dtrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| b[j*(*ldb)+i]=B[i*LDB+j]; | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_dtrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_dtrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| @@ -0,0 +1,728 @@ | |||
| PROGRAM DCBLAT1 | |||
| * Test program for the DOUBLE PRECISION Level 1 CBLAS. | |||
| * Based upon the original CBLAS test routine together with: | |||
| * F06EAF Example Program Text | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SFAC | |||
| INTEGER IC | |||
| * .. External Subroutines .. | |||
| EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SFAC/9.765625D-4/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) | |||
| DO 20 IC = 1, 10 | |||
| ICASE = IC | |||
| CALL HEADER | |||
| * | |||
| * .. Initialize PASS, INCX, INCY, and MODE for a new case. .. | |||
| * .. the value 9999 for INCX, INCY or MODE will appear in the .. | |||
| * .. detailed output, if any, for cases that do not involve .. | |||
| * .. these parameters .. | |||
| * | |||
| PASS = .TRUE. | |||
| INCX = 9999 | |||
| INCY = 9999 | |||
| MODE = 9999 | |||
| IF (ICASE.EQ.3) THEN | |||
| CALL CHECK0(SFAC) | |||
| ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR. | |||
| + ICASE.EQ.10) THEN | |||
| CALL CHECK1(SFAC) | |||
| ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR. | |||
| + ICASE.EQ.6) THEN | |||
| CALL CHECK2(SFAC) | |||
| ELSE IF (ICASE.EQ.4) THEN | |||
| CALL CHECK3(SFAC) | |||
| END IF | |||
| IF (PASS) WRITE (NOUT,99998) | |||
| 20 CONTINUE | |||
| STOP | |||
| * | |||
| 99999 FORMAT (' Real CBLAS Test Program Results',/1X) | |||
| 99998 FORMAT (' ----- PASS -----') | |||
| END | |||
| SUBROUTINE HEADER | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Arrays .. | |||
| CHARACTER*15 L(10) | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA L(1)/'CBLAS_DDOT'/ | |||
| DATA L(2)/'CBLAS_DAXPY '/ | |||
| DATA L(3)/'CBLAS_DROTG '/ | |||
| DATA L(4)/'CBLAS_DROT '/ | |||
| DATA L(5)/'CBLAS_DCOPY '/ | |||
| DATA L(6)/'CBLAS_DSWAP '/ | |||
| DATA L(7)/'CBLAS_DNRM2 '/ | |||
| DATA L(8)/'CBLAS_DASUM '/ | |||
| DATA L(9)/'CBLAS_DSCAL '/ | |||
| DATA L(10)/'CBLAS_IDAMAX'/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) ICASE, L(ICASE) | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (/' Test of subprogram number',I3,9X,A15) | |||
| END | |||
| SUBROUTINE CHECK0(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SA, SB, SC, SS | |||
| INTEGER K | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8), | |||
| + DS1(8) | |||
| * .. External Subroutines .. | |||
| EXTERNAL DROTGTEST, STEST1 | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA DA1/0.3D0, 0.4D0, -0.3D0, -0.4D0, -0.3D0, 0.0D0, | |||
| + 0.0D0, 1.0D0/ | |||
| DATA DB1/0.4D0, 0.3D0, 0.4D0, 0.3D0, -0.4D0, 0.0D0, | |||
| + 1.0D0, 0.0D0/ | |||
| DATA DC1/0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.6D0, 1.0D0, | |||
| + 0.0D0, 1.0D0/ | |||
| DATA DS1/0.8D0, 0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.0D0, | |||
| + 1.0D0, 0.0D0/ | |||
| DATA DATRUE/0.5D0, 0.5D0, 0.5D0, -0.5D0, -0.5D0, | |||
| + 0.0D0, 1.0D0, 1.0D0/ | |||
| DATA DBTRUE/0.0D0, 0.6D0, 0.0D0, -0.6D0, 0.0D0, | |||
| + 0.0D0, 1.0D0, 0.0D0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| * Compute true values which cannot be prestored | |||
| * in decimal notation | |||
| * | |||
| DBTRUE(1) = 1.0D0/0.6D0 | |||
| DBTRUE(3) = -1.0D0/0.6D0 | |||
| DBTRUE(5) = 1.0D0/0.6D0 | |||
| * | |||
| DO 20 K = 1, 8 | |||
| * .. Set N=K for identification in output if any .. | |||
| N = K | |||
| IF (ICASE.EQ.3) THEN | |||
| * .. DROTGTEST .. | |||
| IF (K.GT.8) GO TO 40 | |||
| SA = DA1(K) | |||
| SB = DB1(K) | |||
| CALL DROTGTEST(SA,SB,SC,SS) | |||
| CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC) | |||
| CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC) | |||
| CALL STEST1(SC,DC1(K),DC1(K),SFAC) | |||
| CALL STEST1(SS,DS1(K),DS1(K),SFAC) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' | |||
| STOP | |||
| END IF | |||
| 20 CONTINUE | |||
| 40 RETURN | |||
| END | |||
| SUBROUTINE CHECK1(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER I, LEN, NP1 | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2), | |||
| + SA(10), STEMP(1), STRUE(8), SX(8) | |||
| INTEGER ITRUE2(5) | |||
| * .. External Functions .. | |||
| DOUBLE PRECISION DASUMTEST, DNRM2TEST | |||
| INTEGER IDAMAXTEST | |||
| EXTERNAL DASUMTEST, DNRM2TEST, IDAMAXTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL ITEST1, DSCALTEST, STEST, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC MAX | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA/0.3D0, -1.0D0, 0.0D0, 1.0D0, 0.3D0, 0.3D0, | |||
| + 0.3D0, 0.3D0, 0.3D0, 0.3D0/ | |||
| DATA DV/0.1D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, | |||
| + 2.0D0, 2.0D0, 0.3D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0, | |||
| + 3.0D0, 3.0D0, 3.0D0, 0.3D0, -0.4D0, 4.0D0, | |||
| + 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 0.2D0, | |||
| + -0.6D0, 0.3D0, 5.0D0, 5.0D0, 5.0D0, 5.0D0, | |||
| + 5.0D0, 0.1D0, -0.3D0, 0.5D0, -0.1D0, 6.0D0, | |||
| + 6.0D0, 6.0D0, 6.0D0, 0.1D0, 8.0D0, 8.0D0, 8.0D0, | |||
| + 8.0D0, 8.0D0, 8.0D0, 8.0D0, 0.3D0, 9.0D0, 9.0D0, | |||
| + 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 0.3D0, 2.0D0, | |||
| + -0.4D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, | |||
| + 0.2D0, 3.0D0, -0.6D0, 5.0D0, 0.3D0, 2.0D0, | |||
| + 2.0D0, 2.0D0, 0.1D0, 4.0D0, -0.3D0, 6.0D0, | |||
| + -0.5D0, 7.0D0, -0.1D0, 3.0D0/ | |||
| DATA DTRUE1/0.0D0, 0.3D0, 0.5D0, 0.7D0, 0.6D0/ | |||
| DATA DTRUE3/0.0D0, 0.3D0, 0.7D0, 1.1D0, 1.0D0/ | |||
| DATA DTRUE5/0.10D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, | |||
| + 2.0D0, 2.0D0, 2.0D0, -0.3D0, 3.0D0, 3.0D0, | |||
| + 3.0D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0, 0.0D0, 0.0D0, | |||
| + 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, | |||
| + 0.20D0, -0.60D0, 0.30D0, 5.0D0, 5.0D0, 5.0D0, | |||
| + 5.0D0, 5.0D0, 0.03D0, -0.09D0, 0.15D0, -0.03D0, | |||
| + 6.0D0, 6.0D0, 6.0D0, 6.0D0, 0.10D0, 8.0D0, | |||
| + 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, | |||
| + 0.09D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, | |||
| + 9.0D0, 9.0D0, 0.09D0, 2.0D0, -0.12D0, 2.0D0, | |||
| + 2.0D0, 2.0D0, 2.0D0, 2.0D0, 0.06D0, 3.0D0, | |||
| + -0.18D0, 5.0D0, 0.09D0, 2.0D0, 2.0D0, 2.0D0, | |||
| + 0.03D0, 4.0D0, -0.09D0, 6.0D0, -0.15D0, 7.0D0, | |||
| + -0.03D0, 3.0D0/ | |||
| DATA ITRUE2/0, 1, 2, 2, 3/ | |||
| * .. Executable Statements .. | |||
| DO 80 INCX = 1, 2 | |||
| DO 60 NP1 = 1, 5 | |||
| N = NP1 - 1 | |||
| LEN = 2*MAX(N,1) | |||
| * .. Set vector arguments .. | |||
| DO 20 I = 1, LEN | |||
| SX(I) = DV(I,NP1,INCX) | |||
| 20 CONTINUE | |||
| * | |||
| IF (ICASE.EQ.7) THEN | |||
| * .. DNRM2TEST .. | |||
| STEMP(1) = DTRUE1(NP1) | |||
| CALL STEST1(DNRM2TEST(N,SX,INCX),STEMP,STEMP,SFAC) | |||
| ELSE IF (ICASE.EQ.8) THEN | |||
| * .. DASUMTEST .. | |||
| STEMP(1) = DTRUE3(NP1) | |||
| CALL STEST1(DASUMTEST(N,SX,INCX),STEMP,STEMP,SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * .. DSCALTEST .. | |||
| CALL DSCALTEST(N,SA((INCX-1)*5+NP1),SX,INCX) | |||
| DO 40 I = 1, LEN | |||
| STRUE(I) = DTRUE5(I,NP1,INCX) | |||
| 40 CONTINUE | |||
| CALL STEST(LEN,SX,STRUE,STRUE,SFAC) | |||
| ELSE IF (ICASE.EQ.10) THEN | |||
| * .. IDAMAXTEST .. | |||
| CALL ITEST1(IDAMAXTEST(N,SX,INCX),ITRUE2(NP1)) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' | |||
| STOP | |||
| END IF | |||
| 60 CONTINUE | |||
| 80 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK2(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SA | |||
| INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4), | |||
| + DT8(7,4,4), DX1(7), | |||
| + DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7), | |||
| + SX(7), SY(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4) | |||
| * .. External Functions .. | |||
| EXTERNAL DDOTTEST | |||
| DOUBLE PRECISION DDOTTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL DAXPYTEST, DCOPYTEST, DSWAPTEST, STEST, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA/0.3D0/ | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0, | |||
| + -0.4D0/ | |||
| DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0, | |||
| + 0.8D0/ | |||
| DATA DT7/0.0D0, 0.30D0, 0.21D0, 0.62D0, 0.0D0, | |||
| + 0.30D0, -0.07D0, 0.85D0, 0.0D0, 0.30D0, -0.79D0, | |||
| + -0.74D0, 0.0D0, 0.30D0, 0.33D0, 1.27D0/ | |||
| DATA DT8/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.15D0, | |||
| + 0.94D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.68D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.35D0, -0.9D0, 0.48D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.38D0, -0.9D0, 0.57D0, 0.7D0, -0.75D0, | |||
| + 0.2D0, 0.98D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.68D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.35D0, -0.72D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.38D0, | |||
| + -0.63D0, 0.15D0, 0.88D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.7D0, | |||
| + -0.75D0, 0.2D0, 1.04D0/ | |||
| DATA DT10X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.5D0, -0.9D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.5D0, -0.9D0, 0.3D0, 0.7D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.3D0, 0.1D0, 0.5D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.8D0, 0.1D0, -0.6D0, | |||
| + 0.8D0, 0.3D0, -0.3D0, 0.5D0, 0.6D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.9D0, | |||
| + 0.1D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0, | |||
| + 0.1D0, 0.3D0, 0.8D0, -0.9D0, -0.3D0, 0.5D0, | |||
| + 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.5D0, 0.3D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.5D0, 0.3D0, -0.6D0, 0.8D0, 0.0D0, 0.0D0, | |||
| + 0.0D0/ | |||
| DATA DT10Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.6D0, 0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, -0.5D0, -0.9D0, 0.6D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, -0.4D0, -0.9D0, 0.9D0, | |||
| + 0.7D0, -0.5D0, 0.2D0, 0.6D0, 0.5D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.5D0, | |||
| + 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + -0.4D0, 0.9D0, -0.5D0, 0.6D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.7D0, | |||
| + -0.5D0, 0.2D0, 0.8D0/ | |||
| DATA SSIZE1/0.0D0, 0.3D0, 1.6D0, 3.2D0/ | |||
| DATA SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, | |||
| + 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, | |||
| + 1.17D0, 1.17D0, 1.17D0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 120 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 100 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * .. Initialize all argument arrays .. | |||
| DO 20 I = 1, 7 | |||
| SX(I) = DX1(I) | |||
| SY(I) = DY1(I) | |||
| 20 CONTINUE | |||
| * | |||
| IF (ICASE.EQ.1) THEN | |||
| * .. DDOTTEST .. | |||
| CALL STEST1(DDOTTEST(N,SX,INCX,SY,INCY),DT7(KN,KI), | |||
| + SSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.2) THEN | |||
| * .. DAXPYTEST .. | |||
| CALL DAXPYTEST(N,SA,SX,INCX,SY,INCY) | |||
| DO 40 J = 1, LENY | |||
| STY(J) = DT8(J,KN,KI) | |||
| 40 CONTINUE | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) | |||
| ELSE IF (ICASE.EQ.5) THEN | |||
| * .. DCOPYTEST .. | |||
| DO 60 I = 1, 7 | |||
| STY(I) = DT10Y(I,KN,KI) | |||
| 60 CONTINUE | |||
| CALL DCOPYTEST(N,SX,INCX,SY,INCY) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0) | |||
| ELSE IF (ICASE.EQ.6) THEN | |||
| * .. DSWAPTEST .. | |||
| CALL DSWAPTEST(N,SX,INCX,SY,INCY) | |||
| DO 80 I = 1, 7 | |||
| STX(I) = DT10X(I,KN,KI) | |||
| STY(I) = DT10Y(I,KN,KI) | |||
| 80 CONTINUE | |||
| CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' | |||
| STOP | |||
| END IF | |||
| 100 CONTINUE | |||
| 120 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK3(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SC, SS | |||
| INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4), | |||
| + DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5), | |||
| + MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5), | |||
| + MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7), | |||
| + SY(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11), | |||
| + MWPINY(11), MWPN(11), NS(4) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST,DROTTEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0, | |||
| + -0.4D0/ | |||
| DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0, | |||
| + 0.8D0/ | |||
| DATA SC, SS/0.8D0, 0.6D0/ | |||
| DATA DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.78D0, -0.46D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.78D0, -0.46D0, -0.22D0, | |||
| + 1.06D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.78D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.66D0, 0.1D0, -0.1D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.96D0, 0.1D0, -0.76D0, 0.8D0, 0.90D0, | |||
| + -0.3D0, -0.02D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.78D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.06D0, 0.1D0, | |||
| + -0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.90D0, | |||
| + 0.1D0, -0.22D0, 0.8D0, 0.18D0, -0.3D0, -0.02D0, | |||
| + 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.78D0, 0.26D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.78D0, 0.26D0, -0.76D0, 1.12D0, | |||
| + 0.0D0, 0.0D0, 0.0D0/ | |||
| DATA DT9Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.54D0, | |||
| + 0.08D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.04D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0, | |||
| + -0.9D0, -0.12D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.64D0, -0.9D0, -0.30D0, 0.7D0, -0.18D0, 0.2D0, | |||
| + 0.28D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.7D0, -1.08D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.64D0, -1.26D0, | |||
| + 0.54D0, 0.20D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.7D0, | |||
| + -0.18D0, 0.2D0, 0.16D0/ | |||
| DATA SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, | |||
| + 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, | |||
| + 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, | |||
| + 1.17D0, 1.17D0, 1.17D0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 60 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 40 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * | |||
| IF (ICASE.EQ.4) THEN | |||
| * .. DROTTEST .. | |||
| DO 20 I = 1, 7 | |||
| SX(I) = DX1(I) | |||
| SY(I) = DY1(I) | |||
| STX(I) = DT9X(I,KN,KI) | |||
| STY(I) = DT9Y(I,KN,KI) | |||
| 20 CONTINUE | |||
| CALL DROTTEST(N,SX,INCX,SY,INCY,SC,SS) | |||
| CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' | |||
| STOP | |||
| END IF | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| * | |||
| MWPC(1) = 1 | |||
| DO 80 I = 2, 11 | |||
| MWPC(I) = 0 | |||
| 80 CONTINUE | |||
| MWPS(1) = 0.0 | |||
| DO 100 I = 2, 6 | |||
| MWPS(I) = 1.0 | |||
| 100 CONTINUE | |||
| DO 120 I = 7, 11 | |||
| MWPS(I) = -1.0 | |||
| 120 CONTINUE | |||
| MWPINX(1) = 1 | |||
| MWPINX(2) = 1 | |||
| MWPINX(3) = 1 | |||
| MWPINX(4) = -1 | |||
| MWPINX(5) = 1 | |||
| MWPINX(6) = -1 | |||
| MWPINX(7) = 1 | |||
| MWPINX(8) = 1 | |||
| MWPINX(9) = -1 | |||
| MWPINX(10) = 1 | |||
| MWPINX(11) = -1 | |||
| MWPINY(1) = 1 | |||
| MWPINY(2) = 1 | |||
| MWPINY(3) = -1 | |||
| MWPINY(4) = -1 | |||
| MWPINY(5) = 2 | |||
| MWPINY(6) = 1 | |||
| MWPINY(7) = 1 | |||
| MWPINY(8) = -1 | |||
| MWPINY(9) = -1 | |||
| MWPINY(10) = 2 | |||
| MWPINY(11) = 1 | |||
| DO 140 I = 1, 11 | |||
| MWPN(I) = 5 | |||
| 140 CONTINUE | |||
| MWPN(5) = 3 | |||
| MWPN(10) = 3 | |||
| DO 160 I = 1, 5 | |||
| MWPX(I) = I | |||
| MWPY(I) = I | |||
| MWPTX(1,I) = I | |||
| MWPTY(1,I) = I | |||
| MWPTX(2,I) = I | |||
| MWPTY(2,I) = -I | |||
| MWPTX(3,I) = 6 - I | |||
| MWPTY(3,I) = I - 6 | |||
| MWPTX(4,I) = I | |||
| MWPTY(4,I) = -I | |||
| MWPTX(6,I) = 6 - I | |||
| MWPTY(6,I) = I - 6 | |||
| MWPTX(7,I) = -I | |||
| MWPTY(7,I) = I | |||
| MWPTX(8,I) = I - 6 | |||
| MWPTY(8,I) = 6 - I | |||
| MWPTX(9,I) = -I | |||
| MWPTY(9,I) = I | |||
| MWPTX(11,I) = I - 6 | |||
| MWPTY(11,I) = 6 - I | |||
| 160 CONTINUE | |||
| MWPTX(5,1) = 1 | |||
| MWPTX(5,2) = 3 | |||
| MWPTX(5,3) = 5 | |||
| MWPTX(5,4) = 4 | |||
| MWPTX(5,5) = 5 | |||
| MWPTY(5,1) = -1 | |||
| MWPTY(5,2) = 2 | |||
| MWPTY(5,3) = -2 | |||
| MWPTY(5,4) = 4 | |||
| MWPTY(5,5) = -3 | |||
| MWPTX(10,1) = -1 | |||
| MWPTX(10,2) = -3 | |||
| MWPTX(10,3) = -5 | |||
| MWPTX(10,4) = 4 | |||
| MWPTX(10,5) = 5 | |||
| MWPTY(10,1) = 1 | |||
| MWPTY(10,2) = 2 | |||
| MWPTY(10,3) = 2 | |||
| MWPTY(10,4) = 4 | |||
| MWPTY(10,5) = 3 | |||
| DO 200 I = 1, 11 | |||
| INCX = MWPINX(I) | |||
| INCY = MWPINY(I) | |||
| DO 180 K = 1, 5 | |||
| COPYX(K) = MWPX(K) | |||
| COPYY(K) = MWPY(K) | |||
| MWPSTX(K) = MWPTX(I,K) | |||
| MWPSTY(K) = MWPTY(I,K) | |||
| 180 CONTINUE | |||
| CALL DROTTEST(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I)) | |||
| CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC) | |||
| CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC) | |||
| 200 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| * ********************************* STEST ************************** | |||
| * | |||
| * THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO | |||
| * SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE | |||
| * NEGLIGIBLE. | |||
| * | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SD | |||
| INTEGER I | |||
| * .. External Functions .. | |||
| DOUBLE PRECISION SDIFF | |||
| EXTERNAL SDIFF | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 40 I = 1, LEN | |||
| SD = SCOMP(I) - STRUE(I) | |||
| IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0D0) | |||
| + GO TO 40 | |||
| * | |||
| * HERE SCOMP(I) IS NOT CLOSE TO STRUE(I). | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I), | |||
| + STRUE(I), SD, SSIZE(I) | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE I ', | |||
| + ' COMP(I) TRUE(I) DIFFERENCE', | |||
| + ' SIZE(I)',/1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4) | |||
| END | |||
| SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC) | |||
| * ************************* STEST1 ***************************** | |||
| * | |||
| * THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN | |||
| * REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE | |||
| * ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT. | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SCOMP1, SFAC, STRUE1 | |||
| * .. Array Arguments .. | |||
| DOUBLE PRECISION SSIZE(*) | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION SCOMP(1), STRUE(1) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Executable Statements .. | |||
| * | |||
| SCOMP(1) = SCOMP1 | |||
| STRUE(1) = STRUE1 | |||
| CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC) | |||
| * | |||
| RETURN | |||
| END | |||
| DOUBLE PRECISION FUNCTION SDIFF(SA,SB) | |||
| * ********************************* SDIFF ************************** | |||
| * COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SA, SB | |||
| * .. Executable Statements .. | |||
| SDIFF = SA - SB | |||
| RETURN | |||
| END | |||
| SUBROUTINE ITEST1(ICOMP,ITRUE) | |||
| * ********************************* ITEST1 ************************* | |||
| * | |||
| * THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR | |||
| * EQUALITY. | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| INTEGER ICOMP, ITRUE | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER ID | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| IF (ICOMP.EQ.ITRUE) GO TO 40 | |||
| * | |||
| * HERE ICOMP IS NOT EQUAL TO ITRUE. | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 ID = ICOMP - ITRUE | |||
| WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE ', | |||
| + ' COMP TRUE DIFFERENCE', | |||
| + /1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,2I36,I12) | |||
| END | |||
| @@ -0,0 +1,789 @@ | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| int cblas_ok, cblas_lerr, cblas_info; | |||
| int link_xerbla=TRUE; | |||
| char *cblas_rout; | |||
| #ifdef F77_Char | |||
| void F77_xerbla(F77_Char F77_srname, void *vinfo); | |||
| #else | |||
| void F77_xerbla(char *srname, void *vinfo); | |||
| #endif | |||
| void chkxer(void) { | |||
| extern int cblas_ok, cblas_lerr, cblas_info; | |||
| extern int link_xerbla; | |||
| extern char *cblas_rout; | |||
| if (cblas_lerr == 1 ) { | |||
| printf("***** ILLEGAL VALUE OF PARAMETER NUMBER %d NOT DETECTED BY %s *****\n", cblas_info, cblas_rout); | |||
| cblas_ok = 0 ; | |||
| } | |||
| cblas_lerr = 1 ; | |||
| } | |||
| void F77_s2chke(char *rout) { | |||
| char *sf = ( rout ) ; | |||
| float A[2] = {0.0,0.0}, | |||
| X[2] = {0.0,0.0}, | |||
| Y[2] = {0.0,0.0}, | |||
| ALPHA=0.0, BETA=0.0; | |||
| extern int cblas_info, cblas_lerr, cblas_ok; | |||
| extern int RowMajorStrg; | |||
| extern char *cblas_rout; | |||
| if (link_xerbla) /* call these first to link */ | |||
| { | |||
| cblas_xerbla(cblas_info,cblas_rout,""); | |||
| F77_xerbla(cblas_rout,&cblas_info); | |||
| } | |||
| cblas_ok = TRUE ; | |||
| cblas_lerr = PASSED ; | |||
| if (strncmp( sf,"cblas_sgemv",11)==0) { | |||
| cblas_rout = "cblas_sgemv"; | |||
| cblas_info = 1; | |||
| cblas_sgemv(INVALID, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, CblasNoTrans, 2, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_sgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, CblasNoTrans, 0, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_sgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_sgbmv",11)==0) { | |||
| cblas_rout = "cblas_sgbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(INVALID, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = FALSE; | |||
| cblas_sgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = TRUE; | |||
| cblas_sgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ssymv",11)==0) { | |||
| cblas_rout = "cblas_ssymv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ssymv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ssymv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ssymv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ssymv(CblasColMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ssymv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_ssymv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ssymv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ssymv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ssymv(CblasRowMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ssymv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_ssymv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ssbmv",11)==0) { | |||
| cblas_rout = "cblas_ssbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(INVALID, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_ssbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_ssbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_sspmv",11)==0) { | |||
| cblas_rout = "cblas_sspmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_sspmv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sspmv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sspmv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_sspmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_sspmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_sspmv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_sspmv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_sspmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_sspmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_strmv",11)==0) { | |||
| cblas_rout = "cblas_strmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_strmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_stbmv",11)==0) { | |||
| cblas_rout = "cblas_stbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_stbmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_stbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_stbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_stpmv",11)==0) { | |||
| cblas_rout = "cblas_stpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_stpmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_stpmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_stpmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_stpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_stpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_stpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_stpmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_stpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_stpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_stpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_stpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_strsv",11)==0) { | |||
| cblas_rout = "cblas_strsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_strsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_stbsv",11)==0) { | |||
| cblas_rout = "cblas_stbsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_stbsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_stbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_stbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_stpsv",11)==0) { | |||
| cblas_rout = "cblas_stpsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_stpsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_stpsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_stpsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_stpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_stpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_stpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_stpsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_stpsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_stpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_stpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_stpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_sger",10)==0) { | |||
| cblas_rout = "cblas_sger"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_sger(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sger(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sger(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_sger(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_sger(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_sger(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_sger(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_sger(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_sger(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_sger(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_sger(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ssyr2",11)==0) { | |||
| cblas_rout = "cblas_ssyr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_ssyr2(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ssyr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ssyr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ssyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ssyr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_ssyr2(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_sspr2",11)==0) { | |||
| cblas_rout = "cblas_sspr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_sspr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sspr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sspr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_sspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_sspr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_sspr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_sspr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_sspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_sspr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ssyr",10)==0) { | |||
| cblas_rout = "cblas_ssyr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ssyr(INVALID, CblasUpper, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ssyr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ssyr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ssyr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ssyr(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ssyr(CblasRowMajor, INVALID, 0, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ssyr(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ssyr(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ssyr(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_sspr",10)==0) { | |||
| cblas_rout = "cblas_sspr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_sspr(INVALID, CblasUpper, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, INVALID, 0, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_sspr(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, A ); | |||
| chkxer(); | |||
| } | |||
| if (cblas_ok == TRUE) | |||
| printf(" %-12s PASSED THE TESTS OF ERROR-EXITS\n", cblas_rout); | |||
| else | |||
| printf("******* %s FAILED THE TESTS OF ERROR-EXITS *******\n",cblas_rout); | |||
| } | |||
| @@ -0,0 +1,83 @@ | |||
| /* | |||
| * c_sblas1.c | |||
| * | |||
| * The program is a C wrapper for scblat1. | |||
| * | |||
| * Written by Keita Teranishi. 2/11/1998 | |||
| * | |||
| */ | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| float F77_sasum(blasint *N, float *X, blasint *incX) | |||
| { | |||
| return cblas_sasum(*N, X, *incX); | |||
| } | |||
| void F77_saxpy(blasint *N, const float *alpha, const float *X, | |||
| blasint *incX, float *Y, blasint *incY) | |||
| { | |||
| cblas_saxpy(*N, *alpha, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| float F77_scasum(blasint *N, float *X, blasint *incX) | |||
| { | |||
| return cblas_scasum(*N, X, *incX); | |||
| } | |||
| float F77_scnrm2(blasint *N, const float *X, blasint *incX) | |||
| { | |||
| return cblas_scnrm2(*N, X, *incX); | |||
| } | |||
| void F77_scopy(blasint *N, const float *X, blasint *incX, | |||
| float *Y, blasint *incY) | |||
| { | |||
| cblas_scopy(*N, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| float F77_sdot(blasint *N, const float *X, blasint *incX, | |||
| const float *Y, blasint *incY) | |||
| { | |||
| return cblas_sdot(*N, X, *incX, Y, *incY); | |||
| } | |||
| float F77_snrm2(blasint *N, const float *X, blasint *incX) | |||
| { | |||
| return cblas_snrm2(*N, X, *incX); | |||
| } | |||
| void F77_srotg( float *a, float *b, float *c, float *s) | |||
| { | |||
| cblas_srotg(a,b,c,s); | |||
| return; | |||
| } | |||
| void F77_srot( blasint *N, float *X, blasint *incX, float *Y, | |||
| blasint *incY, const float *c, const float *s) | |||
| { | |||
| cblas_srot(*N,X,*incX,Y,*incY,*c,*s); | |||
| return; | |||
| } | |||
| void F77_sscal(blasint *N, const float *alpha, float *X, | |||
| blasint *incX) | |||
| { | |||
| cblas_sscal(*N, *alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_sswap( blasint *N, float *X, blasint *incX, | |||
| float *Y, blasint *incY) | |||
| { | |||
| cblas_sswap(*N,X,*incX,Y,*incY); | |||
| return; | |||
| } | |||
| int F77_isamax(blasint *N, const float *X, blasint *incX) | |||
| { | |||
| if (*N < 1 || *incX < 1) return(0); | |||
| return (cblas_isamax(*N, X, *incX)+1); | |||
| } | |||
| @@ -0,0 +1,579 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 1/23/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_sgemv(int *order, char *transp, int *m, int *n, float *alpha, | |||
| float *a, int *lda, float *x, int *incx, float *beta, | |||
| float *y, int *incy ) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_sgemv( CblasRowMajor, trans, | |||
| *m, *n, *alpha, A, LDA, x, *incx, *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_sgemv( CblasColMajor, trans, | |||
| *m, *n, *alpha, a, *lda, x, *incx, *beta, y, *incy ); | |||
| else | |||
| cblas_sgemv( UNDEFINED, trans, | |||
| *m, *n, *alpha, a, *lda, x, *incx, *beta, y, *incy ); | |||
| } | |||
| void F77_sger(int *order, int *m, int *n, float *alpha, float *x, int *incx, | |||
| float *y, int *incy, float *a, int *lda ) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) { | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| } | |||
| cblas_sger(CblasRowMajor, *m, *n, *alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_sger( CblasColMajor, *m, *n, *alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_strmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, float *a, int *lda, float *x, int *incx) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_strmv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_strmv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| else { | |||
| cblas_strmv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| } | |||
| } | |||
| void F77_strsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, float *a, int *lda, float *x, int *incx ) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_strsv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_strsv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| } | |||
| void F77_ssymv(int *order, char *uplow, int *n, float *alpha, float *a, | |||
| int *lda, float *x, int *incx, float *beta, float *y, | |||
| int *incy) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_ssymv(CblasRowMajor, uplo, *n, *alpha, A, LDA, x, *incx, | |||
| *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_ssymv(CblasColMajor, uplo, *n, *alpha, a, *lda, x, *incx, | |||
| *beta, y, *incy ); | |||
| } | |||
| void F77_ssyr(int *order, char *uplow, int *n, float *alpha, float *x, | |||
| int *incx, float *a, int *lda) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_ssyr(CblasRowMajor, uplo, *n, *alpha, x, *incx, A, LDA); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_ssyr(CblasColMajor, uplo, *n, *alpha, x, *incx, a, *lda); | |||
| } | |||
| void F77_ssyr2(int *order, char *uplow, int *n, float *alpha, float *x, | |||
| int *incx, float *y, int *incy, float *a, int *lda) { | |||
| float *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*i+j ]=a[ (*lda)*j+i ]; | |||
| cblas_ssyr2(CblasRowMajor, uplo, *n, *alpha, x, *incx, y, *incy, A, LDA); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| a[ (*lda)*j+i ]=A[ LDA*i+j ]; | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_ssyr2(CblasColMajor, uplo, *n, *alpha, x, *incx, y, *incy, a, *lda); | |||
| } | |||
| void F77_sgbmv(int *order, char *transp, int *m, int *n, int *kl, int *ku, | |||
| float *alpha, float *a, int *lda, float *x, int *incx, | |||
| float *beta, float *y, int *incy ) { | |||
| float *A; | |||
| int i,irow,j,jcol,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *ku+*kl+2; | |||
| A = ( float* )malloc( (*n+*kl)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*ku; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=(*ku)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*ku; | |||
| irow=*ku+*kl-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=*ku+1; i<*ku+*kl+1; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=i-(*ku); | |||
| for( j=jcol; j<(*n+*kl); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| cblas_sgbmv( CblasRowMajor, trans, *m, *n, *kl, *ku, *alpha, | |||
| A, LDA, x, *incx, *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_sgbmv( CblasColMajor, trans, *m, *n, *kl, *ku, *alpha, | |||
| a, *lda, x, *incx, *beta, y, *incy ); | |||
| } | |||
| void F77_stbmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, float *a, int *lda, float *x, int *incx) { | |||
| float *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( float* )malloc( (*n+*k)*LDA*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_stbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_stbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_stbsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, float *a, int *lda, float *x, int *incx) { | |||
| float *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( float* )malloc( (*n+*k)*LDA*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_stbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_stbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_ssbmv(int *order, char *uplow, int *n, int *k, float *alpha, | |||
| float *a, int *lda, float *x, int *incx, float *beta, | |||
| float *y, int *incy) { | |||
| float *A; | |||
| int i,j,irow,jcol,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *k+1; | |||
| A = ( float* )malloc( (*n+*k)*LDA*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) | |||
| A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*j+i ]; | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) | |||
| A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ]; | |||
| } | |||
| } | |||
| cblas_ssbmv(CblasRowMajor, uplo, *n, *k, *alpha, A, LDA, x, *incx, | |||
| *beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else | |||
| cblas_ssbmv(CblasColMajor, uplo, *n, *k, *alpha, a, *lda, x, *incx, | |||
| *beta, y, *incy ); | |||
| } | |||
| void F77_sspmv(int *order, char *uplow, int *n, float *alpha, float *ap, | |||
| float *x, int *incx, float *beta, float *y, int *incy) { | |||
| float *A,*AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( float* )malloc( LDA*LDA*sizeof( float ) ); | |||
| AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_sspmv( CblasRowMajor, uplo, *n, *alpha, AP, x, *incx, *beta, y, | |||
| *incy ); | |||
| free(A); free(AP); | |||
| } | |||
| else | |||
| cblas_sspmv( CblasColMajor, uplo, *n, *alpha, ap, x, *incx, *beta, y, | |||
| *incy ); | |||
| } | |||
| void F77_stpmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, float *ap, float *x, int *incx) { | |||
| float *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( float* )malloc( LDA*LDA*sizeof( float ) ); | |||
| AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_stpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); free(AP); | |||
| } | |||
| else | |||
| cblas_stpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_stpsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, float *ap, float *x, int *incx) { | |||
| float *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( float* )malloc( LDA*LDA*sizeof( float ) ); | |||
| AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_stpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); free(AP); | |||
| } | |||
| else | |||
| cblas_stpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_sspr(int *order, char *uplow, int *n, float *alpha, float *x, | |||
| int *incx, float *ap ){ | |||
| float *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( float* )malloc( LDA*LDA*sizeof( float ) ); | |||
| AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_sspr( CblasRowMajor, uplo, *n, *alpha, x, *incx, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| free(A); free(AP); | |||
| } | |||
| else | |||
| cblas_sspr( CblasColMajor, uplo, *n, *alpha, x, *incx, ap ); | |||
| } | |||
| void F77_sspr2(int *order, char *uplow, int *n, float *alpha, float *x, | |||
| int *incx, float *y, int *incy, float *ap ){ | |||
| float *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n; | |||
| A = ( float* )malloc( LDA*LDA*sizeof( float ) ); | |||
| AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) ); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| A[ LDA*i+j ]=ap[ k ]; | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| AP[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| cblas_sspr2( CblasRowMajor, uplo, *n, *alpha, x, *incx, y, *incy, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) | |||
| A[ LDA*i+j ]=AP[ k ]; | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) | |||
| ap[ k ]=A[ LDA*i+j ]; | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| else | |||
| cblas_sspr2( CblasColMajor, uplo, *n, *alpha, x, *incx, y, *incy, ap ); | |||
| } | |||
| @@ -0,0 +1,330 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 2/19/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_sgemm(int *order, char *transpa, char *transpb, int *m, int *n, | |||
| int *k, float *alpha, float *a, int *lda, float *b, int *ldb, | |||
| float *beta, float *c, int *ldc ) { | |||
| float *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_TRANSPOSE transa, transb; | |||
| get_transpose_type(transpa, &transa); | |||
| get_transpose_type(transpb, &transb); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (transa == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A = (float *)malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else { | |||
| LDA = *m+1; | |||
| A = ( float* )malloc( LDA*(*k)*sizeof( float ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| if (transb == CblasNoTrans) { | |||
| LDB = *n+1; | |||
| B = ( float* )malloc( (*k)*LDB*sizeof( float ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| else { | |||
| LDB = *k+1; | |||
| B = ( float* )malloc( LDB*(*n)*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| LDC = *n+1; | |||
| C = ( float* )malloc( (*m)*LDC*sizeof( float ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_sgemm( CblasRowMajor, transa, transb, *m, *n, *k, *alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_sgemm( CblasColMajor, transa, transb, *m, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_sgemm( UNDEFINED, transa, transb, *m, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_ssymm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| float *alpha, float *a, int *lda, float *b, int *ldb, | |||
| float *beta, float *c, int *ldc ) { | |||
| float *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( float* )malloc( (*m)*LDB*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| LDC = *n+1; | |||
| C = ( float* )malloc( (*m)*LDC*sizeof( float ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_ssymm( CblasRowMajor, side, uplo, *m, *n, *alpha, A, LDA, B, LDB, | |||
| *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ssymm( CblasColMajor, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb, | |||
| *beta, c, *ldc ); | |||
| else | |||
| cblas_ssymm( UNDEFINED, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb, | |||
| *beta, c, *ldc ); | |||
| } | |||
| void F77_ssyrk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| float *alpha, float *a, int *lda, | |||
| float *beta, float *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| float *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*k)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDC = *n+1; | |||
| C = ( float* )malloc( (*n)*LDC*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_ssyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ssyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_ssyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_ssyr2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| float *alpha, float *a, int *lda, float *b, int *ldb, | |||
| float *beta, float *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| float *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| B = ( float* )malloc( (*n)*LDB*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A = ( float* )malloc( LDA*(*k)*sizeof( float ) ); | |||
| B = ( float* )malloc( LDB*(*k)*sizeof( float ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C = ( float* )malloc( (*n)*LDC*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_ssyr2k(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ssyr2k(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_ssyr2k(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_strmm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, float *alpha, float *a, int *lda, float *b, | |||
| int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| float *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( float* )malloc( (*m)*LDB*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| cblas_strmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| b[j*(*ldb)+i]=B[i*LDB+j]; | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_strmm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_strmm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| void F77_strsm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, float *alpha, float *a, int *lda, float *b, | |||
| int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| float *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B = ( float* )malloc( (*m)*LDB*sizeof( float ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| cblas_strsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| b[j*(*ldb)+i]=B[i*LDB+j]; | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_strsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_strsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| @@ -0,0 +1,728 @@ | |||
| PROGRAM SCBLAT1 | |||
| * Test program for the REAL Level 1 CBLAS. | |||
| * Based upon the original CBLAS test routine together with: | |||
| * F06EAF Example Program Text | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SFAC | |||
| INTEGER IC | |||
| * .. External Subroutines .. | |||
| EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SFAC/9.765625E-4/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) | |||
| DO 20 IC = 1, 10 | |||
| ICASE = IC | |||
| CALL HEADER | |||
| * | |||
| * .. Initialize PASS, INCX, INCY, and MODE for a new case. .. | |||
| * .. the value 9999 for INCX, INCY or MODE will appear in the .. | |||
| * .. detailed output, if any, for cases that do not involve .. | |||
| * .. these parameters .. | |||
| * | |||
| PASS = .TRUE. | |||
| INCX = 9999 | |||
| INCY = 9999 | |||
| MODE = 9999 | |||
| IF (ICASE.EQ.3) THEN | |||
| CALL CHECK0(SFAC) | |||
| ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR. | |||
| + ICASE.EQ.10) THEN | |||
| CALL CHECK1(SFAC) | |||
| ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR. | |||
| + ICASE.EQ.6) THEN | |||
| CALL CHECK2(SFAC) | |||
| ELSE IF (ICASE.EQ.4) THEN | |||
| CALL CHECK3(SFAC) | |||
| END IF | |||
| IF (PASS) WRITE (NOUT,99998) | |||
| 20 CONTINUE | |||
| STOP | |||
| * | |||
| 99999 FORMAT (' Real CBLAS Test Program Results',/1X) | |||
| 99998 FORMAT (' ----- PASS -----') | |||
| END | |||
| SUBROUTINE HEADER | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Arrays .. | |||
| CHARACTER*15 L(10) | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA L(1)/'CBLAS_SDOT '/ | |||
| DATA L(2)/'CBLAS_SAXPY '/ | |||
| DATA L(3)/'CBLAS_SROTG '/ | |||
| DATA L(4)/'CBLAS_SROT '/ | |||
| DATA L(5)/'CBLAS_SCOPY '/ | |||
| DATA L(6)/'CBLAS_SSWAP '/ | |||
| DATA L(7)/'CBLAS_SNRM2 '/ | |||
| DATA L(8)/'CBLAS_SASUM '/ | |||
| DATA L(9)/'CBLAS_SSCAL '/ | |||
| DATA L(10)/'CBLAS_ISAMAX'/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) ICASE, L(ICASE) | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (/' Test of subprogram number',I3,9X,A15) | |||
| END | |||
| SUBROUTINE CHECK0(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SA, SB, SC, SS | |||
| INTEGER K | |||
| * .. Local Arrays .. | |||
| REAL DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8), | |||
| + DS1(8) | |||
| * .. External Subroutines .. | |||
| EXTERNAL SROTGTEST, STEST1 | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA DA1/0.3E0, 0.4E0, -0.3E0, -0.4E0, -0.3E0, 0.0E0, | |||
| + 0.0E0, 1.0E0/ | |||
| DATA DB1/0.4E0, 0.3E0, 0.4E0, 0.3E0, -0.4E0, 0.0E0, | |||
| + 1.0E0, 0.0E0/ | |||
| DATA DC1/0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.6E0, 1.0E0, | |||
| + 0.0E0, 1.0E0/ | |||
| DATA DS1/0.8E0, 0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.0E0, | |||
| + 1.0E0, 0.0E0/ | |||
| DATA DATRUE/0.5E0, 0.5E0, 0.5E0, -0.5E0, -0.5E0, | |||
| + 0.0E0, 1.0E0, 1.0E0/ | |||
| DATA DBTRUE/0.0E0, 0.6E0, 0.0E0, -0.6E0, 0.0E0, | |||
| + 0.0E0, 1.0E0, 0.0E0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| * Compute true values which cannot be prestored | |||
| * in decimal notation | |||
| * | |||
| DBTRUE(1) = 1.0E0/0.6E0 | |||
| DBTRUE(3) = -1.0E0/0.6E0 | |||
| DBTRUE(5) = 1.0E0/0.6E0 | |||
| * | |||
| DO 20 K = 1, 8 | |||
| * .. Set N=K for identification in output if any .. | |||
| N = K | |||
| IF (ICASE.EQ.3) THEN | |||
| * .. SROTGTEST .. | |||
| IF (K.GT.8) GO TO 40 | |||
| SA = DA1(K) | |||
| SB = DB1(K) | |||
| CALL SROTGTEST(SA,SB,SC,SS) | |||
| CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC) | |||
| CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC) | |||
| CALL STEST1(SC,DC1(K),DC1(K),SFAC) | |||
| CALL STEST1(SS,DS1(K),DS1(K),SFAC) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' | |||
| STOP | |||
| END IF | |||
| 20 CONTINUE | |||
| 40 RETURN | |||
| END | |||
| SUBROUTINE CHECK1(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER I, LEN, NP1 | |||
| * .. Local Arrays .. | |||
| REAL DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2), | |||
| + SA(10), STEMP(1), STRUE(8), SX(8) | |||
| INTEGER ITRUE2(5) | |||
| * .. External Functions .. | |||
| REAL SASUMTEST, SNRM2TEST | |||
| INTEGER ISAMAXTEST | |||
| EXTERNAL SASUMTEST, SNRM2TEST, ISAMAXTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL ITEST1, SSCALTEST, STEST, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC MAX | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA/0.3E0, -1.0E0, 0.0E0, 1.0E0, 0.3E0, 0.3E0, | |||
| + 0.3E0, 0.3E0, 0.3E0, 0.3E0/ | |||
| DATA DV/0.1E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, | |||
| + 2.0E0, 2.0E0, 0.3E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0, | |||
| + 3.0E0, 3.0E0, 3.0E0, 0.3E0, -0.4E0, 4.0E0, | |||
| + 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 0.2E0, | |||
| + -0.6E0, 0.3E0, 5.0E0, 5.0E0, 5.0E0, 5.0E0, | |||
| + 5.0E0, 0.1E0, -0.3E0, 0.5E0, -0.1E0, 6.0E0, | |||
| + 6.0E0, 6.0E0, 6.0E0, 0.1E0, 8.0E0, 8.0E0, 8.0E0, | |||
| + 8.0E0, 8.0E0, 8.0E0, 8.0E0, 0.3E0, 9.0E0, 9.0E0, | |||
| + 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 0.3E0, 2.0E0, | |||
| + -0.4E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, | |||
| + 0.2E0, 3.0E0, -0.6E0, 5.0E0, 0.3E0, 2.0E0, | |||
| + 2.0E0, 2.0E0, 0.1E0, 4.0E0, -0.3E0, 6.0E0, | |||
| + -0.5E0, 7.0E0, -0.1E0, 3.0E0/ | |||
| DATA DTRUE1/0.0E0, 0.3E0, 0.5E0, 0.7E0, 0.6E0/ | |||
| DATA DTRUE3/0.0E0, 0.3E0, 0.7E0, 1.1E0, 1.0E0/ | |||
| DATA DTRUE5/0.10E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, | |||
| + 2.0E0, 2.0E0, 2.0E0, -0.3E0, 3.0E0, 3.0E0, | |||
| + 3.0E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0, 0.0E0, 0.0E0, | |||
| + 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, | |||
| + 0.20E0, -0.60E0, 0.30E0, 5.0E0, 5.0E0, 5.0E0, | |||
| + 5.0E0, 5.0E0, 0.03E0, -0.09E0, 0.15E0, -0.03E0, | |||
| + 6.0E0, 6.0E0, 6.0E0, 6.0E0, 0.10E0, 8.0E0, | |||
| + 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0, | |||
| + 0.09E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, | |||
| + 9.0E0, 9.0E0, 0.09E0, 2.0E0, -0.12E0, 2.0E0, | |||
| + 2.0E0, 2.0E0, 2.0E0, 2.0E0, 0.06E0, 3.0E0, | |||
| + -0.18E0, 5.0E0, 0.09E0, 2.0E0, 2.0E0, 2.0E0, | |||
| + 0.03E0, 4.0E0, -0.09E0, 6.0E0, -0.15E0, 7.0E0, | |||
| + -0.03E0, 3.0E0/ | |||
| DATA ITRUE2/0, 1, 2, 2, 3/ | |||
| * .. Executable Statements .. | |||
| DO 80 INCX = 1, 2 | |||
| DO 60 NP1 = 1, 5 | |||
| N = NP1 - 1 | |||
| LEN = 2*MAX(N,1) | |||
| * .. Set vector arguments .. | |||
| DO 20 I = 1, LEN | |||
| SX(I) = DV(I,NP1,INCX) | |||
| 20 CONTINUE | |||
| * | |||
| IF (ICASE.EQ.7) THEN | |||
| * .. SNRM2TEST .. | |||
| STEMP(1) = DTRUE1(NP1) | |||
| CALL STEST1(SNRM2TEST(N,SX,INCX),STEMP,STEMP,SFAC) | |||
| ELSE IF (ICASE.EQ.8) THEN | |||
| * .. SASUMTEST .. | |||
| STEMP(1) = DTRUE3(NP1) | |||
| CALL STEST1(SASUMTEST(N,SX,INCX),STEMP,STEMP,SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * .. SSCALTEST .. | |||
| CALL SSCALTEST(N,SA((INCX-1)*5+NP1),SX,INCX) | |||
| DO 40 I = 1, LEN | |||
| STRUE(I) = DTRUE5(I,NP1,INCX) | |||
| 40 CONTINUE | |||
| CALL STEST(LEN,SX,STRUE,STRUE,SFAC) | |||
| ELSE IF (ICASE.EQ.10) THEN | |||
| * .. ISAMAXTEST .. | |||
| CALL ITEST1(ISAMAXTEST(N,SX,INCX),ITRUE2(NP1)) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' | |||
| STOP | |||
| END IF | |||
| 60 CONTINUE | |||
| 80 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK2(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SA | |||
| INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| REAL DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4), | |||
| + DT8(7,4,4), DX1(7), | |||
| + DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7), | |||
| + SX(7), SY(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4) | |||
| * .. External Functions .. | |||
| REAL SDOTTEST | |||
| EXTERNAL SDOTTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL SAXPYTEST, SCOPYTEST, SSWAPTEST, STEST, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA/0.3E0/ | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0, | |||
| + -0.4E0/ | |||
| DATA DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0, | |||
| + 0.8E0/ | |||
| DATA DT7/0.0E0, 0.30E0, 0.21E0, 0.62E0, 0.0E0, | |||
| + 0.30E0, -0.07E0, 0.85E0, 0.0E0, 0.30E0, -0.79E0, | |||
| + -0.74E0, 0.0E0, 0.30E0, 0.33E0, 1.27E0/ | |||
| DATA DT8/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.15E0, | |||
| + 0.94E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.68E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.35E0, -0.9E0, 0.48E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.38E0, -0.9E0, 0.57E0, 0.7E0, -0.75E0, | |||
| + 0.2E0, 0.98E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.68E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.35E0, -0.72E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.38E0, | |||
| + -0.63E0, 0.15E0, 0.88E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.7E0, | |||
| + -0.75E0, 0.2E0, 1.04E0/ | |||
| DATA DT10X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.5E0, -0.9E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.5E0, -0.9E0, 0.3E0, 0.7E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.3E0, 0.1E0, 0.5E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.8E0, 0.1E0, -0.6E0, | |||
| + 0.8E0, 0.3E0, -0.3E0, 0.5E0, 0.6E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.9E0, | |||
| + 0.1E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0, | |||
| + 0.1E0, 0.3E0, 0.8E0, -0.9E0, -0.3E0, 0.5E0, | |||
| + 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.5E0, 0.3E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.5E0, 0.3E0, -0.6E0, 0.8E0, 0.0E0, 0.0E0, | |||
| + 0.0E0/ | |||
| DATA DT10Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.6E0, 0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, -0.5E0, -0.9E0, 0.6E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, -0.4E0, -0.9E0, 0.9E0, | |||
| + 0.7E0, -0.5E0, 0.2E0, 0.6E0, 0.5E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.5E0, | |||
| + 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + -0.4E0, 0.9E0, -0.5E0, 0.6E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.7E0, | |||
| + -0.5E0, 0.2E0, 0.8E0/ | |||
| DATA SSIZE1/0.0E0, 0.3E0, 1.6E0, 3.2E0/ | |||
| DATA SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, | |||
| + 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, | |||
| + 1.17E0, 1.17E0, 1.17E0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 120 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 100 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * .. Initialize all argument arrays .. | |||
| DO 20 I = 1, 7 | |||
| SX(I) = DX1(I) | |||
| SY(I) = DY1(I) | |||
| 20 CONTINUE | |||
| * | |||
| IF (ICASE.EQ.1) THEN | |||
| * .. SDOTTEST .. | |||
| CALL STEST1(SDOTTEST(N,SX,INCX,SY,INCY),DT7(KN,KI), | |||
| + SSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.2) THEN | |||
| * .. SAXPYTEST .. | |||
| CALL SAXPYTEST(N,SA,SX,INCX,SY,INCY) | |||
| DO 40 J = 1, LENY | |||
| STY(J) = DT8(J,KN,KI) | |||
| 40 CONTINUE | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) | |||
| ELSE IF (ICASE.EQ.5) THEN | |||
| * .. SCOPYTEST .. | |||
| DO 60 I = 1, 7 | |||
| STY(I) = DT10Y(I,KN,KI) | |||
| 60 CONTINUE | |||
| CALL SCOPYTEST(N,SX,INCX,SY,INCY) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0) | |||
| ELSE IF (ICASE.EQ.6) THEN | |||
| * .. SSWAPTEST .. | |||
| CALL SSWAPTEST(N,SX,INCX,SY,INCY) | |||
| DO 80 I = 1, 7 | |||
| STX(I) = DT10X(I,KN,KI) | |||
| STY(I) = DT10Y(I,KN,KI) | |||
| 80 CONTINUE | |||
| CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0E0) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' | |||
| STOP | |||
| END IF | |||
| 100 CONTINUE | |||
| 120 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK3(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SC, SS | |||
| INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| REAL COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4), | |||
| + DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5), | |||
| + MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5), | |||
| + MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7), | |||
| + SY(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11), | |||
| + MWPINY(11), MWPN(11), NS(4) | |||
| * .. External Subroutines .. | |||
| EXTERNAL SROTTEST, STEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0, | |||
| + -0.4E0/ | |||
| DATA DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0, | |||
| + 0.8E0/ | |||
| DATA SC, SS/0.8E0, 0.6E0/ | |||
| DATA DT9X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.78E0, -0.46E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.78E0, -0.46E0, -0.22E0, | |||
| + 1.06E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.78E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.66E0, 0.1E0, -0.1E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.96E0, 0.1E0, -0.76E0, 0.8E0, 0.90E0, | |||
| + -0.3E0, -0.02E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.78E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.06E0, 0.1E0, | |||
| + -0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.90E0, | |||
| + 0.1E0, -0.22E0, 0.8E0, 0.18E0, -0.3E0, -0.02E0, | |||
| + 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.78E0, 0.26E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.78E0, 0.26E0, -0.76E0, 1.12E0, | |||
| + 0.0E0, 0.0E0, 0.0E0/ | |||
| DATA DT9Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.54E0, | |||
| + 0.08E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.04E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0, | |||
| + -0.9E0, -0.12E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.64E0, -0.9E0, -0.30E0, 0.7E0, -0.18E0, 0.2E0, | |||
| + 0.28E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.7E0, -1.08E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.64E0, -1.26E0, | |||
| + 0.54E0, 0.20E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.7E0, | |||
| + -0.18E0, 0.2E0, 0.16E0/ | |||
| DATA SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, | |||
| + 0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, | |||
| + 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, | |||
| + 1.17E0, 1.17E0, 1.17E0/ | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 60 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 40 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * | |||
| IF (ICASE.EQ.4) THEN | |||
| * .. SROTTEST .. | |||
| DO 20 I = 1, 7 | |||
| SX(I) = DX1(I) | |||
| SY(I) = DY1(I) | |||
| STX(I) = DT9X(I,KN,KI) | |||
| STY(I) = DT9Y(I,KN,KI) | |||
| 20 CONTINUE | |||
| CALL SROTTEST(N,SX,INCX,SY,INCY,SC,SS) | |||
| CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC) | |||
| CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' | |||
| STOP | |||
| END IF | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| * | |||
| MWPC(1) = 1 | |||
| DO 80 I = 2, 11 | |||
| MWPC(I) = 0 | |||
| 80 CONTINUE | |||
| MWPS(1) = 0 | |||
| DO 100 I = 2, 6 | |||
| MWPS(I) = 1 | |||
| 100 CONTINUE | |||
| DO 120 I = 7, 11 | |||
| MWPS(I) = -1 | |||
| 120 CONTINUE | |||
| MWPINX(1) = 1 | |||
| MWPINX(2) = 1 | |||
| MWPINX(3) = 1 | |||
| MWPINX(4) = -1 | |||
| MWPINX(5) = 1 | |||
| MWPINX(6) = -1 | |||
| MWPINX(7) = 1 | |||
| MWPINX(8) = 1 | |||
| MWPINX(9) = -1 | |||
| MWPINX(10) = 1 | |||
| MWPINX(11) = -1 | |||
| MWPINY(1) = 1 | |||
| MWPINY(2) = 1 | |||
| MWPINY(3) = -1 | |||
| MWPINY(4) = -1 | |||
| MWPINY(5) = 2 | |||
| MWPINY(6) = 1 | |||
| MWPINY(7) = 1 | |||
| MWPINY(8) = -1 | |||
| MWPINY(9) = -1 | |||
| MWPINY(10) = 2 | |||
| MWPINY(11) = 1 | |||
| DO 140 I = 1, 11 | |||
| MWPN(I) = 5 | |||
| 140 CONTINUE | |||
| MWPN(5) = 3 | |||
| MWPN(10) = 3 | |||
| DO 160 I = 1, 5 | |||
| MWPX(I) = I | |||
| MWPY(I) = I | |||
| MWPTX(1,I) = I | |||
| MWPTY(1,I) = I | |||
| MWPTX(2,I) = I | |||
| MWPTY(2,I) = -I | |||
| MWPTX(3,I) = 6 - I | |||
| MWPTY(3,I) = I - 6 | |||
| MWPTX(4,I) = I | |||
| MWPTY(4,I) = -I | |||
| MWPTX(6,I) = 6 - I | |||
| MWPTY(6,I) = I - 6 | |||
| MWPTX(7,I) = -I | |||
| MWPTY(7,I) = I | |||
| MWPTX(8,I) = I - 6 | |||
| MWPTY(8,I) = 6 - I | |||
| MWPTX(9,I) = -I | |||
| MWPTY(9,I) = I | |||
| MWPTX(11,I) = I - 6 | |||
| MWPTY(11,I) = 6 - I | |||
| 160 CONTINUE | |||
| MWPTX(5,1) = 1 | |||
| MWPTX(5,2) = 3 | |||
| MWPTX(5,3) = 5 | |||
| MWPTX(5,4) = 4 | |||
| MWPTX(5,5) = 5 | |||
| MWPTY(5,1) = -1 | |||
| MWPTY(5,2) = 2 | |||
| MWPTY(5,3) = -2 | |||
| MWPTY(5,4) = 4 | |||
| MWPTY(5,5) = -3 | |||
| MWPTX(10,1) = -1 | |||
| MWPTX(10,2) = -3 | |||
| MWPTX(10,3) = -5 | |||
| MWPTX(10,4) = 4 | |||
| MWPTX(10,5) = 5 | |||
| MWPTY(10,1) = 1 | |||
| MWPTY(10,2) = 2 | |||
| MWPTY(10,3) = 2 | |||
| MWPTY(10,4) = 4 | |||
| MWPTY(10,5) = 3 | |||
| DO 200 I = 1, 11 | |||
| INCX = MWPINX(I) | |||
| INCY = MWPINY(I) | |||
| DO 180 K = 1, 5 | |||
| COPYX(K) = MWPX(K) | |||
| COPYY(K) = MWPY(K) | |||
| MWPSTX(K) = MWPTX(I,K) | |||
| MWPSTY(K) = MWPTY(I,K) | |||
| 180 CONTINUE | |||
| CALL SROTTEST(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I)) | |||
| CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC) | |||
| CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC) | |||
| 200 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| * ********************************* STEST ************************** | |||
| * | |||
| * THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO | |||
| * SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE | |||
| * NEGLIGIBLE. | |||
| * | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| REAL SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| REAL SD | |||
| INTEGER I | |||
| * .. External Functions .. | |||
| REAL SDIFF | |||
| EXTERNAL SDIFF | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 40 I = 1, LEN | |||
| SD = SCOMP(I) - STRUE(I) | |||
| IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0) | |||
| + GO TO 40 | |||
| * | |||
| * HERE SCOMP(I) IS NOT CLOSE TO STRUE(I). | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I), | |||
| + STRUE(I), SD, SSIZE(I) | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE I ', | |||
| + ' COMP(I) TRUE(I) DIFFERENCE', | |||
| + ' SIZE(I)',/1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4) | |||
| END | |||
| SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC) | |||
| * ************************* STEST1 ***************************** | |||
| * | |||
| * THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN | |||
| * REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE | |||
| * ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT. | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| REAL SCOMP1, SFAC, STRUE1 | |||
| * .. Array Arguments .. | |||
| REAL SSIZE(*) | |||
| * .. Local Arrays .. | |||
| REAL SCOMP(1), STRUE(1) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Executable Statements .. | |||
| * | |||
| SCOMP(1) = SCOMP1 | |||
| STRUE(1) = STRUE1 | |||
| CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC) | |||
| * | |||
| RETURN | |||
| END | |||
| REAL FUNCTION SDIFF(SA,SB) | |||
| * ********************************* SDIFF ************************** | |||
| * COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| REAL SA, SB | |||
| * .. Executable Statements .. | |||
| SDIFF = SA - SB | |||
| RETURN | |||
| END | |||
| SUBROUTINE ITEST1(ICOMP,ITRUE) | |||
| * ********************************* ITEST1 ************************* | |||
| * | |||
| * THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR | |||
| * EQUALITY. | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| INTEGER ICOMP, ITRUE | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER ID | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| IF (ICOMP.EQ.ITRUE) GO TO 40 | |||
| * | |||
| * HERE ICOMP IS NOT EQUAL TO ITRUE. | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 ID = ICOMP - ITRUE | |||
| WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE ', | |||
| + ' COMP TRUE DIFFERENCE', | |||
| + /1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,2I36,I12) | |||
| END | |||
| @@ -0,0 +1,137 @@ | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdarg.h> | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void cblas_xerbla(blasint info, char *rout, char *form, ...) | |||
| { | |||
| extern int cblas_lerr, cblas_info, cblas_ok; | |||
| extern int link_xerbla; | |||
| extern int RowMajorStrg; | |||
| extern char *cblas_rout; | |||
| /* Initially, c__3chke will call this routine with | |||
| * global variable link_xerbla=1, and F77_xerbla will set link_xerbla=0. | |||
| * This is done to fool the linker into loading these subroutines first | |||
| * instead of ones in the CBLAS or the legacy BLAS library. | |||
| */ | |||
| if (link_xerbla) return; | |||
| if (cblas_rout != NULL && strcmp(cblas_rout, rout) != 0){ | |||
| printf("***** XERBLA WAS CALLED WITH SRNAME = <%s> INSTEAD OF <%s> *******\n", rout, cblas_rout); | |||
| cblas_ok = FALSE; | |||
| } | |||
| if (RowMajorStrg) | |||
| { | |||
| /* To properly check leading dimension problems in cblas__gemm, we | |||
| * need to do the following trick. When cblas__gemm is called with | |||
| * CblasRowMajor, the arguments A and B switch places in the call to | |||
| * f77__gemm. Thus when we test for bad leading dimension problems | |||
| * for A and B, lda is in position 11 instead of 9, and ldb is in | |||
| * position 9 instead of 11. | |||
| */ | |||
| if (strstr(rout,"gemm") != 0) | |||
| { | |||
| if (info == 5 ) info = 4; | |||
| else if (info == 4 ) info = 5; | |||
| else if (info == 11) info = 9; | |||
| else if (info == 9 ) info = 11; | |||
| } | |||
| else if (strstr(rout,"symm") != 0 || strstr(rout,"hemm") != 0) | |||
| { | |||
| if (info == 5 ) info = 4; | |||
| else if (info == 4 ) info = 5; | |||
| } | |||
| else if (strstr(rout,"trmm") != 0 || strstr(rout,"trsm") != 0) | |||
| { | |||
| if (info == 7 ) info = 6; | |||
| else if (info == 6 ) info = 7; | |||
| } | |||
| else if (strstr(rout,"gemv") != 0) | |||
| { | |||
| if (info == 4) info = 3; | |||
| else if (info == 3) info = 4; | |||
| } | |||
| else if (strstr(rout,"gbmv") != 0) | |||
| { | |||
| if (info == 4) info = 3; | |||
| else if (info == 3) info = 4; | |||
| else if (info == 6) info = 5; | |||
| else if (info == 5) info = 6; | |||
| } | |||
| else if (strstr(rout,"ger") != 0) | |||
| { | |||
| if (info == 3) info = 2; | |||
| else if (info == 2) info = 3; | |||
| else if (info == 8) info = 6; | |||
| else if (info == 6) info = 8; | |||
| } | |||
| else if ( ( strstr(rout,"her2") != 0 || strstr(rout,"hpr2") != 0 ) | |||
| && strstr(rout,"her2k") == 0 ) | |||
| { | |||
| if (info == 8) info = 6; | |||
| else if (info == 6) info = 8; | |||
| } | |||
| } | |||
| if (info != cblas_info){ | |||
| printf("***** XERBLA WAS CALLED WITH INFO = %d INSTEAD OF %d in %s *******\n",info, cblas_info, rout); | |||
| cblas_lerr = PASSED; | |||
| cblas_ok = FALSE; | |||
| } else cblas_lerr = FAILED; | |||
| } | |||
| #ifdef F77_Char | |||
| void F77_xerbla(F77_Char F77_srname, void *vinfo) | |||
| #else | |||
| void F77_xerbla(char *srname, void *vinfo) | |||
| #endif | |||
| { | |||
| #ifdef F77_Char | |||
| char *srname; | |||
| #endif | |||
| char rout[] = {'c','b','l','a','s','_','\0','\0','\0','\0','\0','\0','\0'}; | |||
| #ifdef F77_Integer | |||
| F77_Integer *info=vinfo; | |||
| F77_Integer i; | |||
| extern F77_Integer link_xerbla; | |||
| #else | |||
| int *info=vinfo; | |||
| int i; | |||
| extern int link_xerbla; | |||
| #endif | |||
| #ifdef F77_Char | |||
| srname = F2C_STR(F77_srname, XerblaStrLen); | |||
| #endif | |||
| /* See the comment in cblas_xerbla() above */ | |||
| if (link_xerbla) | |||
| { | |||
| link_xerbla = 0; | |||
| return; | |||
| } | |||
| for(i=0; i < 6; i++) rout[i+6] = tolower(srname[i]); | |||
| for(i=11; i >= 9; i--) if (rout[i] == ' ') rout[i] = '\0'; | |||
| /* We increment *info by 1 since the CBLAS interface adds one more | |||
| * argument to all level 2 and 3 routines. | |||
| */ | |||
| cblas_xerbla(*info+1,rout,""); | |||
| } | |||
| #ifdef USE64BITINT | |||
| #undef int | |||
| #endif | |||
| int BLASFUNC(xerbla)(char *name, blasint *info, blasint length) { | |||
| F77_xerbla(name, info); | |||
| }; | |||
| @@ -0,0 +1,826 @@ | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| int cblas_ok, cblas_lerr, cblas_info; | |||
| int link_xerbla=TRUE; | |||
| char *cblas_rout; | |||
| #ifdef F77_Char | |||
| void F77_xerbla(F77_Char F77_srname, void *vinfo); | |||
| #else | |||
| void F77_xerbla(char *srname, void *vinfo); | |||
| #endif | |||
| void chkxer(void) { | |||
| extern int cblas_ok, cblas_lerr, cblas_info; | |||
| extern int link_xerbla; | |||
| extern char *cblas_rout; | |||
| if (cblas_lerr == 1 ) { | |||
| printf("***** ILLEGAL VALUE OF PARAMETER NUMBER %d NOT DETECTED BY %s *****\n", cblas_info, cblas_rout); | |||
| cblas_ok = 0 ; | |||
| } | |||
| cblas_lerr = 1 ; | |||
| } | |||
| void F77_z2chke(char *rout) { | |||
| char *sf = ( rout ) ; | |||
| double A[2] = {0.0,0.0}, | |||
| X[2] = {0.0,0.0}, | |||
| Y[2] = {0.0,0.0}, | |||
| ALPHA[2] = {0.0,0.0}, | |||
| BETA[2] = {0.0,0.0}, | |||
| RALPHA = 0.0; | |||
| extern int cblas_info, cblas_lerr, cblas_ok; | |||
| extern int RowMajorStrg; | |||
| extern char *cblas_rout; | |||
| if (link_xerbla) /* call these first to link */ | |||
| { | |||
| cblas_xerbla(cblas_info,cblas_rout,""); | |||
| F77_xerbla(cblas_rout,&cblas_info); | |||
| } | |||
| cblas_ok = TRUE ; | |||
| cblas_lerr = PASSED ; | |||
| if (strncmp( sf,"cblas_zgemv",11)==0) { | |||
| cblas_rout = "cblas_zgemv"; | |||
| cblas_info = 1; | |||
| cblas_zgemv(INVALID, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, CblasNoTrans, 2, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_zgemv(CblasColMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, CblasNoTrans, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, CblasNoTrans, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, CblasNoTrans, 0, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_zgemv(CblasRowMajor, CblasNoTrans, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zgbmv",11)==0) { | |||
| cblas_rout = "cblas_zgbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(INVALID, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = FALSE; | |||
| cblas_zgbmv(CblasColMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, INVALID, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, INVALID, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 0, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 0, 0, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 2, 0, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 1, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 14; RowMajorStrg = TRUE; | |||
| cblas_zgbmv(CblasRowMajor, CblasNoTrans, 0, 0, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zhemv",11)==0) { | |||
| cblas_rout = "cblas_zhemv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zhemv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhemv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhemv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zhemv(CblasColMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zhemv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = FALSE; | |||
| cblas_zhemv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zhemv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zhemv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zhemv(CblasRowMajor, CblasUpper, 2, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zhemv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 11; RowMajorStrg = TRUE; | |||
| cblas_zhemv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zhbmv",11)==0) { | |||
| cblas_rout = "cblas_zhbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(INVALID, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = FALSE; | |||
| cblas_zhbmv(CblasColMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, INVALID, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, CblasUpper, INVALID, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, CblasUpper, 0, INVALID, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, CblasUpper, 0, 1, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 12; RowMajorStrg = TRUE; | |||
| cblas_zhbmv(CblasRowMajor, CblasUpper, 0, 0, | |||
| ALPHA, A, 1, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zhpmv",11)==0) { | |||
| cblas_rout = "cblas_zhpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zhpmv(INVALID, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhpmv(CblasColMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhpmv(CblasColMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_zhpmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_zhpmv(CblasColMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zhpmv(CblasRowMajor, INVALID, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zhpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| ALPHA, A, X, 1, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_zhpmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 0, BETA, Y, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_zhpmv(CblasRowMajor, CblasUpper, 0, | |||
| ALPHA, A, X, 1, BETA, Y, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztrmv",11)==0) { | |||
| cblas_rout = "cblas_ztrmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztbmv",11)==0) { | |||
| cblas_rout = "cblas_ztbmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_ztbmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_ztbmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztpmv",11)==0) { | |||
| cblas_rout = "cblas_ztpmv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztpmv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztpmv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ztpmv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztrsv",11)==0) { | |||
| cblas_rout = "cblas_ztrsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = FALSE; | |||
| cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 7; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 2, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 9; RowMajorStrg = TRUE; | |||
| cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztbsv",11)==0) { | |||
| cblas_rout = "cblas_ztbsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_ztbsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, 0, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, INVALID, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 1, A, 1, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_ztbsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, 0, A, 1, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_ztpsv",11)==0) { | |||
| cblas_rout = "cblas_ztpsv"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(INVALID, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(CblasColMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(CblasColMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_ztpsv(CblasColMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_ztpsv(CblasRowMajor, INVALID, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_ztpsv(CblasRowMajor, CblasUpper, INVALID, | |||
| CblasNonUnit, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 4; RowMajorStrg = TRUE; | |||
| cblas_ztpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| INVALID, 0, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 5; RowMajorStrg = TRUE; | |||
| cblas_ztpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, INVALID, A, X, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_ztpsv(CblasRowMajor, CblasUpper, CblasNoTrans, | |||
| CblasNonUnit, 0, A, X, 0 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zgeru",10)==0) { | |||
| cblas_rout = "cblas_zgeru"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zgeru(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zgeru(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zgeru(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zgeru(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zgeru(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_zgeru(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zgeru(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zgeru(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zgeru(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zgeru(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_zgeru(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zgerc",10)==0) { | |||
| cblas_rout = "cblas_zgerc"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zgerc(INVALID, 0, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zgerc(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zgerc(CblasColMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zgerc(CblasColMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zgerc(CblasColMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_zgerc(CblasColMajor, 2, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zgerc(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zgerc(CblasRowMajor, 0, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zgerc(CblasRowMajor, 0, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zgerc(CblasRowMajor, 0, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_zgerc(CblasRowMajor, 0, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zher2",11)==0) { | |||
| cblas_rout = "cblas_zher2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zher2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zher2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zher2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zher2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zher2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = FALSE; | |||
| cblas_zher2(CblasColMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zher2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zher2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zher2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zher2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 10; RowMajorStrg = TRUE; | |||
| cblas_zher2(CblasRowMajor, CblasUpper, 2, ALPHA, X, 1, Y, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zhpr2",11)==0) { | |||
| cblas_rout = "cblas_zhpr2"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zhpr2(INVALID, CblasUpper, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhpr2(CblasColMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhpr2(CblasColMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zhpr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zhpr2(CblasColMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zhpr2(CblasRowMajor, INVALID, 0, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zhpr2(CblasRowMajor, CblasUpper, INVALID, ALPHA, X, 1, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zhpr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 0, Y, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zhpr2(CblasRowMajor, CblasUpper, 0, ALPHA, X, 1, Y, 0, A ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zher",10)==0) { | |||
| cblas_rout = "cblas_zher"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zher(INVALID, CblasUpper, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zher(CblasColMajor, INVALID, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zher(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zher(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = FALSE; | |||
| cblas_zher(CblasColMajor, CblasUpper, 2, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = TRUE; | |||
| cblas_zher(CblasRowMajor, INVALID, 0, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = TRUE; | |||
| cblas_zher(CblasRowMajor, CblasUpper, INVALID, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = TRUE; | |||
| cblas_zher(CblasRowMajor, CblasUpper, 0, RALPHA, X, 0, A, 1 ); | |||
| chkxer(); | |||
| cblas_info = 8; RowMajorStrg = TRUE; | |||
| cblas_zher(CblasRowMajor, CblasUpper, 2, RALPHA, X, 1, A, 1 ); | |||
| chkxer(); | |||
| } else if (strncmp( sf,"cblas_zhpr",10)==0) { | |||
| cblas_rout = "cblas_zhpr"; | |||
| cblas_info = 1; RowMajorStrg = FALSE; | |||
| cblas_zhpr(INVALID, CblasUpper, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, INVALID, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A ); | |||
| chkxer(); | |||
| cblas_info = 2; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, INVALID, 0, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 3; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, CblasUpper, INVALID, RALPHA, X, 1, A ); | |||
| chkxer(); | |||
| cblas_info = 6; RowMajorStrg = FALSE; | |||
| cblas_zhpr(CblasColMajor, CblasUpper, 0, RALPHA, X, 0, A ); | |||
| chkxer(); | |||
| } | |||
| if (cblas_ok == TRUE) | |||
| printf(" %-12s PASSED THE TESTS OF ERROR-EXITS\n", cblas_rout); | |||
| else | |||
| printf("******* %s FAILED THE TESTS OF ERROR-EXITS *******\n",cblas_rout); | |||
| } | |||
| @@ -0,0 +1,75 @@ | |||
| /* | |||
| * c_zblas1.c | |||
| * | |||
| * The program is a C wrapper for zcblat1. | |||
| * | |||
| * Written by Keita Teranishi. 2/11/1998 | |||
| * | |||
| */ | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_zaxpy(const int *N, const void *alpha, void *X, | |||
| const int *incX, void *Y, const int *incY) | |||
| { | |||
| cblas_zaxpy(*N, alpha, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| void F77_zcopy(const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY) | |||
| { | |||
| cblas_zcopy(*N, X, *incX, Y, *incY); | |||
| return; | |||
| } | |||
| void F77_zdotc(const int *N, const void *X, const int *incX, | |||
| const void *Y, const int *incY,void *dotc) | |||
| { | |||
| cblas_zdotc_sub(*N, X, *incX, Y, *incY, dotc); | |||
| return; | |||
| } | |||
| void F77_zdotu(const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY,void *dotu) | |||
| { | |||
| cblas_zdotu_sub(*N, X, *incX, Y, *incY, dotu); | |||
| return; | |||
| } | |||
| void F77_zdscal(const int *N, const double *alpha, void *X, | |||
| const int *incX) | |||
| { | |||
| cblas_zdscal(*N, *alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_zscal(const int *N, const void * *alpha, void *X, | |||
| const int *incX) | |||
| { | |||
| cblas_zscal(*N, alpha, X, *incX); | |||
| return; | |||
| } | |||
| void F77_zswap( const int *N, void *X, const int *incX, | |||
| void *Y, const int *incY) | |||
| { | |||
| cblas_zswap(*N,X,*incX,Y,*incY); | |||
| return; | |||
| } | |||
| int F77_izamax(const int *N, const void *X, const int *incX) | |||
| { | |||
| if (*N < 1 || *incX < 1) return(0); | |||
| return(cblas_izamax(*N, X, *incX)+1); | |||
| } | |||
| double F77_dznrm2(const int *N, const void *X, const int *incX) | |||
| { | |||
| return cblas_dznrm2(*N, X, *incX); | |||
| } | |||
| double F77_dzasum(const int *N, void *X, const int *incX) | |||
| { | |||
| return cblas_dzasum(*N, X, *incX); | |||
| } | |||
| @@ -0,0 +1,807 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 4/08/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| void F77_zgemv(int *order, char *transp, int *m, int *n, | |||
| const void *alpha, | |||
| CBLAS_TEST_ZOMPLEX *a, int *lda, const void *x, int *incx, | |||
| const void *beta, void *y, int *incy) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = (CBLAS_TEST_ZOMPLEX *)malloc( (*m)*LDA*sizeof( CBLAS_TEST_ZOMPLEX) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zgemv( CblasRowMajor, trans, *m, *n, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zgemv( CblasColMajor, trans, | |||
| *m, *n, alpha, a, *lda, x, *incx, beta, y, *incy ); | |||
| else | |||
| cblas_zgemv( UNDEFINED, trans, | |||
| *m, *n, alpha, a, *lda, x, *incx, beta, y, *incy ); | |||
| } | |||
| void F77_zgbmv(int *order, char *transp, int *m, int *n, int *kl, int *ku, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, | |||
| CBLAS_TEST_ZOMPLEX *beta, CBLAS_TEST_ZOMPLEX *y, int *incy) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,irow,jcol,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_transpose_type(transp, &trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *ku+*kl+2; | |||
| A=( CBLAS_TEST_ZOMPLEX* )malloc((*n+*kl)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*ku; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=(*ku)-i; | |||
| for( j=jcol; j<*n; j++ ){ | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*ku; | |||
| irow=*ku+*kl-i; | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=*ku+1; i<*ku+*kl+1; i++ ){ | |||
| irow=*ku+*kl-i; | |||
| jcol=i-(*ku); | |||
| for( j=jcol; j<(*n+*kl); j++ ){ | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| cblas_zgbmv( CblasRowMajor, trans, *m, *n, *kl, *ku, alpha, A, LDA, x, | |||
| *incx, beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zgbmv( CblasColMajor, trans, *m, *n, *kl, *ku, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| else | |||
| cblas_zgbmv( UNDEFINED, trans, *m, *n, *kl, *ku, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| } | |||
| void F77_zgeru(int *order, int *m, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *y, int *incy, | |||
| CBLAS_TEST_ZOMPLEX *a, int *lda){ | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zgeru( CblasRowMajor, *m, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zgeru( CblasColMajor, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| else | |||
| cblas_zgeru( UNDEFINED, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_zgerc(int *order, int *m, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *y, int *incy, | |||
| CBLAS_TEST_ZOMPLEX *a, int *lda) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zgerc( CblasRowMajor, *m, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zgerc( CblasColMajor, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| else | |||
| cblas_zgerc( UNDEFINED, *m, *n, alpha, x, *incx, y, *incy, a, *lda ); | |||
| } | |||
| void F77_zhemv(int *order, char *uplow, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *a, int *lda, CBLAS_TEST_ZOMPLEX *x, | |||
| int *incx, CBLAS_TEST_ZOMPLEX *beta, CBLAS_TEST_ZOMPLEX *y, int *incy){ | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A = (CBLAS_TEST_ZOMPLEX *)malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zhemv( CblasRowMajor, uplo, *n, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhemv( CblasColMajor, uplo, *n, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| else | |||
| cblas_zhemv( UNDEFINED, uplo, *n, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| } | |||
| void F77_zhbmv(int *order, char *uplow, int *n, int *k, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *beta, | |||
| CBLAS_TEST_ZOMPLEX *y, int *incy){ | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,irow,j,jcol,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_zhbmv(CblasRowMajor, UNDEFINED, *n, *k, alpha, a, *lda, x, | |||
| *incx, beta, y, *incy ); | |||
| else { | |||
| LDA = *k+2; | |||
| A =(CBLAS_TEST_ZOMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_zhbmv( CblasRowMajor, uplo, *n, *k, alpha, A, LDA, x, *incx, | |||
| beta, y, *incy ); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhbmv(CblasColMajor, uplo, *n, *k, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| else | |||
| cblas_zhbmv(UNDEFINED, uplo, *n, *k, alpha, a, *lda, x, *incx, | |||
| beta, y, *incy ); | |||
| } | |||
| void F77_zhpmv(int *order, char *uplow, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *ap, CBLAS_TEST_ZOMPLEX *x, int *incx, | |||
| CBLAS_TEST_ZOMPLEX *beta, CBLAS_TEST_ZOMPLEX *y, int *incy){ | |||
| CBLAS_TEST_ZOMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_zhpmv(CblasRowMajor, UNDEFINED, *n, alpha, ap, x, *incx, | |||
| beta, y, *incy); | |||
| else { | |||
| LDA = *n; | |||
| A = (CBLAS_TEST_ZOMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX )); | |||
| AP = (CBLAS_TEST_ZOMPLEX* )malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_ZOMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_zhpmv( CblasRowMajor, uplo, *n, alpha, AP, x, *incx, beta, y, | |||
| *incy ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhpmv( CblasColMajor, uplo, *n, alpha, ap, x, *incx, beta, y, | |||
| *incy ); | |||
| else | |||
| cblas_zhpmv( UNDEFINED, uplo, *n, alpha, ap, x, *incx, beta, y, | |||
| *incy ); | |||
| } | |||
| void F77_ztbmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, CBLAS_TEST_ZOMPLEX *a, int *lda, CBLAS_TEST_ZOMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ztbmv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, | |||
| x, *incx); | |||
| else { | |||
| LDA = *k+2; | |||
| A=(CBLAS_TEST_ZOMPLEX *)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_ztbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, | |||
| *incx); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| else | |||
| cblas_ztbmv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_ztbsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, int *k, CBLAS_TEST_ZOMPLEX *a, int *lda, CBLAS_TEST_ZOMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int irow, jcol, i, j, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ztbsv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, x, | |||
| *incx); | |||
| else { | |||
| LDA = *k+2; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0; i<*k; i++ ){ | |||
| irow=*k-i; | |||
| jcol=(*k)-i; | |||
| for( j=jcol; j<*n; j++ ) { | |||
| A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| i=*k; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| } | |||
| else { | |||
| i=0; | |||
| irow=*k-i; | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| for( i=1; i<*k+1; i++ ){ | |||
| irow=*k-i; | |||
| jcol=i; | |||
| for( j=jcol; j<(*n+*k); j++ ) { | |||
| A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; | |||
| A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; | |||
| } | |||
| } | |||
| } | |||
| cblas_ztbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, | |||
| x, *incx); | |||
| free(A); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| else | |||
| cblas_ztbsv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx); | |||
| } | |||
| void F77_ztpmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_ZOMPLEX *ap, CBLAS_TEST_ZOMPLEX *x, int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ztpmv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)* | |||
| sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_ztpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| else | |||
| cblas_ztpmv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_ztpsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_ZOMPLEX *ap, CBLAS_TEST_ZOMPLEX *x, int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A, *AP; | |||
| int i, j, k, LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_ztpsv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)* | |||
| sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_ztpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx ); | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx ); | |||
| else | |||
| cblas_ztpsv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx ); | |||
| } | |||
| void F77_ztrmv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_ZOMPLEX *a, int *lda, CBLAS_TEST_ZOMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA=*n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_ztrmv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztrmv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| else | |||
| cblas_ztrmv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx); | |||
| } | |||
| void F77_ztrsv(int *order, char *uplow, char *transp, char *diagn, | |||
| int *n, CBLAS_TEST_ZOMPLEX *a, int *lda, CBLAS_TEST_ZOMPLEX *x, | |||
| int *incx) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_DIAG diag; | |||
| get_transpose_type(transp,&trans); | |||
| get_uplo_type(uplow,&uplo); | |||
| get_diag_type(diagn,&diag); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A =(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_ztrsv(CblasRowMajor, uplo, trans, diag, *n, A, LDA, x, *incx ); | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztrsv(CblasColMajor, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| else | |||
| cblas_ztrsv(UNDEFINED, uplo, trans, diag, *n, a, *lda, x, *incx ); | |||
| } | |||
| void F77_zhpr(int *order, char *uplow, int *n, double *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *ap) { | |||
| CBLAS_TEST_ZOMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_zhpr(CblasRowMajor, UNDEFINED, *n, *alpha, x, *incx, ap ); | |||
| else { | |||
| LDA = *n; | |||
| A = (CBLAS_TEST_ZOMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| AP = ( CBLAS_TEST_ZOMPLEX* )malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_ZOMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ){ | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ){ | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ){ | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ){ | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_zhpr(CblasRowMajor, uplo, *n, *alpha, x, *incx, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ){ | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ){ | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ){ | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ){ | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhpr(CblasColMajor, uplo, *n, *alpha, x, *incx, ap ); | |||
| else | |||
| cblas_zhpr(UNDEFINED, uplo, *n, *alpha, x, *incx, ap ); | |||
| } | |||
| void F77_zhpr2(int *order, char *uplow, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *y, int *incy, | |||
| CBLAS_TEST_ZOMPLEX *ap) { | |||
| CBLAS_TEST_ZOMPLEX *A, *AP; | |||
| int i,j,k,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (uplo != CblasUpper && uplo != CblasLower ) | |||
| cblas_zhpr2( CblasRowMajor, UNDEFINED, *n, alpha, x, *incx, y, | |||
| *incy, ap ); | |||
| else { | |||
| LDA = *n; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc( LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| AP=(CBLAS_TEST_ZOMPLEX*)malloc( (((LDA+1)*LDA)/2)* | |||
| sizeof( CBLAS_TEST_ZOMPLEX )); | |||
| if (uplo == CblasUpper) { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| A[ LDA*i+j ].real=ap[ k ].real; | |||
| A[ LDA*i+j ].imag=ap[ k ].imag; | |||
| } | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| AP[ k ].real=A[ LDA*i+j ].real; | |||
| AP[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| cblas_zhpr2( CblasRowMajor, uplo, *n, alpha, x, *incx, y, *incy, AP ); | |||
| if (uplo == CblasUpper) { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=i; j<*n; j++, k++ ) { | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=0; i<j+1; i++, k++ ) { | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| else { | |||
| for( i=0, k=0; i<*n; i++ ) | |||
| for( j=0; j<i+1; j++, k++ ) { | |||
| A[ LDA*i+j ].real=AP[ k ].real; | |||
| A[ LDA*i+j ].imag=AP[ k ].imag; | |||
| } | |||
| for( j=0, k=0; j<*n; j++ ) | |||
| for( i=j; i<*n; i++, k++ ) { | |||
| ap[ k ].real=A[ LDA*i+j ].real; | |||
| ap[ k ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| } | |||
| free(A); | |||
| free(AP); | |||
| } | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhpr2( CblasColMajor, uplo, *n, alpha, x, *incx, y, *incy, ap ); | |||
| else | |||
| cblas_zhpr2( UNDEFINED, uplo, *n, alpha, x, *incx, y, *incy, ap ); | |||
| } | |||
| void F77_zher(int *order, char *uplow, int *n, double *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *a, int *lda) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc((*n)*LDA*sizeof( CBLAS_TEST_ZOMPLEX )); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zher(CblasRowMajor, uplo, *n, *alpha, x, *incx, A, LDA ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zher( CblasColMajor, uplo, *n, *alpha, x, *incx, a, *lda ); | |||
| else | |||
| cblas_zher( UNDEFINED, uplo, *n, *alpha, x, *incx, a, *lda ); | |||
| } | |||
| void F77_zher2(int *order, char *uplow, int *n, CBLAS_TEST_ZOMPLEX *alpha, | |||
| CBLAS_TEST_ZOMPLEX *x, int *incx, CBLAS_TEST_ZOMPLEX *y, int *incy, | |||
| CBLAS_TEST_ZOMPLEX *a, int *lda) { | |||
| CBLAS_TEST_ZOMPLEX *A; | |||
| int i,j,LDA; | |||
| enum CBLAS_UPLO uplo; | |||
| get_uplo_type(uplow,&uplo); | |||
| if (*order == TEST_ROW_MJR) { | |||
| LDA = *n+1; | |||
| A= ( CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[ LDA*i+j ].real=a[ (*lda)*j+i ].real; | |||
| A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; | |||
| } | |||
| cblas_zher2(CblasRowMajor, uplo, *n, alpha, x, *incx, y, *incy, A, LDA ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| a[ (*lda)*j+i ].real=A[ LDA*i+j ].real; | |||
| a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; | |||
| } | |||
| free(A); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zher2( CblasColMajor, uplo, *n, alpha, x, *incx, y, *incy, a, *lda); | |||
| else | |||
| cblas_zher2( UNDEFINED, uplo, *n, alpha, x, *incx, y, *incy, a, *lda); | |||
| } | |||
| @@ -0,0 +1,564 @@ | |||
| /* | |||
| * Written by D.P. Manley, Digital Equipment Corporation. | |||
| * Prefixed "C_" to BLAS routines and their declarations. | |||
| * | |||
| * Modified by T. H. Do, 4/15/98, SGI/CRAY Research. | |||
| */ | |||
| #include <stdlib.h> | |||
| #include "common.h" | |||
| #include "cblas_test.h" | |||
| #define TEST_COL_MJR 0 | |||
| #define TEST_ROW_MJR 1 | |||
| #define UNDEFINED -1 | |||
| void F77_zgemm(int *order, char *transpa, char *transpb, int *m, int *n, | |||
| int *k, CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *b, int *ldb, CBLAS_TEST_ZOMPLEX *beta, | |||
| CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_ZOMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_TRANSPOSE transa, transb; | |||
| get_transpose_type(transpa, &transa); | |||
| get_transpose_type(transpb, &transb); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (transa == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_ZOMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| if (transb == CblasNoTrans) { | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDB*sizeof(CBLAS_TEST_ZOMPLEX) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDB = *k+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc(LDB*(*n)*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zgemm( CblasRowMajor, transa, transb, *m, *n, *k, alpha, A, LDA, | |||
| B, LDB, beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zgemm( CblasColMajor, transa, transb, *m, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| else | |||
| cblas_zgemm( UNDEFINED, transa, transb, *m, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| } | |||
| void F77_zhemm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *b, int *ldb, CBLAS_TEST_ZOMPLEX *beta, | |||
| CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_ZOMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A= (CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zhemm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB, | |||
| beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zhemm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| else | |||
| cblas_zhemm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| } | |||
| void F77_zsymm(int *order, char *rtlf, char *uplow, int *m, int *n, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *b, int *ldb, CBLAS_TEST_ZOMPLEX *beta, | |||
| CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| CBLAS_TEST_ZOMPLEX *A, *B, *C; | |||
| int i,j,LDA, LDB, LDC; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_SIDE side; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| A[i*LDA+j]=a[j*(*lda)+i]; | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX )); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) | |||
| B[i*LDB+j]=b[j*(*ldb)+i]; | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| C[i*LDC+j]=c[j*(*ldc)+i]; | |||
| cblas_zsymm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB, | |||
| beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) | |||
| c[j*(*ldc)+i]=C[i*LDC+j]; | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zsymm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| else | |||
| cblas_zsymm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb, | |||
| beta, c, *ldc ); | |||
| } | |||
| void F77_zherk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| double *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| double *beta, CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| CBLAS_TEST_ZOMPLEX *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zherk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zherk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_zherk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_zsyrk(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *beta, CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDC; | |||
| CBLAS_TEST_ZOMPLEX *A, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zsyrk(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, beta, | |||
| C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zsyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta, | |||
| c, *ldc ); | |||
| else | |||
| cblas_zsyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta, | |||
| c, *ldc ); | |||
| } | |||
| void F77_zher2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *b, int *ldb, double *beta, | |||
| CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| CBLAS_TEST_ZOMPLEX *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX )); | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_ZOMPLEX )); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc( LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc( LDB*(*k)*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zher2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, | |||
| B, LDB, *beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zher2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| else | |||
| cblas_zher2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, *beta, c, *ldc ); | |||
| } | |||
| void F77_zsyr2k(int *order, char *uplow, char *transp, int *n, int *k, | |||
| CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, int *lda, | |||
| CBLAS_TEST_ZOMPLEX *b, int *ldb, CBLAS_TEST_ZOMPLEX *beta, | |||
| CBLAS_TEST_ZOMPLEX *c, int *ldc ) { | |||
| int i,j,LDA,LDB,LDC; | |||
| CBLAS_TEST_ZOMPLEX *A, *B, *C; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (trans == CblasNoTrans) { | |||
| LDA = *k+1; | |||
| LDB = *k+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*k; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| else { | |||
| LDA = *n+1; | |||
| LDB = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc(LDB*(*k)*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*k; i++ ) | |||
| for( j=0; j<*n; j++ ){ | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| } | |||
| LDC = *n+1; | |||
| C=(CBLAS_TEST_ZOMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| C[i*LDC+j].real=c[j*(*ldc)+i].real; | |||
| C[i*LDC+j].imag=c[j*(*ldc)+i].imag; | |||
| } | |||
| cblas_zsyr2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, | |||
| B, LDB, beta, C, LDC ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*n; i++ ) { | |||
| c[j*(*ldc)+i].real=C[i*LDC+j].real; | |||
| c[j*(*ldc)+i].imag=C[i*LDC+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| free(C); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_zsyr2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| else | |||
| cblas_zsyr2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, | |||
| b, *ldb, beta, c, *ldc ); | |||
| } | |||
| void F77_ztrmm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, | |||
| int *lda, CBLAS_TEST_ZOMPLEX *b, int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| CBLAS_TEST_ZOMPLEX *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| cblas_ztrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| b[j*(*ldb)+i].real=B[i*LDB+j].real; | |||
| b[j*(*ldb)+i].imag=B[i*LDB+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_ztrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| void F77_ztrsm(int *order, char *rtlf, char *uplow, char *transp, char *diagn, | |||
| int *m, int *n, CBLAS_TEST_ZOMPLEX *alpha, CBLAS_TEST_ZOMPLEX *a, | |||
| int *lda, CBLAS_TEST_ZOMPLEX *b, int *ldb) { | |||
| int i,j,LDA,LDB; | |||
| CBLAS_TEST_ZOMPLEX *A, *B; | |||
| enum CBLAS_SIDE side; | |||
| enum CBLAS_DIAG diag; | |||
| enum CBLAS_UPLO uplo; | |||
| enum CBLAS_TRANSPOSE trans; | |||
| get_uplo_type(uplow,&uplo); | |||
| get_transpose_type(transp,&trans); | |||
| get_diag_type(diagn,&diag); | |||
| get_side_type(rtlf,&side); | |||
| if (*order == TEST_ROW_MJR) { | |||
| if (side == CblasLeft) { | |||
| LDA = *m+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*m; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| else{ | |||
| LDA = *n+1; | |||
| A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*n; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| A[i*LDA+j].real=a[j*(*lda)+i].real; | |||
| A[i*LDA+j].imag=a[j*(*lda)+i].imag; | |||
| } | |||
| } | |||
| LDB = *n+1; | |||
| B=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX)); | |||
| for( i=0; i<*m; i++ ) | |||
| for( j=0; j<*n; j++ ) { | |||
| B[i*LDB+j].real=b[j*(*ldb)+i].real; | |||
| B[i*LDB+j].imag=b[j*(*ldb)+i].imag; | |||
| } | |||
| cblas_ztrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| A, LDA, B, LDB ); | |||
| for( j=0; j<*n; j++ ) | |||
| for( i=0; i<*m; i++ ) { | |||
| b[j*(*ldb)+i].real=B[i*LDB+j].real; | |||
| b[j*(*ldb)+i].imag=B[i*LDB+j].imag; | |||
| } | |||
| free(A); | |||
| free(B); | |||
| } | |||
| else if (*order == TEST_COL_MJR) | |||
| cblas_ztrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| else | |||
| cblas_ztrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha, | |||
| a, *lda, b, *ldb); | |||
| } | |||
| @@ -0,0 +1,682 @@ | |||
| PROGRAM ZCBLAT1 | |||
| * Test program for the COMPLEX*16 Level 1 CBLAS. | |||
| * Based upon the original CBLAS test routine together with: | |||
| * F06GAF Example Program Text | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SFAC | |||
| INTEGER IC | |||
| * .. External Subroutines .. | |||
| EXTERNAL CHECK1, CHECK2, HEADER | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SFAC/9.765625D-4/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) | |||
| DO 20 IC = 1, 10 | |||
| ICASE = IC | |||
| CALL HEADER | |||
| * | |||
| * Initialize PASS, INCX, INCY, and MODE for a new case. | |||
| * The value 9999 for INCX, INCY or MODE will appear in the | |||
| * detailed output, if any, for cases that do not involve | |||
| * these parameters. | |||
| * | |||
| PASS = .TRUE. | |||
| INCX = 9999 | |||
| INCY = 9999 | |||
| MODE = 9999 | |||
| IF (ICASE.LE.5) THEN | |||
| CALL CHECK2(SFAC) | |||
| ELSE IF (ICASE.GE.6) THEN | |||
| CALL CHECK1(SFAC) | |||
| END IF | |||
| IF (PASS) WRITE (NOUT,99998) | |||
| 20 CONTINUE | |||
| STOP | |||
| * | |||
| 99999 FORMAT (' Complex CBLAS Test Program Results',/1X) | |||
| 99998 FORMAT (' ----- PASS -----') | |||
| END | |||
| SUBROUTINE HEADER | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Arrays .. | |||
| CHARACTER*15 L(10) | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA L(1)/'CBLAS_ZDOTC'/ | |||
| DATA L(2)/'CBLAS_ZDOTU'/ | |||
| DATA L(3)/'CBLAS_ZAXPY'/ | |||
| DATA L(4)/'CBLAS_ZCOPY'/ | |||
| DATA L(5)/'CBLAS_ZSWAP'/ | |||
| DATA L(6)/'CBLAS_DZNRM2'/ | |||
| DATA L(7)/'CBLAS_DZASUM'/ | |||
| DATA L(8)/'CBLAS_ZSCAL'/ | |||
| DATA L(9)/'CBLAS_ZDSCAL'/ | |||
| DATA L(10)/'CBLAS_IZAMAX'/ | |||
| * .. Executable Statements .. | |||
| WRITE (NOUT,99999) ICASE, L(ICASE) | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (/' Test of subprogram number',I3,9X,A15) | |||
| END | |||
| SUBROUTINE CHECK1(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| COMPLEX*16 CA | |||
| DOUBLE PRECISION SA | |||
| INTEGER I, J, LEN, NP1 | |||
| * .. Local Arrays .. | |||
| COMPLEX*16 CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8), | |||
| + MWPCS(5), MWPCT(5) | |||
| DOUBLE PRECISION STRUE2(5), STRUE4(5) | |||
| INTEGER ITRUE3(5) | |||
| * .. External Functions .. | |||
| DOUBLE PRECISION DZASUMTEST, DZNRM2TEST | |||
| INTEGER IZAMAXTEST | |||
| EXTERNAL DZASUMTEST, DZNRM2TEST, IZAMAXTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL ZSCALTEST, ZDSCALTEST, CTEST, ITEST1, STEST1 | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC MAX | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA SA, CA/0.3D0, (0.4D0,-0.7D0)/ | |||
| DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (0.3D0,-0.4D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (0.1D0,-0.3D0), (0.5D0,-0.1D0), (5.0D0,6.0D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (0.1D0,0.1D0), | |||
| + (-0.6D0,0.1D0), (0.1D0,-0.3D0), (7.0D0,8.0D0), | |||
| + (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0), | |||
| + (7.0D0,8.0D0), (0.3D0,0.1D0), (0.1D0,0.4D0), | |||
| + (0.4D0,0.1D0), (0.1D0,0.2D0), (2.0D0,3.0D0), | |||
| + (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/ | |||
| DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (0.3D0,-0.4D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (0.1D0,-0.3D0), (8.0D0,9.0D0), (0.5D0,-0.1D0), | |||
| + (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0), | |||
| + (2.0D0,5.0D0), (2.0D0,5.0D0), (0.1D0,0.1D0), | |||
| + (3.0D0,6.0D0), (-0.6D0,0.1D0), (4.0D0,7.0D0), | |||
| + (0.1D0,-0.3D0), (7.0D0,2.0D0), (7.0D0,2.0D0), | |||
| + (7.0D0,2.0D0), (0.3D0,0.1D0), (5.0D0,8.0D0), | |||
| + (0.1D0,0.4D0), (6.0D0,9.0D0), (0.4D0,0.1D0), | |||
| + (8.0D0,3.0D0), (0.1D0,0.2D0), (9.0D0,4.0D0)/ | |||
| DATA STRUE2/0.0D0, 0.5D0, 0.6D0, 0.7D0, 0.7D0/ | |||
| DATA STRUE4/0.0D0, 0.7D0, 1.0D0, 1.3D0, 1.7D0/ | |||
| DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (-0.16D0,-0.37D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (-0.17D0,-0.19D0), (0.13D0,-0.39D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0), | |||
| + (0.11D0,-0.03D0), (-0.17D0,0.46D0), | |||
| + (-0.17D0,-0.19D0), (7.0D0,8.0D0), (7.0D0,8.0D0), | |||
| + (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0), | |||
| + (0.19D0,-0.17D0), (0.32D0,0.09D0), | |||
| + (0.23D0,-0.24D0), (0.18D0,0.01D0), | |||
| + (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0), | |||
| + (2.0D0,3.0D0)/ | |||
| DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (-0.16D0,-0.37D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (-0.17D0,-0.19D0), (8.0D0,9.0D0), | |||
| + (0.13D0,-0.39D0), (2.0D0,5.0D0), (2.0D0,5.0D0), | |||
| + (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0), | |||
| + (0.11D0,-0.03D0), (3.0D0,6.0D0), | |||
| + (-0.17D0,0.46D0), (4.0D0,7.0D0), | |||
| + (-0.17D0,-0.19D0), (7.0D0,2.0D0), (7.0D0,2.0D0), | |||
| + (7.0D0,2.0D0), (0.19D0,-0.17D0), (5.0D0,8.0D0), | |||
| + (0.32D0,0.09D0), (6.0D0,9.0D0), | |||
| + (0.23D0,-0.24D0), (8.0D0,3.0D0), | |||
| + (0.18D0,0.01D0), (9.0D0,4.0D0)/ | |||
| DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0), | |||
| + (1.0D0,2.0D0), (0.09D0,-0.12D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0), | |||
| + (0.03D0,-0.09D0), (0.15D0,-0.03D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0), | |||
| + (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0), | |||
| + (0.03D0,0.03D0), (-0.18D0,0.03D0), | |||
| + (0.03D0,-0.09D0), (7.0D0,8.0D0), (7.0D0,8.0D0), | |||
| + (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0), | |||
| + (0.09D0,0.03D0), (0.03D0,0.12D0), | |||
| + (0.12D0,0.03D0), (0.03D0,0.06D0), (2.0D0,3.0D0), | |||
| + (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/ | |||
| DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0), | |||
| + (4.0D0,5.0D0), (0.09D0,-0.12D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0), | |||
| + (0.03D0,-0.09D0), (8.0D0,9.0D0), | |||
| + (0.15D0,-0.03D0), (2.0D0,5.0D0), (2.0D0,5.0D0), | |||
| + (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0), | |||
| + (0.03D0,0.03D0), (3.0D0,6.0D0), | |||
| + (-0.18D0,0.03D0), (4.0D0,7.0D0), | |||
| + (0.03D0,-0.09D0), (7.0D0,2.0D0), (7.0D0,2.0D0), | |||
| + (7.0D0,2.0D0), (0.09D0,0.03D0), (5.0D0,8.0D0), | |||
| + (0.03D0,0.12D0), (6.0D0,9.0D0), (0.12D0,0.03D0), | |||
| + (8.0D0,3.0D0), (0.03D0,0.06D0), (9.0D0,4.0D0)/ | |||
| DATA ITRUE3/0, 1, 2, 2, 2/ | |||
| * .. Executable Statements .. | |||
| DO 60 INCX = 1, 2 | |||
| DO 40 NP1 = 1, 5 | |||
| N = NP1 - 1 | |||
| LEN = 2*MAX(N,1) | |||
| * .. Set vector arguments .. | |||
| DO 20 I = 1, LEN | |||
| CX(I) = CV(I,NP1,INCX) | |||
| 20 CONTINUE | |||
| IF (ICASE.EQ.6) THEN | |||
| * .. DZNRM2TEST .. | |||
| CALL STEST1(DZNRM2TEST(N,CX,INCX),STRUE2(NP1), | |||
| + STRUE2(NP1),SFAC) | |||
| ELSE IF (ICASE.EQ.7) THEN | |||
| * .. DZASUMTEST .. | |||
| CALL STEST1(DZASUMTEST(N,CX,INCX),STRUE4(NP1), | |||
| + STRUE4(NP1),SFAC) | |||
| ELSE IF (ICASE.EQ.8) THEN | |||
| * .. ZSCALTEST .. | |||
| CALL ZSCALTEST(N,CA,CX,INCX) | |||
| CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX), | |||
| + SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * .. ZDSCALTEST .. | |||
| CALL ZDSCALTEST(N,SA,CX,INCX) | |||
| CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX), | |||
| + SFAC) | |||
| ELSE IF (ICASE.EQ.10) THEN | |||
| * .. IZAMAXTEST .. | |||
| CALL ITEST1(IZAMAXTEST(N,CX,INCX),ITRUE3(NP1)) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' | |||
| STOP | |||
| END IF | |||
| * | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| * | |||
| INCX = 1 | |||
| IF (ICASE.EQ.8) THEN | |||
| * ZSCALTEST | |||
| * Add a test for alpha equal to zero. | |||
| CA = (0.0D0,0.0D0) | |||
| DO 80 I = 1, 5 | |||
| MWPCT(I) = (0.0D0,0.0D0) | |||
| MWPCS(I) = (1.0D0,1.0D0) | |||
| 80 CONTINUE | |||
| CALL ZSCALTEST(5,CA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| ELSE IF (ICASE.EQ.9) THEN | |||
| * ZDSCALTEST | |||
| * Add a test for alpha equal to zero. | |||
| SA = 0.0D0 | |||
| DO 100 I = 1, 5 | |||
| MWPCT(I) = (0.0D0,0.0D0) | |||
| MWPCS(I) = (1.0D0,1.0D0) | |||
| 100 CONTINUE | |||
| CALL ZDSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| * Add a test for alpha equal to one. | |||
| SA = 1.0D0 | |||
| DO 120 I = 1, 5 | |||
| MWPCT(I) = CX(I) | |||
| MWPCS(I) = CX(I) | |||
| 120 CONTINUE | |||
| CALL ZDSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| * Add a test for alpha equal to minus one. | |||
| SA = -1.0D0 | |||
| DO 140 I = 1, 5 | |||
| MWPCT(I) = -CX(I) | |||
| MWPCS(I) = -CX(I) | |||
| 140 CONTINUE | |||
| CALL ZDSCALTEST(5,SA,CX,INCX) | |||
| CALL CTEST(5,CX,MWPCT,MWPCS,SFAC) | |||
| END IF | |||
| RETURN | |||
| END | |||
| SUBROUTINE CHECK2(SFAC) | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| COMPLEX*16 CA,ZTEMP | |||
| INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY | |||
| * .. Local Arrays .. | |||
| COMPLEX*16 CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14), | |||
| + CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4), | |||
| + CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7) | |||
| INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4) | |||
| * .. External Functions .. | |||
| EXTERNAL ZDOTCTEST, ZDOTUTEST | |||
| * .. External Subroutines .. | |||
| EXTERNAL ZAXPYTEST, ZCOPYTEST, ZSWAPTEST, CTEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS, MIN | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Data statements .. | |||
| DATA CA/(0.4D0,-0.7D0)/ | |||
| DATA INCXS/1, 2, -2, -1/ | |||
| DATA INCYS/1, -2, 1, -2/ | |||
| DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/ | |||
| DATA NS/0, 1, 2, 4/ | |||
| DATA CX1/(0.7D0,-0.8D0), (-0.4D0,-0.7D0), | |||
| + (-0.1D0,-0.9D0), (0.2D0,-0.8D0), | |||
| + (-0.9D0,-0.4D0), (0.1D0,0.4D0), (-0.6D0,0.6D0)/ | |||
| DATA CY1/(0.6D0,-0.6D0), (-0.9D0,0.5D0), | |||
| + (0.7D0,-0.6D0), (0.1D0,-0.5D0), (-0.1D0,-0.2D0), | |||
| + (-0.5D0,-0.3D0), (0.8D0,-0.7D0)/ | |||
| DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.32D0,-1.41D0), | |||
| + (-1.55D0,0.5D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.32D0,-1.41D0), (-1.55D0,0.5D0), | |||
| + (0.03D0,-0.89D0), (-0.38D0,-0.96D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/ | |||
| DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (-0.07D0,-0.89D0), | |||
| + (-0.9D0,0.5D0), (0.42D0,-1.41D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.78D0,0.06D0), (-0.9D0,0.5D0), | |||
| + (0.06D0,-0.13D0), (0.1D0,-0.5D0), | |||
| + (-0.77D0,-0.49D0), (-0.5D0,-0.3D0), | |||
| + (0.52D0,-1.51D0)/ | |||
| DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (-0.07D0,-0.89D0), | |||
| + (-1.18D0,-0.31D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.78D0,0.06D0), (-1.54D0,0.97D0), | |||
| + (0.03D0,-0.89D0), (-0.18D0,-1.31D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/ | |||
| DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.32D0,-1.41D0), (-0.9D0,0.5D0), | |||
| + (0.05D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.32D0,-1.41D0), | |||
| + (-0.9D0,0.5D0), (0.05D0,-0.6D0), (0.1D0,-0.5D0), | |||
| + (-0.77D0,-0.49D0), (-0.5D0,-0.3D0), | |||
| + (0.32D0,-1.16D0)/ | |||
| DATA CT7/(0.0D0,0.0D0), (-0.06D0,-0.90D0), | |||
| + (0.65D0,-0.47D0), (-0.34D0,-1.22D0), | |||
| + (0.0D0,0.0D0), (-0.06D0,-0.90D0), | |||
| + (-0.59D0,-1.46D0), (-1.04D0,-0.04D0), | |||
| + (0.0D0,0.0D0), (-0.06D0,-0.90D0), | |||
| + (-0.83D0,0.59D0), (0.07D0,-0.37D0), | |||
| + (0.0D0,0.0D0), (-0.06D0,-0.90D0), | |||
| + (-0.76D0,-1.15D0), (-1.33D0,-1.82D0)/ | |||
| DATA CT6/(0.0D0,0.0D0), (0.90D0,0.06D0), | |||
| + (0.91D0,-0.77D0), (1.80D0,-0.10D0), | |||
| + (0.0D0,0.0D0), (0.90D0,0.06D0), (1.45D0,0.74D0), | |||
| + (0.20D0,0.90D0), (0.0D0,0.0D0), (0.90D0,0.06D0), | |||
| + (-0.55D0,0.23D0), (0.83D0,-0.39D0), | |||
| + (0.0D0,0.0D0), (0.90D0,0.06D0), (1.04D0,0.79D0), | |||
| + (1.95D0,1.22D0)/ | |||
| DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7D0,-0.8D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.6D0,-0.6D0), (-0.9D0,0.5D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0), | |||
| + (-0.9D0,0.5D0), (0.7D0,-0.6D0), (0.1D0,-0.5D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/ | |||
| DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7D0,-0.8D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.7D0,-0.6D0), (-0.4D0,-0.7D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.8D0,-0.7D0), | |||
| + (-0.4D0,-0.7D0), (-0.1D0,-0.2D0), | |||
| + (0.2D0,-0.8D0), (0.7D0,-0.6D0), (0.1D0,0.4D0), | |||
| + (0.6D0,-0.6D0)/ | |||
| DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7D0,-0.8D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (-0.9D0,0.5D0), (-0.4D0,-0.7D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.1D0,-0.5D0), | |||
| + (-0.4D0,-0.7D0), (0.7D0,-0.6D0), (0.2D0,-0.8D0), | |||
| + (-0.9D0,0.5D0), (0.1D0,0.4D0), (0.6D0,-0.6D0)/ | |||
| DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7D0,-0.8D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.6D0,-0.6D0), (0.7D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0), | |||
| + (0.7D0,-0.6D0), (-0.1D0,-0.2D0), (0.8D0,-0.7D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/ | |||
| DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.4D0,-0.7D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0), | |||
| + (-0.4D0,-0.7D0), (-0.1D0,-0.9D0), | |||
| + (0.2D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0)/ | |||
| DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (-0.1D0,-0.9D0), (-0.9D0,0.5D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0), | |||
| + (-0.9D0,0.5D0), (-0.9D0,-0.4D0), (0.1D0,-0.5D0), | |||
| + (-0.1D0,-0.9D0), (-0.5D0,-0.3D0), | |||
| + (0.7D0,-0.8D0)/ | |||
| DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (-0.1D0,-0.9D0), (0.7D0,-0.8D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0), | |||
| + (-0.9D0,-0.4D0), (-0.1D0,-0.9D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0)/ | |||
| DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.9D0,0.5D0), | |||
| + (-0.4D0,-0.7D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0), | |||
| + (-0.9D0,0.5D0), (-0.4D0,-0.7D0), (0.1D0,-0.5D0), | |||
| + (-0.1D0,-0.9D0), (-0.5D0,-0.3D0), | |||
| + (0.2D0,-0.8D0)/ | |||
| DATA CSIZE1/(0.0D0,0.0D0), (0.9D0,0.9D0), | |||
| + (1.63D0,1.73D0), (2.90D0,2.78D0)/ | |||
| DATA CSIZE3/(0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (1.17D0,1.17D0), | |||
| + (1.17D0,1.17D0), (1.17D0,1.17D0), | |||
| + (1.17D0,1.17D0), (1.17D0,1.17D0), | |||
| + (1.17D0,1.17D0), (1.17D0,1.17D0)/ | |||
| DATA CSIZE2/(0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0), | |||
| + (0.0D0,0.0D0), (0.0D0,0.0D0), (1.54D0,1.54D0), | |||
| + (1.54D0,1.54D0), (1.54D0,1.54D0), | |||
| + (1.54D0,1.54D0), (1.54D0,1.54D0), | |||
| + (1.54D0,1.54D0), (1.54D0,1.54D0)/ | |||
| * .. Executable Statements .. | |||
| DO 60 KI = 1, 4 | |||
| INCX = INCXS(KI) | |||
| INCY = INCYS(KI) | |||
| MX = ABS(INCX) | |||
| MY = ABS(INCY) | |||
| * | |||
| DO 40 KN = 1, 4 | |||
| N = NS(KN) | |||
| KSIZE = MIN(2,KN) | |||
| LENX = LENS(KN,MX) | |||
| LENY = LENS(KN,MY) | |||
| * .. initialize all argument arrays .. | |||
| DO 20 I = 1, 7 | |||
| CX(I) = CX1(I) | |||
| CY(I) = CY1(I) | |||
| 20 CONTINUE | |||
| IF (ICASE.EQ.1) THEN | |||
| * .. ZDOTCTEST .. | |||
| CALL ZDOTCTEST(N,CX,INCX,CY,INCY,ZTEMP) | |||
| CDOT(1) = ZTEMP | |||
| CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.2) THEN | |||
| * .. ZDOTUTEST .. | |||
| CALL ZDOTUTEST(N,CX,INCX,CY,INCY,ZTEMP) | |||
| CDOT(1) = ZTEMP | |||
| CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC) | |||
| ELSE IF (ICASE.EQ.3) THEN | |||
| * .. ZAXPYTEST .. | |||
| CALL ZAXPYTEST(N,CA,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC) | |||
| ELSE IF (ICASE.EQ.4) THEN | |||
| * .. ZCOPYTEST .. | |||
| CALL ZCOPYTEST(N,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0) | |||
| ELSE IF (ICASE.EQ.5) THEN | |||
| * .. ZSWAPTEST .. | |||
| CALL ZSWAPTEST(N,CX,INCX,CY,INCY) | |||
| CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0D0) | |||
| CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0) | |||
| ELSE | |||
| WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' | |||
| STOP | |||
| END IF | |||
| * | |||
| 40 CONTINUE | |||
| 60 CONTINUE | |||
| RETURN | |||
| END | |||
| SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| * ********************************* STEST ************************** | |||
| * | |||
| * THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO | |||
| * SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE | |||
| * NEGLIGIBLE. | |||
| * | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN) | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| DOUBLE PRECISION SD | |||
| INTEGER I | |||
| * .. External Functions .. | |||
| DOUBLE PRECISION SDIFF | |||
| EXTERNAL SDIFF | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC ABS | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| * | |||
| DO 40 I = 1, LEN | |||
| SD = SCOMP(I) - STRUE(I) | |||
| IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0D0) | |||
| + GO TO 40 | |||
| * | |||
| * HERE SCOMP(I) IS NOT CLOSE TO STRUE(I). | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I), | |||
| + STRUE(I), SD, SSIZE(I) | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE I ', | |||
| + ' COMP(I) TRUE(I) DIFFERENCE', | |||
| + ' SIZE(I)',/1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4) | |||
| END | |||
| SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC) | |||
| * ************************* STEST1 ***************************** | |||
| * | |||
| * THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN | |||
| * REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE | |||
| * ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT. | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SCOMP1, SFAC, STRUE1 | |||
| * .. Array Arguments .. | |||
| DOUBLE PRECISION SSIZE(*) | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION SCOMP(1), STRUE(1) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Executable Statements .. | |||
| * | |||
| SCOMP(1) = SCOMP1 | |||
| STRUE(1) = STRUE1 | |||
| CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC) | |||
| * | |||
| RETURN | |||
| END | |||
| DOUBLE PRECISION FUNCTION SDIFF(SA,SB) | |||
| * ********************************* SDIFF ************************** | |||
| * COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SA, SB | |||
| * .. Executable Statements .. | |||
| SDIFF = SA - SB | |||
| RETURN | |||
| END | |||
| SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC) | |||
| * **************************** CTEST ***************************** | |||
| * | |||
| * C.L. LAWSON, JPL, 1978 DEC 6 | |||
| * | |||
| * .. Scalar Arguments .. | |||
| DOUBLE PRECISION SFAC | |||
| INTEGER LEN | |||
| * .. Array Arguments .. | |||
| COMPLEX*16 CCOMP(LEN), CSIZE(LEN), CTRUE(LEN) | |||
| * .. Local Scalars .. | |||
| INTEGER I | |||
| * .. Local Arrays .. | |||
| DOUBLE PRECISION SCOMP(20), SSIZE(20), STRUE(20) | |||
| * .. External Subroutines .. | |||
| EXTERNAL STEST | |||
| * .. Intrinsic Functions .. | |||
| INTRINSIC DIMAG, DBLE | |||
| * .. Executable Statements .. | |||
| DO 20 I = 1, LEN | |||
| SCOMP(2*I-1) = DBLE(CCOMP(I)) | |||
| SCOMP(2*I) = DIMAG(CCOMP(I)) | |||
| STRUE(2*I-1) = DBLE(CTRUE(I)) | |||
| STRUE(2*I) = DIMAG(CTRUE(I)) | |||
| SSIZE(2*I-1) = DBLE(CSIZE(I)) | |||
| SSIZE(2*I) = DIMAG(CSIZE(I)) | |||
| 20 CONTINUE | |||
| * | |||
| CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC) | |||
| RETURN | |||
| END | |||
| SUBROUTINE ITEST1(ICOMP,ITRUE) | |||
| * ********************************* ITEST1 ************************* | |||
| * | |||
| * THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR | |||
| * EQUALITY. | |||
| * C. L. LAWSON, JPL, 1974 DEC 10 | |||
| * | |||
| * .. Parameters .. | |||
| INTEGER NOUT | |||
| PARAMETER (NOUT=6) | |||
| * .. Scalar Arguments .. | |||
| INTEGER ICOMP, ITRUE | |||
| * .. Scalars in Common .. | |||
| INTEGER ICASE, INCX, INCY, MODE, N | |||
| LOGICAL PASS | |||
| * .. Local Scalars .. | |||
| INTEGER ID | |||
| * .. Common blocks .. | |||
| COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS | |||
| * .. Executable Statements .. | |||
| IF (ICOMP.EQ.ITRUE) GO TO 40 | |||
| * | |||
| * HERE ICOMP IS NOT EQUAL TO ITRUE. | |||
| * | |||
| IF ( .NOT. PASS) GO TO 20 | |||
| * PRINT FAIL MESSAGE AND HEADER. | |||
| PASS = .FALSE. | |||
| WRITE (NOUT,99999) | |||
| WRITE (NOUT,99998) | |||
| 20 ID = ICOMP - ITRUE | |||
| WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID | |||
| 40 CONTINUE | |||
| RETURN | |||
| * | |||
| 99999 FORMAT (' FAIL') | |||
| 99998 FORMAT (/' CASE N INCX INCY MODE ', | |||
| + ' COMP TRUE DIFFERENCE', | |||
| + /1X) | |||
| 99997 FORMAT (1X,I4,I3,3I5,2I36,I12) | |||
| END | |||
| @@ -0,0 +1,514 @@ | |||
| /* | |||
| * cblas_test.h | |||
| * Written by Keita Teranishi | |||
| */ | |||
| #ifndef CBLAS_TEST_H | |||
| #define CBLAS_TEST_H | |||
| #include "cblas.h" | |||
| #ifdef USE64BITINT | |||
| #define int long | |||
| #endif | |||
| #define TRUE 1 | |||
| #define PASSED 1 | |||
| #define TEST_ROW_MJR 1 | |||
| #define FALSE 0 | |||
| #define FAILED 0 | |||
| #define TEST_COL_MJR 0 | |||
| #define INVALID -1 | |||
| #define UNDEFINED -1 | |||
| typedef struct { float real; float imag; } CBLAS_TEST_COMPLEX; | |||
| typedef struct { double real; double imag; } CBLAS_TEST_ZOMPLEX; | |||
| #if defined(ADD_) | |||
| /* | |||
| * Level 1 BLAS | |||
| */ | |||
| #define F77_srotg srotgtest_ | |||
| #define F77_srotmg srotmgtest_ | |||
| #define F77_srot srottest_ | |||
| #define F77_srotm srotmtest_ | |||
| #define F77_drotg drotgtest_ | |||
| #define F77_drotmg drotmgtest_ | |||
| #define F77_drot drottest_ | |||
| #define F77_drotm drotmtest_ | |||
| #define F77_sswap sswaptest_ | |||
| #define F77_scopy scopytest_ | |||
| #define F77_saxpy saxpytest_ | |||
| #define F77_isamax isamaxtest_ | |||
| #define F77_dswap dswaptest_ | |||
| #define F77_dcopy dcopytest_ | |||
| #define F77_daxpy daxpytest_ | |||
| #define F77_idamax idamaxtest_ | |||
| #define F77_cswap cswaptest_ | |||
| #define F77_ccopy ccopytest_ | |||
| #define F77_caxpy caxpytest_ | |||
| #define F77_icamax icamaxtest_ | |||
| #define F77_zswap zswaptest_ | |||
| #define F77_zcopy zcopytest_ | |||
| #define F77_zaxpy zaxpytest_ | |||
| #define F77_izamax izamaxtest_ | |||
| #define F77_sdot sdottest_ | |||
| #define F77_ddot ddottest_ | |||
| #define F77_dsdot dsdottest_ | |||
| #define F77_sscal sscaltest_ | |||
| #define F77_dscal dscaltest_ | |||
| #define F77_cscal cscaltest_ | |||
| #define F77_zscal zscaltest_ | |||
| #define F77_csscal csscaltest_ | |||
| #define F77_zdscal zdscaltest_ | |||
| #define F77_cdotu cdotutest_ | |||
| #define F77_cdotc cdotctest_ | |||
| #define F77_zdotu zdotutest_ | |||
| #define F77_zdotc zdotctest_ | |||
| #define F77_snrm2 snrm2test_ | |||
| #define F77_sasum sasumtest_ | |||
| #define F77_dnrm2 dnrm2test_ | |||
| #define F77_dasum dasumtest_ | |||
| #define F77_scnrm2 scnrm2test_ | |||
| #define F77_scasum scasumtest_ | |||
| #define F77_dznrm2 dznrm2test_ | |||
| #define F77_dzasum dzasumtest_ | |||
| #define F77_sdsdot sdsdottest_ | |||
| /* | |||
| * Level 2 BLAS | |||
| */ | |||
| #define F77_s2chke cs2chke_ | |||
| #define F77_d2chke cd2chke_ | |||
| #define F77_c2chke cc2chke_ | |||
| #define F77_z2chke cz2chke_ | |||
| #define F77_ssymv cssymv_ | |||
| #define F77_ssbmv cssbmv_ | |||
| #define F77_sspmv csspmv_ | |||
| #define F77_sger csger_ | |||
| #define F77_ssyr cssyr_ | |||
| #define F77_sspr csspr_ | |||
| #define F77_ssyr2 cssyr2_ | |||
| #define F77_sspr2 csspr2_ | |||
| #define F77_dsymv cdsymv_ | |||
| #define F77_dsbmv cdsbmv_ | |||
| #define F77_dspmv cdspmv_ | |||
| #define F77_dger cdger_ | |||
| #define F77_dsyr cdsyr_ | |||
| #define F77_dspr cdspr_ | |||
| #define F77_dsyr2 cdsyr2_ | |||
| #define F77_dspr2 cdspr2_ | |||
| #define F77_chemv cchemv_ | |||
| #define F77_chbmv cchbmv_ | |||
| #define F77_chpmv cchpmv_ | |||
| #define F77_cgeru ccgeru_ | |||
| #define F77_cgerc ccgerc_ | |||
| #define F77_cher ccher_ | |||
| #define F77_chpr cchpr_ | |||
| #define F77_cher2 ccher2_ | |||
| #define F77_chpr2 cchpr2_ | |||
| #define F77_zhemv czhemv_ | |||
| #define F77_zhbmv czhbmv_ | |||
| #define F77_zhpmv czhpmv_ | |||
| #define F77_zgeru czgeru_ | |||
| #define F77_zgerc czgerc_ | |||
| #define F77_zher czher_ | |||
| #define F77_zhpr czhpr_ | |||
| #define F77_zher2 czher2_ | |||
| #define F77_zhpr2 czhpr2_ | |||
| #define F77_sgemv csgemv_ | |||
| #define F77_sgbmv csgbmv_ | |||
| #define F77_strmv cstrmv_ | |||
| #define F77_stbmv cstbmv_ | |||
| #define F77_stpmv cstpmv_ | |||
| #define F77_strsv cstrsv_ | |||
| #define F77_stbsv cstbsv_ | |||
| #define F77_stpsv cstpsv_ | |||
| #define F77_dgemv cdgemv_ | |||
| #define F77_dgbmv cdgbmv_ | |||
| #define F77_dtrmv cdtrmv_ | |||
| #define F77_dtbmv cdtbmv_ | |||
| #define F77_dtpmv cdtpmv_ | |||
| #define F77_dtrsv cdtrsv_ | |||
| #define F77_dtbsv cdtbsv_ | |||
| #define F77_dtpsv cdtpsv_ | |||
| #define F77_cgemv ccgemv_ | |||
| #define F77_cgbmv ccgbmv_ | |||
| #define F77_ctrmv cctrmv_ | |||
| #define F77_ctbmv cctbmv_ | |||
| #define F77_ctpmv cctpmv_ | |||
| #define F77_ctrsv cctrsv_ | |||
| #define F77_ctbsv cctbsv_ | |||
| #define F77_ctpsv cctpsv_ | |||
| #define F77_zgemv czgemv_ | |||
| #define F77_zgbmv czgbmv_ | |||
| #define F77_ztrmv cztrmv_ | |||
| #define F77_ztbmv cztbmv_ | |||
| #define F77_ztpmv cztpmv_ | |||
| #define F77_ztrsv cztrsv_ | |||
| #define F77_ztbsv cztbsv_ | |||
| #define F77_ztpsv cztpsv_ | |||
| /* | |||
| * Level 3 BLAS | |||
| */ | |||
| #define F77_s3chke cs3chke_ | |||
| #define F77_d3chke cd3chke_ | |||
| #define F77_c3chke cc3chke_ | |||
| #define F77_z3chke cz3chke_ | |||
| #define F77_chemm cchemm_ | |||
| #define F77_cherk ccherk_ | |||
| #define F77_cher2k ccher2k_ | |||
| #define F77_zhemm czhemm_ | |||
| #define F77_zherk czherk_ | |||
| #define F77_zher2k czher2k_ | |||
| #define F77_sgemm csgemm_ | |||
| #define F77_ssymm cssymm_ | |||
| #define F77_ssyrk cssyrk_ | |||
| #define F77_ssyr2k cssyr2k_ | |||
| #define F77_strmm cstrmm_ | |||
| #define F77_strsm cstrsm_ | |||
| #define F77_dgemm cdgemm_ | |||
| #define F77_dsymm cdsymm_ | |||
| #define F77_dsyrk cdsyrk_ | |||
| #define F77_dsyr2k cdsyr2k_ | |||
| #define F77_dtrmm cdtrmm_ | |||
| #define F77_dtrsm cdtrsm_ | |||
| #define F77_cgemm ccgemm_ | |||
| #define F77_csymm ccsymm_ | |||
| #define F77_csyrk ccsyrk_ | |||
| #define F77_csyr2k ccsyr2k_ | |||
| #define F77_ctrmm cctrmm_ | |||
| #define F77_ctrsm cctrsm_ | |||
| #define F77_zgemm czgemm_ | |||
| #define F77_zsymm czsymm_ | |||
| #define F77_zsyrk czsyrk_ | |||
| #define F77_zsyr2k czsyr2k_ | |||
| #define F77_ztrmm cztrmm_ | |||
| #define F77_ztrsm cztrsm_ | |||
| #elif defined(UPCASE) | |||
| /* | |||
| * Level 1 BLAS | |||
| */ | |||
| #define F77_srotg SROTGTEST | |||
| #define F77_srotmg SROTMGTEST | |||
| #define F77_srot SROTCTEST | |||
| #define F77_srotm SROTMTEST | |||
| #define F77_drotg DROTGTEST | |||
| #define F77_drotmg DROTMGTEST | |||
| #define F77_drot DROTTEST | |||
| #define F77_drotm DROTMTEST | |||
| #define F77_sswap SSWAPTEST | |||
| #define F77_scopy SCOPYTEST | |||
| #define F77_saxpy SAXPYTEST | |||
| #define F77_isamax ISAMAXTEST | |||
| #define F77_dswap DSWAPTEST | |||
| #define F77_dcopy DCOPYTEST | |||
| #define F77_daxpy DAXPYTEST | |||
| #define F77_idamax IDAMAXTEST | |||
| #define F77_cswap CSWAPTEST | |||
| #define F77_ccopy CCOPYTEST | |||
| #define F77_caxpy CAXPYTEST | |||
| #define F77_icamax ICAMAXTEST | |||
| #define F77_zswap ZSWAPTEST | |||
| #define F77_zcopy ZCOPYTEST | |||
| #define F77_zaxpy ZAXPYTEST | |||
| #define F77_izamax IZAMAXTEST | |||
| #define F77_sdot SDOTTEST | |||
| #define F77_ddot DDOTTEST | |||
| #define F77_dsdot DSDOTTEST | |||
| #define F77_sscal SSCALTEST | |||
| #define F77_dscal DSCALTEST | |||
| #define F77_cscal CSCALTEST | |||
| #define F77_zscal ZSCALTEST | |||
| #define F77_csscal CSSCALTEST | |||
| #define F77_zdscal ZDSCALTEST | |||
| #define F77_cdotu CDOTUTEST | |||
| #define F77_cdotc CDOTCTEST | |||
| #define F77_zdotu ZDOTUTEST | |||
| #define F77_zdotc ZDOTCTEST | |||
| #define F77_snrm2 SNRM2TEST | |||
| #define F77_sasum SASUMTEST | |||
| #define F77_dnrm2 DNRM2TEST | |||
| #define F77_dasum DASUMTEST | |||
| #define F77_scnrm2 SCNRM2TEST | |||
| #define F77_scasum SCASUMTEST | |||
| #define F77_dznrm2 DZNRM2TEST | |||
| #define F77_dzasum DZASUMTEST | |||
| #define F77_sdsdot SDSDOTTEST | |||
| /* | |||
| * Level 2 BLAS | |||
| */ | |||
| #define F77_s2chke CS2CHKE | |||
| #define F77_d2chke CD2CHKE | |||
| #define F77_c2chke CC2CHKE | |||
| #define F77_z2chke CZ2CHKE | |||
| #define F77_ssymv CSSYMV | |||
| #define F77_ssbmv CSSBMV | |||
| #define F77_sspmv CSSPMV | |||
| #define F77_sger CSGER | |||
| #define F77_ssyr CSSYR | |||
| #define F77_sspr CSSPR | |||
| #define F77_ssyr2 CSSYR2 | |||
| #define F77_sspr2 CSSPR2 | |||
| #define F77_dsymv CDSYMV | |||
| #define F77_dsbmv CDSBMV | |||
| #define F77_dspmv CDSPMV | |||
| #define F77_dger CDGER | |||
| #define F77_dsyr CDSYR | |||
| #define F77_dspr CDSPR | |||
| #define F77_dsyr2 CDSYR2 | |||
| #define F77_dspr2 CDSPR2 | |||
| #define F77_chemv CCHEMV | |||
| #define F77_chbmv CCHBMV | |||
| #define F77_chpmv CCHPMV | |||
| #define F77_cgeru CCGERU | |||
| #define F77_cgerc CCGERC | |||
| #define F77_cher CCHER | |||
| #define F77_chpr CCHPR | |||
| #define F77_cher2 CCHER2 | |||
| #define F77_chpr2 CCHPR2 | |||
| #define F77_zhemv CZHEMV | |||
| #define F77_zhbmv CZHBMV | |||
| #define F77_zhpmv CZHPMV | |||
| #define F77_zgeru CZGERU | |||
| #define F77_zgerc CZGERC | |||
| #define F77_zher CZHER | |||
| #define F77_zhpr CZHPR | |||
| #define F77_zher2 CZHER2 | |||
| #define F77_zhpr2 CZHPR2 | |||
| #define F77_sgemv CSGEMV | |||
| #define F77_sgbmv CSGBMV | |||
| #define F77_strmv CSTRMV | |||
| #define F77_stbmv CSTBMV | |||
| #define F77_stpmv CSTPMV | |||
| #define F77_strsv CSTRSV | |||
| #define F77_stbsv CSTBSV | |||
| #define F77_stpsv CSTPSV | |||
| #define F77_dgemv CDGEMV | |||
| #define F77_dgbmv CDGBMV | |||
| #define F77_dtrmv CDTRMV | |||
| #define F77_dtbmv CDTBMV | |||
| #define F77_dtpmv CDTPMV | |||
| #define F77_dtrsv CDTRSV | |||
| #define F77_dtbsv CDTBSV | |||
| #define F77_dtpsv CDTPSV | |||
| #define F77_cgemv CCGEMV | |||
| #define F77_cgbmv CCGBMV | |||
| #define F77_ctrmv CCTRMV | |||
| #define F77_ctbmv CCTBMV | |||
| #define F77_ctpmv CCTPMV | |||
| #define F77_ctrsv CCTRSV | |||
| #define F77_ctbsv CCTBSV | |||
| #define F77_ctpsv CCTPSV | |||
| #define F77_zgemv CZGEMV | |||
| #define F77_zgbmv CZGBMV | |||
| #define F77_ztrmv CZTRMV | |||
| #define F77_ztbmv CZTBMV | |||
| #define F77_ztpmv CZTPMV | |||
| #define F77_ztrsv CZTRSV | |||
| #define F77_ztbsv CZTBSV | |||
| #define F77_ztpsv CZTPSV | |||
| /* | |||
| * Level 3 BLAS | |||
| */ | |||
| #define F77_s3chke CS3CHKE | |||
| #define F77_d3chke CD3CHKE | |||
| #define F77_c3chke CC3CHKE | |||
| #define F77_z3chke CZ3CHKE | |||
| #define F77_chemm CCHEMM | |||
| #define F77_cherk CCHERK | |||
| #define F77_cher2k CCHER2K | |||
| #define F77_zhemm CZHEMM | |||
| #define F77_zherk CZHERK | |||
| #define F77_zher2k CZHER2K | |||
| #define F77_sgemm CSGEMM | |||
| #define F77_ssymm CSSYMM | |||
| #define F77_ssyrk CSSYRK | |||
| #define F77_ssyr2k CSSYR2K | |||
| #define F77_strmm CSTRMM | |||
| #define F77_strsm CSTRSM | |||
| #define F77_dgemm CDGEMM | |||
| #define F77_dsymm CDSYMM | |||
| #define F77_dsyrk CDSYRK | |||
| #define F77_dsyr2k CDSYR2K | |||
| #define F77_dtrmm CDTRMM | |||
| #define F77_dtrsm CDTRSM | |||
| #define F77_cgemm CCGEMM | |||
| #define F77_csymm CCSYMM | |||
| #define F77_csyrk CCSYRK | |||
| #define F77_csyr2k CCSYR2K | |||
| #define F77_ctrmm CCTRMM | |||
| #define F77_ctrsm CCTRSM | |||
| #define F77_zgemm CZGEMM | |||
| #define F77_zsymm CZSYMM | |||
| #define F77_zsyrk CZSYRK | |||
| #define F77_zsyr2k CZSYR2K | |||
| #define F77_ztrmm CZTRMM | |||
| #define F77_ztrsm CZTRSM | |||
| #elif defined(NOCHANGE) | |||
| /* | |||
| * Level 1 BLAS | |||
| */ | |||
| #define F77_srotg srotgtest | |||
| #define F77_srotmg srotmgtest | |||
| #define F77_srot srottest | |||
| #define F77_srotm srotmtest | |||
| #define F77_drotg drotgtest | |||
| #define F77_drotmg drotmgtest | |||
| #define F77_drot drottest | |||
| #define F77_drotm drotmtest | |||
| #define F77_sswap sswaptest | |||
| #define F77_scopy scopytest | |||
| #define F77_saxpy saxpytest | |||
| #define F77_isamax isamaxtest | |||
| #define F77_dswap dswaptest | |||
| #define F77_dcopy dcopytest | |||
| #define F77_daxpy daxpytest | |||
| #define F77_idamax idamaxtest | |||
| #define F77_cswap cswaptest | |||
| #define F77_ccopy ccopytest | |||
| #define F77_caxpy caxpytest | |||
| #define F77_icamax icamaxtest | |||
| #define F77_zswap zswaptest | |||
| #define F77_zcopy zcopytest | |||
| #define F77_zaxpy zaxpytest | |||
| #define F77_izamax izamaxtest | |||
| #define F77_sdot sdottest | |||
| #define F77_ddot ddottest | |||
| #define F77_dsdot dsdottest | |||
| #define F77_sscal sscaltest | |||
| #define F77_dscal dscaltest | |||
| #define F77_cscal cscaltest | |||
| #define F77_zscal zscaltest | |||
| #define F77_csscal csscaltest | |||
| #define F77_zdscal zdscaltest | |||
| #define F77_cdotu cdotutest | |||
| #define F77_cdotc cdotctest | |||
| #define F77_zdotu zdotutest | |||
| #define F77_zdotc zdotctest | |||
| #define F77_snrm2 snrm2test | |||
| #define F77_sasum sasumtest | |||
| #define F77_dnrm2 dnrm2test | |||
| #define F77_dasum dasumtest | |||
| #define F77_scnrm2 scnrm2test | |||
| #define F77_scasum scasumtest | |||
| #define F77_dznrm2 dznrm2test | |||
| #define F77_dzasum dzasumtest | |||
| #define F77_sdsdot sdsdottest | |||
| /* | |||
| * Level 2 BLAS | |||
| */ | |||
| #define F77_s2chke cs2chke | |||
| #define F77_d2chke cd2chke | |||
| #define F77_c2chke cc2chke | |||
| #define F77_z2chke cz2chke | |||
| #define F77_ssymv cssymv | |||
| #define F77_ssbmv cssbmv | |||
| #define F77_sspmv csspmv | |||
| #define F77_sger csger | |||
| #define F77_ssyr cssyr | |||
| #define F77_sspr csspr | |||
| #define F77_ssyr2 cssyr2 | |||
| #define F77_sspr2 csspr2 | |||
| #define F77_dsymv cdsymv | |||
| #define F77_dsbmv cdsbmv | |||
| #define F77_dspmv cdspmv | |||
| #define F77_dger cdger | |||
| #define F77_dsyr cdsyr | |||
| #define F77_dspr cdspr | |||
| #define F77_dsyr2 cdsyr2 | |||
| #define F77_dspr2 cdspr2 | |||
| #define F77_chemv cchemv | |||
| #define F77_chbmv cchbmv | |||
| #define F77_chpmv cchpmv | |||
| #define F77_cgeru ccgeru | |||
| #define F77_cgerc ccgerc | |||
| #define F77_cher ccher | |||
| #define F77_chpr cchpr | |||
| #define F77_cher2 ccher2 | |||
| #define F77_chpr2 cchpr2 | |||
| #define F77_zhemv czhemv | |||
| #define F77_zhbmv czhbmv | |||
| #define F77_zhpmv czhpmv | |||
| #define F77_zgeru czgeru | |||
| #define F77_zgerc czgerc | |||
| #define F77_zher czher | |||
| #define F77_zhpr czhpr | |||
| #define F77_zher2 czher2 | |||
| #define F77_zhpr2 czhpr2 | |||
| #define F77_sgemv csgemv | |||
| #define F77_sgbmv csgbmv | |||
| #define F77_strmv cstrmv | |||
| #define F77_stbmv cstbmv | |||
| #define F77_stpmv cstpmv | |||
| #define F77_strsv cstrsv | |||
| #define F77_stbsv cstbsv | |||
| #define F77_stpsv cstpsv | |||
| #define F77_dgemv cdgemv | |||
| #define F77_dgbmv cdgbmv | |||
| #define F77_dtrmv cdtrmv | |||
| #define F77_dtbmv cdtbmv | |||
| #define F77_dtpmv cdtpmv | |||
| #define F77_dtrsv cdtrsv | |||
| #define F77_dtbsv cdtbsv | |||
| #define F77_dtpsv cdtpsv | |||
| #define F77_cgemv ccgemv | |||
| #define F77_cgbmv ccgbmv | |||
| #define F77_ctrmv cctrmv | |||
| #define F77_ctbmv cctbmv | |||
| #define F77_ctpmv cctpmv | |||
| #define F77_ctrsv cctrsv | |||
| #define F77_ctbsv cctbsv | |||
| #define F77_ctpsv cctpsv | |||
| #define F77_zgemv czgemv | |||
| #define F77_zgbmv czgbmv | |||
| #define F77_ztrmv cztrmv | |||
| #define F77_ztbmv cztbmv | |||
| #define F77_ztpmv cztpmv | |||
| #define F77_ztrsv cztrsv | |||
| #define F77_ztbsv cztbsv | |||
| #define F77_ztpsv cztpsv | |||
| /* | |||
| * Level 3 BLAS | |||
| */ | |||
| #define F77_s3chke cs3chke | |||
| #define F77_d3chke cd3chke | |||
| #define F77_c3chke cc3chke | |||
| #define F77_z3chke cz3chke | |||
| #define F77_chemm cchemm | |||
| #define F77_cherk ccherk | |||
| #define F77_cher2k ccher2k | |||
| #define F77_zhemm czhemm | |||
| #define F77_zherk czherk | |||
| #define F77_zher2k czher2k | |||
| #define F77_sgemm csgemm | |||
| #define F77_ssymm cssymm | |||
| #define F77_ssyrk cssyrk | |||
| #define F77_ssyr2k cssyr2k | |||
| #define F77_strmm cstrmm | |||
| #define F77_strsm cstrsm | |||
| #define F77_dgemm cdgemm | |||
| #define F77_dsymm cdsymm | |||
| #define F77_dsyrk cdsyrk | |||
| #define F77_dsyr2k cdsyr2k | |||
| #define F77_dtrmm cdtrmm | |||
| #define F77_dtrsm cdtrsm | |||
| #define F77_cgemm ccgemm | |||
| #define F77_csymm ccsymm | |||
| #define F77_csyrk ccsyrk | |||
| #define F77_csyr2k ccsyr2k | |||
| #define F77_ctrmm cctrmm | |||
| #define F77_ctrsm cctrsm | |||
| #define F77_zgemm czgemm | |||
| #define F77_zsymm czsymm | |||
| #define F77_zsyrk czsyrk | |||
| #define F77_zsyr2k czsyr2k | |||
| #define F77_ztrmm cztrmm | |||
| #define F77_ztrsm cztrsm | |||
| #endif | |||
| void get_transpose_type(char *type, enum CBLAS_TRANSPOSE *trans); | |||
| void get_uplo_type(char *type, enum CBLAS_UPLO *uplo); | |||
| void get_diag_type(char *type, enum CBLAS_DIAG *diag); | |||
| void get_side_type(char *type, enum CBLAS_SIDE *side); | |||
| #endif /* CBLAS_TEST_H */ | |||
| @@ -0,0 +1,34 @@ | |||
| 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE | |||
| -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) | |||
| F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. | |||
| F LOGICAL FLAG, T TO STOP ON FAILURES. | |||
| T LOGICAL FLAG, T TO TEST ERROR EXITS. | |||
| 2 LOGICAL FLAG, T TO TEST ROW-MAJOR (IF FALSE COLUMN-MAJOR IS TESTED) | |||
| 16.0 THRESHOLD VALUE OF TEST RATIO | |||
| 7 NUMBER OF VALUES OF N | |||
| 0 1 2 3 5 9 63 VALUES OF N | |||
| 4 NUMBER OF VALUES OF K | |||
| 0 1 2 4 VALUES OF K | |||
| 4 NUMBER OF VALUES OF INCX AND INCY | |||
| 1 2 -1 -2 VALUES OF INCX AND INCY | |||
| 3 NUMBER OF VALUES OF ALPHA | |||
| (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA | |||
| 3 NUMBER OF VALUES OF BETA | |||
| (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA | |||
| cblas_cgemv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cgbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chemv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chpmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctrmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctpmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctrsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctbsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctpsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cgerc T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cgeru T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cher T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chpr T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cher2 T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chpr2 T PUT F FOR NO TEST. SAME COLUMNS. | |||
| @@ -0,0 +1,22 @@ | |||
| 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE | |||
| -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) | |||
| F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. | |||
| F LOGICAL FLAG, T TO STOP ON FAILURES. | |||
| T LOGICAL FLAG, T TO TEST ERROR EXITS. | |||
| 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH | |||
| 16.0 THRESHOLD VALUE OF TEST RATIO | |||
| 6 NUMBER OF VALUES OF N | |||
| 0 1 2 3 5 9 35 VALUES OF N | |||
| 3 NUMBER OF VALUES OF ALPHA | |||
| (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA | |||
| 3 NUMBER OF VALUES OF BETA | |||
| (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA | |||
| cblas_cgemm T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_chemm T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_csymm T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctrmm T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_ctrsm T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cherk T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_csyrk T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_cher2k T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_csyr2k T PUT F FOR NO TEST. SAME COLUMNS. | |||
| @@ -0,0 +1,3 @@ | |||
| int CBLAS_CallFromC; | |||
| int RowMajorStrg; | |||
| @@ -0,0 +1,33 @@ | |||
| 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE | |||
| -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) | |||
| F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. | |||
| F LOGICAL FLAG, T TO STOP ON FAILURES. | |||
| T LOGICAL FLAG, T TO TEST ERROR EXITS. | |||
| 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH | |||
| 16.0 THRESHOLD VALUE OF TEST RATIO | |||
| 7 NUMBER OF VALUES OF N | |||
| 0 1 2 3 5 9 63 VALUES OF N | |||
| 4 NUMBER OF VALUES OF K | |||
| 0 1 2 4 VALUES OF K | |||
| 4 NUMBER OF VALUES OF INCX AND INCY | |||
| 1 2 -1 -2 VALUES OF INCX AND INCY | |||
| 3 NUMBER OF VALUES OF ALPHA | |||
| 0.0 1.0 0.7 VALUES OF ALPHA | |||
| 3 NUMBER OF VALUES OF BETA | |||
| 0.0 1.0 0.9 VALUES OF BETA | |||
| cblas_dgemv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dgbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dsymv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dsbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dspmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtrmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtbmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtpmv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtrsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtbsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dtpsv T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dger T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dsyr T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dspr T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dsyr2 T PUT F FOR NO TEST. SAME COLUMNS. | |||
| cblas_dspr2 T PUT F FOR NO TEST. SAME COLUMNS. | |||