1
/* ---------------------------------------------------------------------
3
* -- Automatically Tuned Linear Algebra Software (ATLAS)
4
* (C) Copyright 2000 All Rights Reserved
6
* -- ATLAS routine -- Version 3.2 -- December 25, 2000
8
* Author : Antoine P. Petitet
9
* Originally developed at the University of Tennessee,
10
* Innovative Computing Laboratory, Knoxville TN, 37996-1301, USA.
12
* ---------------------------------------------------------------------
14
* -- Copyright notice and Licensing terms:
16
* Redistribution and use in source and binary forms, with or without
17
* modification, are permitted provided that the following conditions
20
* 1. Redistributions of source code must retain the above copyright
21
* notice, this list of conditions and the following disclaimer.
22
* 2. Redistributions in binary form must reproduce the above copyright
23
* notice, this list of conditions, and the following disclaimer in
24
* the documentation and/or other materials provided with the distri-
26
* 3. The name of the University, the ATLAS group, or the names of its
27
* contributors may not be used to endorse or promote products deri-
28
* ved from this software without specific written permission.
32
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
36
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
37
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
38
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
40
* RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN-
41
* CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
42
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
* ---------------------------------------------------------------------
49
#include "atlas_misc.h"
52
#include "atlas_level1.h"
53
#include "atlas_kernel2.h"
54
#include "atlas_reflvl2.h"
55
#include "atlas_lvl2.h"
57
void Mjoin( PATL, tbmvUH )
59
const enum ATLAS_DIAG DIAG,
60
const int N, /* N > 0 assumed */
71
* Mjoin( PATL, tbmvUH ) performs the following matrix-vector operation
73
* x := conjg( A' ) * x,
75
* where x is an n-element vector and A is an n by n unit or non-unit,
76
* upper triangular band matrix.
78
* This is a blocked version of the algorithm. For a more detailed des-
79
* cription of the arguments of this function, see the reference imple-
80
* mentation in the ATLAS/src/blas/reference directory.
82
* ---------------------------------------------------------------------
85
* .. Local Variables ..
87
void (*tbmv0)( const int, const int, const TYPE *,
93
TYPE one[2] = { ATL_rone, ATL_rzero };
94
const int lda2 = ( LDA SHIFT );
96
int ia, ian, j, kl, ku, m1, ma, mb, mb1, na, nb;
97
#define gbmv0 Mjoin( PATL, gbmvC_a1_x1_b1_y1 )
99
* .. Executable Statements ..
102
ATL_GetPartMVT( A, LDA, &mb, &nb );
104
if( DIAG == AtlasNonUnit ) tbmv0 = Mjoin( PATL, tbmvUHN );
105
else tbmv0 = Mjoin( PATL, tbmvUHU );
107
mb1 = N - ( m1 = ( ( N - 1 ) / mb ) * mb );
109
tbmv0( mb1, K, A+m1*lda2, LDA, X+(m1 SHIFT) );
111
for( j = m1 - mb; j >= 0; j -= mb )
113
ian = j + mb; ia = mb - K; ia = j + Mmax( ia, 0 ); ma = ian - ia;
114
na = N - ian; na = Mmin( na, K ); kl = ma - 1; kl = Mmax( kl, 0 );
115
ku = K - 1 - kl; ku = Mmax( ku, 0 );
116
gbmv0( na, ma, kl, ku, one, A+ian*lda2, LDA, X+(ia SHIFT), 1, one,
118
tbmv0( mb, K, A+j*lda2, LDA, X+(j SHIFT) );
121
* End of Mjoin( PATL, tbmvUH )