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