1
/* ---------------------------------------------------------------------
3
* -- Automatically Tuned Linear Algebra Software (ATLAS)
4
* (C) Copyright 2000 All Rights Reserved
6
* -- ATLAS routine -- Version 3.0 -- April 1, 2000
8
* -- Suggestions, comments, bugs reports should be sent to the follo-
9
* wing e-mail address: atlas@cs.utk.edu
11
* Author : Antoine P. Petitet
12
* Contributor(s) : R. Clint Whaley
13
* University of Tennessee - Innovative Computing Laboratory
14
* Knoxville TN, 37996-1301, USA.
16
* ---------------------------------------------------------------------
18
* -- Copyright notice and Licensing terms:
20
* Redistribution and use in source and binary forms, with or without
21
* modification, are permitted provided that the following conditions
24
* 1. Redistributions of source code must retain the above copyright
25
* notice, this list of conditions and the following disclaimer.
26
* 2. Redistributions in binary form must reproduce the above copyright
27
* notice, this list of conditions, and the following disclaimer in
28
* the documentation and/or other materials provided with the distri-
30
* 3. The name of the University, the ATLAS group, or the names of its
31
* contributors may not be used to endorse or promote products deri-
32
* ved from this software without specific written permission.
36
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
37
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
38
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
39
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
40
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
41
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
42
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
43
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
44
* RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN-
45
* CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
46
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48
* ---------------------------------------------------------------------
53
#include "atlas_misc.h"
56
#include "atlas_level1.h"
57
#include "atlas_kernel2.h"
58
#include "atlas_reflvl2.h"
59
#include "atlas_lvl2.h"
62
#define MinN_tbsvLNU 16
64
#define MinN_tbsvLNU 8
67
void Mjoin( PATL, tbsvLNU )
80
* Mjoin( PATL, tbsvLNU ) solves the following triangular system of equations
84
* where b and x are n-element vectors and A is an n by n unit, lower
85
* triangular band matrix, with ( k + 1 ) diagonals.
87
* No test for singularity or near-singularity is included in this
88
* routine. Such tests must be performed before calling this routine.
90
* This is a recursive version of the algorithm. For a more detailed
91
* description of the arguments of this function, see the reference im-
92
* plementation in the ATLAS/src/blas/reference directory.
94
* ---------------------------------------------------------------------
97
* .. Local Variables ..
100
#define none ATL_rnone
104
const TYPE none[2] = { ATL_rnone, ATL_rzero },
105
one [2] = { ATL_rone, ATL_rzero };
106
const int lda2 = ( LDA << 1 );
108
int ja, kl, ku, ma, na, n1, n1s, n2;
110
* .. Executable Statements ..
113
if( N <= MinN_tbsvLNU )
114
{ Mjoin( PATL, reftbsvLNU )( N, K, A, LDA, X, 1 ); }
117
n2 = N - ( n1 = ( N >> 1 ) ); n1s = (n1 SHIFT);
118
Mjoin( PATL, tbsvLNU )( n1, K, A, LDA, X );
119
ja = n1 - K; ja = Mmax( ja, 0 ); ma = Mmin( n2, K );
120
ku = na = n1 - ja; kl = K - ku; kl = Mmax( kl, 0 );
121
Mjoin( PATL, gbmv )( AtlasNoTrans, ma, na, kl, ku, none, A+ja*lda2, LDA,
122
X+(ja SHIFT), 1, one, X+n1s, 1 );
123
Mjoin( PATL, tbsvLNU )( n2, K, A+n1*lda2, LDA, X+n1s );
126
* End of Mjoin( PATL, tbsvLNU )