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
* -- 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_rblas3.h"
54
#include "atlas_kernel3.h"
55
#include "atlas_lvl3.h"
61
void Mjoin( PATL, herk )
63
const enum ATLAS_UPLO UPLO,
64
const enum ATLAS_TRANS TRANS,
79
* Mjoin( PATL, herk ) performs one of the @(syhe_comm) rank k operations
81
* C := alpha * A * conjg( A' ) + beta * C,
85
* C := alpha * conjg( A' ) * A + beta * C,
87
* where alpha and beta are real scalars, C is an n by n @(syhe_comm) ma-
88
* trix and A is an n by k matrix in the first case and a k by n matrix
91
* This is a recursive version of the algorithm. For a more detailed
92
* description of the arguments of this function, see the reference im-
93
* plementation in the ATLAS/src/blas/reference directory.
95
* ---------------------------------------------------------------------
98
* .. Local Variables ..
100
TYPE Calph[2], Cbeta[2];
101
RC3_FUN_HERK_T ATL_rherk;
104
* .. Executable Statements ..
108
( ( ( ALPHA == ATL_rzero ) || ( K == 0 ) ) && ( BETA == ATL_rone ) ) )
111
if( ( ALPHA == ATL_rzero ) || ( K == 0 ) )
112
{ Mjoin( PATL, hescal )( UPLO, N, N, BETA, C, LDC ); return; }
114
type.size = sizeof( TYPE[2] );
115
*Calph = ALPHA; Calph[1] = ATL_rzero;
116
*Cbeta = BETA; Cbeta[1] = ATL_rzero;
118
if( TRANS == AtlasNoTrans )
120
type.Tgemm = Mjoin( PATL, gemmNC_RB );
121
if( UPLO == AtlasUpper )
122
{ type.Therk = Mjoin( PATL, herkUN ); ATL_rherk = ATL_rherkUN; }
124
{ type.Therk = Mjoin( PATL, herkLN ); ATL_rherk = ATL_rherkLN; }
128
type.Tgemm = Mjoin( PATL, gemmCN_RB );
129
if( UPLO == AtlasUpper )
130
{ type.Therk = Mjoin( PATL, herkUC ); ATL_rherk = ATL_rherkUC; }
132
{ type.Therk = Mjoin( PATL, herkLC ); ATL_rherk = ATL_rherkLC; }
135
ATL_rherk( &type, N, K, (void *)(Calph), (void *)(A), LDA, (void *)(Cbeta),
136
(void *)(C), LDC, HERK_NB );
138
* End of Mjoin( PATL, herk )