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