2
* Automatically Tuned Linear Algebra Software v3.2
3
* (C) Copyright 1999 R. Clint Whaley
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions, and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* 3. The name of the University of Tennessee, the ATLAS group,
14
* or the names of its contributers may not be used to endorse
15
* or promote products derived from this software without specific
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE
22
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
* POSSIBILITY OF SUCH DAMAGE.
31
#include "atlas_misc.h"
32
#ifdef ATL_USEPTHREADS
33
#include "atlas_ptalias3.h"
37
void ATL_zsyrk(const enum CBLAS_UPLO Uplo,
38
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
39
const double * alpha, const double *A, const int lda,
40
const double * beta, double *C, const int ldc);
42
void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
43
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
44
const void * alpha, const void *A, const int lda,
45
const void * beta, void *C, const int ldc)
48
enum CBLAS_TRANSPOSE trans;
50
#ifndef NoCblasErrorChecks
52
if (Uplo != CblasUpper && Uplo != CblasLower)
53
info = cblas_errprn(2, info, "UPLO must be %d or %d, but is set to %d",
54
CblasUpper, CblasLower, Uplo);
55
if (N < 0) info = cblas_errprn(4, info,
56
"N cannot be less than zero; it is set to %d.", N);
57
if (K < 0) info = cblas_errprn(5, info,
58
"K cannot be less than zero; it is set to %d.", K);
60
if (Order == CblasColMajor)
62
if (Trans == AtlasNoTrans)
64
if ( (lda < N) || (lda < 1) )
65
info = cblas_errprn(8, info, "lda must be >= MAX(N,1): lda=%d N=%d",
70
if (Trans != AtlasTrans)
71
info = cblas_errprn(3, info,
72
"Trans must be %d, %d or %d, but is set to %d",
73
CblasNoTrans, CblasTrans, CblasConjTrans,Trans);
74
if ( (lda < K) || (lda < 1) )
75
info = cblas_errprn(8, info, "lda must be >= MAX(K,1): lda=%d K=%d",
79
else if (Order == CblasRowMajor)
81
if (Trans == AtlasNoTrans)
83
if ( (lda < K) || (lda < 1) )
84
info = cblas_errprn(8, info, "lda must be >= MAX(K,1): lda=%d K=%d",
89
if (Trans != AtlasTrans)
90
info = cblas_errprn(3, info,
91
"Trans must be %d, %d or %d, but is set to %d",
92
CblasNoTrans, CblasTrans, CblasConjTrans,Trans);
93
if ( (lda < N) || (lda < 1) )
94
info = cblas_errprn(8, info, "lda must be >= MAX(N,1): lda=%d N=%d",
98
else info = cblas_errprn(1, info, "Order must be %d or %d, but is set to %d",
99
CblasRowMajor, CblasColMajor, Order);
100
if ( (ldc < N) || (ldc < 1) )
101
info = cblas_errprn(11, info, "ldc must be >= MAX(N,1): ldc=%d N=%d",
105
cblas_xerbla(info, "cblas_zsyrk", "");
109
if (Order == CblasColMajor)
110
ATL_zsyrk(Uplo, Trans, N, K, alpha, A, lda, beta, C, ldc);
113
if (Uplo == CblasUpper) uplo = CblasLower;
114
else uplo = CblasUpper;
115
if (Trans == CblasNoTrans) trans = CblasTrans;
116
else trans = CblasNoTrans;
117
ATL_zsyrk(uplo, trans, N, K, alpha, A, lda, beta, C, ldc);