~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to src/testing/ATL_f77herk.c

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-04-13 10:07:52 UTC
  • Revision ID: james.westby@ubuntu.com-20020413100752-va9zm0rd4gpurdkq
Tags: upstream-3.2.1ln
ImportĀ upstreamĀ versionĀ 3.2.1ln

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *             Automatically Tuned Linear Algebra Software v3.2
 
3
 *                   (C) Copyright 1999 Antoine P. Petitet                   
 
4
 *
 
5
 * Code contributers : Antoine P. Petitet, R. Clint Whaley
 
6
 *
 
7
 * Redistribution and use in source and binary forms, with or without
 
8
 * modification, are permitted provided that the following conditions
 
9
 * are met:
 
10
 *   1. Redistributions of source code must retain the above copyright
 
11
 *      notice, this list of conditions and the following disclaimer.
 
12
 *   2. Redistributions in binary form must reproduce the above copyright
 
13
 *      notice, this list of conditions, and the following disclaimer in the
 
14
 *      documentation and/or other materials provided with the distribution.
 
15
 *   3. The name of the University of Tennessee, the ATLAS group,
 
16
 *      or the names of its contributers may not be used to endorse
 
17
 *      or promote products derived from this software without specific
 
18
 *      written permission.
 
19
 *
 
20
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 
21
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 
22
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
23
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE
 
24
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 
25
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 
26
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
27
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 
28
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 
29
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
30
 * POSSIBILITY OF SUCH DAMAGE. 
 
31
 *
 
32
 */
 
33
#include "atlas_misc.h"
 
34
#include "atlas_tst.h"
 
35
#include "atlas_f77blas.h"
 
36
 
 
37
void Mjoin( PATL, f77herk )
 
38
(
 
39
   const enum ATLAS_UPLO     UPLO,
 
40
   const enum ATLAS_TRANS    TRANS,
 
41
   const int                 N,
 
42
   const int                 K,
 
43
   const TYPE                ALPHA,
 
44
   const TYPE                * A,
 
45
   const int                 LDA,
 
46
   const TYPE                BETA,
 
47
   TYPE                      * C,
 
48
   const int                 LDC
 
49
)
 
50
{
 
51
#if defined( StringSunStyle )
 
52
   #if defined( ATL_FunkyInts )
 
53
   F77_INTEGER               ONE = 1;
 
54
   #else
 
55
   int                       ONE = 1;
 
56
   #endif
 
57
#elif defined( StringStructVal ) || defined( StringStructPtr )
 
58
   F77_CHAR                  fuplo;
 
59
   F77_CHAR                  ftran;
 
60
#elif defined( StringCrayStyle )
 
61
   F77_CHAR                  fuplo;
 
62
   F77_CHAR                  ftran;
 
63
#endif
 
64
 
 
65
   char                      cuplo, ctran;
 
66
 
 
67
#ifdef ATL_FunkyInts
 
68
   const F77_INTEGER         F77N   = N,   F77K   = K,
 
69
                             F77lda = LDA, F77ldc = LDC;
 
70
#else
 
71
   #define F77N              N
 
72
   #define F77K              K
 
73
   #define F77lda            LDA
 
74
   #define F77ldc            LDC
 
75
#endif
 
76
 
 
77
   TYPE                      alpha = ALPHA, beta = BETA;
 
78
 
 
79
   if(      UPLO  == AtlasLower   ) cuplo = 'L';
 
80
   else                             cuplo = 'U';
 
81
 
 
82
   if(      TRANS == AtlasNoTrans ) ctran = 'N';
 
83
   else                             ctran = 'C';
 
84
 
 
85
#if   defined( StringSunStyle  )
 
86
   F77herk( &cuplo, &ctran, &F77N, &F77K, &alpha,     A, &F77lda,
 
87
            &beta,     C, &F77ldc, ONE, ONE );
 
88
#elif defined( StringCrayStyle )
 
89
   fuplo = ATL_C2F_TransChar( cuplo );
 
90
   ftran = ATL_C2F_TransChar( ctran );
 
91
   F77herk( fuplo,  ftran,  &F77N, &F77K, &alpha,     A, &F77lda,
 
92
            &beta,     C, &F77ldc );
 
93
#elif defined( StringStructVal )
 
94
   fuplo.len = 1; fuplo.cp = &cuplo;
 
95
   ftran.len = 1; ftran.cp = &ctran;
 
96
   F77herk( fuplo,  ftran,  &F77N, &F77K, &alpha,     A, &F77lda,
 
97
            &beta,     C, &F77ldc );
 
98
#elif defined( StringStructPtr )
 
99
   fuplo.len = 1; fuplo.cp = &cuplo;
 
100
   ftran.len = 1; ftran.cp = &ctran;
 
101
   F77herk( &fuplo, &ftran, &F77N, &F77K, &alpha,     A, &F77lda,
 
102
            &beta,     C, &F77ldc );
 
103
#else
 
104
   (void) fprintf( stderr, "\n\nF77/C interface not defined!!\n\n" );
 
105
   exit( -1 );
 
106
#endif
 
107
}