LAPACK
3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
cblas_strmv.c
Go to the documentation of this file.
1
/*
2
*
3
* cblas_strmv.c
4
* This program is a C interface to strmv.
5
* Written by Keita Teranishi
6
* 4/6/1998
7
*
8
*/
9
#include "
cblas.h
"
10
#include "
cblas_f77.h
"
11
void
API_SUFFIX
(
cblas_strmv
)(
const
CBLAS_LAYOUT
layout,
const
CBLAS_UPLO
Uplo,
12
const
CBLAS_TRANSPOSE
TransA,
const
CBLAS_DIAG
Diag,
13
const
CBLAS_INT
N,
const
float
*A,
const
CBLAS_INT
lda,
14
float
*X,
const
CBLAS_INT
incX)
15
16
{
17
char
TA;
18
char
UL;
19
char
DI;
20
#ifdef F77_CHAR
21
F77_CHAR
F77_TA
,
F77_UL
,
F77_DI
;
22
#else
23
#define F77_TA &TA
24
#define F77_UL &UL
25
#define F77_DI &DI
26
#endif
27
#ifdef F77_INT
28
F77_INT
F77_N
=N,
F77_lda
=lda,
F77_incX
=incX;
29
#else
30
#define F77_N N
31
#define F77_lda lda
32
#define F77_incX incX
33
#endif
34
extern
int
CBLAS_CallFromC
;
35
extern
int
RowMajorStrg
;
36
RowMajorStrg
= 0;
37
38
CBLAS_CallFromC
= 1;
39
if
(layout ==
CblasColMajor
)
40
{
41
if
(Uplo ==
CblasUpper
) UL =
'U'
;
42
else
if
(Uplo ==
CblasLower
) UL =
'L'
;
43
else
44
{
45
API_SUFFIX
(
cblas_xerbla
)(2,
"cblas_strmv"
,
"Illegal Uplo setting, %d\n"
, Uplo);
46
CBLAS_CallFromC
= 0;
47
RowMajorStrg
= 0;
48
return
;
49
}
50
if
(TransA ==
CblasNoTrans
) TA =
'N'
;
51
else
if
(TransA ==
CblasTrans
) TA =
'T'
;
52
else
if
(TransA ==
CblasConjTrans
) TA =
'C'
;
53
else
54
{
55
API_SUFFIX
(
cblas_xerbla
)(3,
"cblas_strmv"
,
"Illegal TransA setting, %d\n"
, TransA);
56
CBLAS_CallFromC
= 0;
57
RowMajorStrg
= 0;
58
return
;
59
}
60
if
(Diag ==
CblasUnit
) DI =
'U'
;
61
else
if
(Diag ==
CblasNonUnit
) DI =
'N'
;
62
else
63
{
64
API_SUFFIX
(
cblas_xerbla
)(4,
"cblas_strmv"
,
"Illegal Diag setting, %d\n"
, Diag);
65
CBLAS_CallFromC
= 0;
66
RowMajorStrg
= 0;
67
return
;
68
}
69
#ifdef F77_CHAR
70
F77_UL
= C2F_CHAR(&UL);
71
F77_TA
= C2F_CHAR(&TA);
72
F77_DI
= C2F_CHAR(&DI);
73
#endif
74
F77_strmv
(
F77_UL
,
F77_TA
,
F77_DI
, &
F77_N
, A, &
F77_lda
, X,
75
&
F77_incX
);
76
}
77
else
if
(layout ==
CblasRowMajor
)
78
{
79
RowMajorStrg
= 1;
80
if
(Uplo ==
CblasUpper
) UL =
'L'
;
81
else
if
(Uplo ==
CblasLower
) UL =
'U'
;
82
else
83
{
84
API_SUFFIX
(
cblas_xerbla
)(2,
"cblas_strmv"
,
"Illegal Uplo setting, %d\n"
, Uplo);
85
CBLAS_CallFromC
= 0;
86
RowMajorStrg
= 0;
87
return
;
88
}
89
90
if
(TransA ==
CblasNoTrans
) TA =
'T'
;
91
else
if
(TransA ==
CblasTrans
) TA =
'N'
;
92
else
if
(TransA ==
CblasConjTrans
) TA =
'N'
;
93
else
94
{
95
API_SUFFIX
(
cblas_xerbla
)(3,
"cblas_strmv"
,
"Illegal TransA setting, %d\n"
, TransA);
96
CBLAS_CallFromC
= 0;
97
RowMajorStrg
= 0;
98
return
;
99
}
100
101
if
(Diag ==
CblasUnit
) DI =
'U'
;
102
else
if
(Diag ==
CblasNonUnit
) DI =
'N'
;
103
else
104
{
105
API_SUFFIX
(
cblas_xerbla
)(4,
"cblas_strmv"
,
"Illegal Diag setting, %d\n"
, Diag);
106
CBLAS_CallFromC
= 0;
107
RowMajorStrg
= 0;
108
return
;
109
}
110
#ifdef F77_CHAR
111
F77_UL
= C2F_CHAR(&UL);
112
F77_TA
= C2F_CHAR(&TA);
113
F77_DI
= C2F_CHAR(&DI);
114
#endif
115
F77_strmv
(
F77_UL
,
F77_TA
,
F77_DI
, &
F77_N
, A, &
F77_lda
, X,
116
&
F77_incX
);
117
}
118
else
API_SUFFIX
(
cblas_xerbla
)(1,
"cblas_strmv"
,
"Illegal layout setting, %d\n"
, layout);
119
CBLAS_CallFromC
= 0;
120
RowMajorStrg
= 0;
121
return
;
122
}
CBLAS_UPLO
CBLAS_UPLO
Definition
cblas.h:41
CblasLower
@ CblasLower
Definition
cblas.h:41
CblasUpper
@ CblasUpper
Definition
cblas.h:41
cblas_xerbla
void cblas_xerbla(CBLAS_INT p, const char *rout, const char *form,...)
Definition
cblas_xerbla.c:12
CBLAS_TRANSPOSE
CBLAS_TRANSPOSE
Definition
cblas.h:40
CblasNoTrans
@ CblasNoTrans
Definition
cblas.h:40
CblasTrans
@ CblasTrans
Definition
cblas.h:40
CblasConjTrans
@ CblasConjTrans
Definition
cblas.h:40
CBLAS_LAYOUT
CBLAS_LAYOUT
Definition
cblas.h:39
CblasColMajor
@ CblasColMajor
Definition
cblas.h:39
CblasRowMajor
@ CblasRowMajor
Definition
cblas.h:39
CBLAS_DIAG
CBLAS_DIAG
Definition
cblas.h:42
CblasUnit
@ CblasUnit
Definition
cblas.h:42
CblasNonUnit
@ CblasNonUnit
Definition
cblas.h:42
API_SUFFIX
#define API_SUFFIX(a)
Definition
cblas.h:57
CBLAS_INT
#define CBLAS_INT
Definition
cblas.h:24
cblas.h
F77_INT
#define F77_INT
Definition
cblas_example2_64.c:7
F77_strmv
#define F77_strmv(...)
Definition
cblas_f77.h:316
cblas_f77.h
CBLAS_CallFromC
int CBLAS_CallFromC
Definition
cblas_globals.c:1
RowMajorStrg
int RowMajorStrg
Definition
cblas_globals.c:2
F77_DI
#define F77_DI
F77_incX
#define F77_incX
F77_TA
#define F77_TA
F77_N
#define F77_N
F77_lda
#define F77_lda
F77_UL
#define F77_UL
cblas_strmv
void API_SUFFIX() cblas_strmv(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const CBLAS_INT N, const float *A, const CBLAS_INT lda, float *X, const CBLAS_INT incX)
Definition
cblas_strmv.c:11
CBLAS
src
cblas_strmv.c
Generated on Tue Nov 28 2023 11:55:04 for LAPACK by
1.9.7