diff options
author | Xianyi Zhang <traits.zhang@gmail.com> | 2011-01-24 14:54:24 +0000 |
---|---|---|
committer | Xianyi Zhang <traits.zhang@gmail.com> | 2011-01-24 14:54:24 +0000 |
commit | 342bbc3871d1b43f548e9d1ae9d380a1d4989cb3 (patch) | |
tree | 385fc6d27e282ae1bb06d685833c5325615c8169 /lapack/lauu2 | |
download | openblas-342bbc3871d1b43f548e9d1ae9d380a1d4989cb3.tar.gz openblas-342bbc3871d1b43f548e9d1ae9d380a1d4989cb3.tar.bz2 openblas-342bbc3871d1b43f548e9d1ae9d380a1d4989cb3.zip |
Import GotoBLAS2 1.13 BSD version codes.
Diffstat (limited to 'lapack/lauu2')
-rw-r--r-- | lapack/lauu2/Makefile | 83 | ||||
-rw-r--r-- | lapack/lauu2/lauu2_L.c | 78 | ||||
-rw-r--r-- | lapack/lauu2/lauu2_U.c | 78 | ||||
-rw-r--r-- | lapack/lauu2/zlauu2_L.c | 83 | ||||
-rw-r--r-- | lapack/lauu2/zlauu2_U.c | 81 |
5 files changed, 403 insertions, 0 deletions
diff --git a/lapack/lauu2/Makefile b/lapack/lauu2/Makefile new file mode 100644 index 000000000..dc6a640b4 --- /dev/null +++ b/lapack/lauu2/Makefile @@ -0,0 +1,83 @@ +TOPDIR = ../.. +include ../../Makefile.system + +SBLASOBJS = slauu2_U.$(SUFFIX) slauu2_L.$(SUFFIX) +DBLASOBJS = dlauu2_U.$(SUFFIX) dlauu2_L.$(SUFFIX) +QBLASOBJS = qlauu2_U.$(SUFFIX) qlauu2_L.$(SUFFIX) +CBLASOBJS = clauu2_U.$(SUFFIX) clauu2_L.$(SUFFIX) +ZBLASOBJS = zlauu2_U.$(SUFFIX) zlauu2_L.$(SUFFIX) +XBLASOBJS = xlauu2_U.$(SUFFIX) xlauu2_L.$(SUFFIX) + +slauu2_U.$(SUFFIX) : lauu2_U.c + $(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE $< -o $(@F) + +slauu2_L.$(SUFFIX) : lauu2_L.c + $(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE $< -o $(@F) + +dlauu2_U.$(SUFFIX) : lauu2_U.c + $(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE $< -o $(@F) + +dlauu2_L.$(SUFFIX) : lauu2_L.c + $(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE $< -o $(@F) + +qlauu2_U.$(SUFFIX) : lauu2_U.c + $(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE $< -o $(@F) + +qlauu2_L.$(SUFFIX) : lauu2_L.c + $(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE $< -o $(@F) + +clauu2_U.$(SUFFIX) : zlauu2_U.c + $(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE $< -o $(@F) + +clauu2_L.$(SUFFIX) : zlauu2_L.c + $(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE $< -o $(@F) + +zlauu2_U.$(SUFFIX) : zlauu2_U.c + $(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE $< -o $(@F) + +zlauu2_L.$(SUFFIX) : zlauu2_L.c + $(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE $< -o $(@F) + +xlauu2_U.$(SUFFIX) : zlauu2_U.c + $(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE $< -o $(@F) + +xlauu2_L.$(SUFFIX) : zlauu2_L.c + $(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE $< -o $(@F) + +slauu2_U.$(PSUFFIX) : lauu2_U.c + $(CC) -c $(PFLAGS) -UCOMPLEX -UDOUBLE $< -o $(@F) + +slauu2_L.$(PSUFFIX) : lauu2_L.c + $(CC) -c $(PFLAGS) -UCOMPLEX -UDOUBLE $< -o $(@F) + +dlauu2_U.$(PSUFFIX) : lauu2_U.c + $(CC) -c $(PFLAGS) -UCOMPLEX -DDOUBLE $< -o $(@F) + +dlauu2_L.$(PSUFFIX) : lauu2_L.c + $(CC) -c $(PFLAGS) -UCOMPLEX -DDOUBLE $< -o $(@F) + +qlauu2_U.$(PSUFFIX) : lauu2_U.c + $(CC) -c $(PFLAGS) -UCOMPLEX -DXDOUBLE $< -o $(@F) + +qlauu2_L.$(PSUFFIX) : lauu2_L.c + $(CC) -c $(PFLAGS) -UCOMPLEX -DXDOUBLE $< -o $(@F) + +clauu2_U.$(PSUFFIX) : zlauu2_U.c + $(CC) -c $(PFLAGS) -DCOMPLEX -UDOUBLE $< -o $(@F) + +clauu2_L.$(PSUFFIX) : zlauu2_L.c + $(CC) -c $(PFLAGS) -DCOMPLEX -UDOUBLE $< -o $(@F) + +zlauu2_U.$(PSUFFIX) : zlauu2_U.c + $(CC) -c $(PFLAGS) -DCOMPLEX -DDOUBLE $< -o $(@F) + +zlauu2_L.$(PSUFFIX) : zlauu2_L.c + $(CC) -c $(PFLAGS) -DCOMPLEX -DDOUBLE $< -o $(@F) + +xlauu2_U.$(PSUFFIX) : zlauu2_U.c + $(CC) -c $(PFLAGS) -DCOMPLEX -DXDOUBLE $< -o $(@F) + +xlauu2_L.$(PSUFFIX) : zlauu2_L.c + $(CC) -c $(PFLAGS) -DCOMPLEX -DXDOUBLE $< -o $(@F) + +include ../../Makefile.tail diff --git a/lapack/lauu2/lauu2_L.c b/lapack/lauu2/lauu2_L.c new file mode 100644 index 000000000..aedb966ff --- /dev/null +++ b/lapack/lauu2/lauu2_L.c @@ -0,0 +1,78 @@ +/*********************************************************************/ +/* 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 "common.h" + +static FLOAT dp1 = 1.; + +blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { + + BLASLONG n, lda; + FLOAT *a; + + FLOAT aii; + BLASLONG i; + + n = args -> n; + a = (FLOAT *)args -> a; + lda = args -> lda; + + if (range_n) { + n = range_n[1] - range_n[0]; + a += range_n[0] * (lda + 1) * COMPSIZE; + } + + for (i = 0; i < n; i++) { + + SCAL_K(i + 1, 0, 0, *(a + i + i * lda), a + i, lda, NULL, 0, NULL, 0); + + if (i < n - 1) { + aii = DOTU_K(n - i - 1, a + i + 1 + i * lda, 1, a + i + 1 + i * lda, 1); + + *(a + i + i * lda) += aii; + + GEMV_T(n - i - 1, i, 0, dp1, + a + (i + 1) , lda, + a + (i + 1) + i * lda, 1, + a + i , lda, sb); + } + } + + return 0; +} diff --git a/lapack/lauu2/lauu2_U.c b/lapack/lauu2/lauu2_U.c new file mode 100644 index 000000000..f9a718641 --- /dev/null +++ b/lapack/lauu2/lauu2_U.c @@ -0,0 +1,78 @@ +/*********************************************************************/ +/* 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 "common.h" + +static FLOAT dp1 = 1.; + +blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { + + BLASLONG n, lda; + FLOAT *a; + + FLOAT aii; + BLASLONG i; + + n = args -> n; + a = (FLOAT *)args -> a; + lda = args -> lda; + + if (range_n) { + n = range_n[1] - range_n[0]; + a += range_n[0] * (lda + 1) * COMPSIZE; + } + + for (i = 0; i < n; i++) { + + SCAL_K(i + 1, 0, 0, *(a + i + i * lda), a + i * lda, 1, NULL, 0, NULL, 0); + + if (i < n - 1) { + aii = DOTU_K(n - i - 1, a + i + (i + 1)* lda, lda, a + i + (i + 1) * lda, lda); + + *(a + i + i * lda) += aii; + + GEMV_N(i, n - i - 1, 0, dp1, + a + (i + 1) * lda, lda, + a + i + (i + 1) * lda, lda, + a + i * lda, 1, sb); + } + } + + return 0; +} diff --git a/lapack/lauu2/zlauu2_L.c b/lapack/lauu2/zlauu2_L.c new file mode 100644 index 000000000..8a892d974 --- /dev/null +++ b/lapack/lauu2/zlauu2_L.c @@ -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. */ +/*********************************************************************/ + +#include <stdio.h> +#include "common.h" + +static FLOAT dp1 = 1.; + +blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { + + BLASLONG n, lda; + FLOAT *a; + + FLOAT temp[2]; + BLASLONG i; + + n = args -> n; + a = (FLOAT *)args -> a; + lda = args -> lda; + + if (range_n) { + n = range_n[1] - range_n[0]; + a += range_n[0] * (lda + 1) * COMPSIZE; + } + + for (i = 0; i < n; i++) { + + SCAL_K(i + 1, 0, 0, *(a + (i + i * lda) * COMPSIZE + 0), ZERO, + a + i * COMPSIZE, lda, NULL, 0, NULL, 0); + + if (i < n - 1) { + temp[0] = DOTC_K(n - i - 1, + a + (i + 1 + i * lda) * COMPSIZE, 1, + a + (i + 1 + i * lda) * COMPSIZE, 1); + GET_IMAGE(temp[1]); + + *(a + (i + i * lda) * COMPSIZE + 0) += temp[0]; + *(a + (i + i * lda) * COMPSIZE + 1) = ZERO; + + GEMV_U(n - i - 1, i, 0, dp1, ZERO, + a + ((i + 1) ) * COMPSIZE, lda, + a + ((i + 1) + i * lda) * COMPSIZE, 1, + a + ( i ) * COMPSIZE , lda, sb); + } + } + + return 0; +} diff --git a/lapack/lauu2/zlauu2_U.c b/lapack/lauu2/zlauu2_U.c new file mode 100644 index 000000000..b20ea994a --- /dev/null +++ b/lapack/lauu2/zlauu2_U.c @@ -0,0 +1,81 @@ +/*********************************************************************/ +/* 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 "common.h" + +static FLOAT dp1 = 1.; + +blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) { + + BLASLONG n, lda; + FLOAT *a; + + FLOAT temp[2]; + BLASLONG i; + + n = args -> n; + a = (FLOAT *)args -> a; + lda = args -> lda; + + if (range_n) { + n = range_n[1] - range_n[0]; + a += range_n[0] * (lda + 1) * COMPSIZE; + } + for (i = 0; i < n; i++) { + + SCAL_K(i + 1, 0, 0, + *(a + (i + i * lda) * COMPSIZE + 0), ZERO, + a + i * lda * COMPSIZE, 1, NULL, 0, NULL, 0); + + if (i < n - 1) { + temp[0] = DOTC_K(n - i - 1, a + (i + (i + 1) * lda) * COMPSIZE, lda, a + (i + (i + 1) * lda) * COMPSIZE, lda); + GET_IMAGE(temp[1]); + + *(a + (i + i * lda) * COMPSIZE + 0) += temp[0]; + *(a + (i + i * lda) * COMPSIZE + 1) = ZERO; + + GEMV_O(i, n - i - 1, 0, dp1, ZERO, + a + ( (i + 1) * lda) * COMPSIZE, lda, + a + (i + (i + 1) * lda) * COMPSIZE, lda, + a + ( i * lda) * COMPSIZE, 1, sb); + } + } + + return 0; +} |