v0.8.23
Macros | Functions
cblas_ctrmv.c File Reference
#include "cblas.h"
#include "cblas_f77.h"

Go to the source code of this file.

Macros

#define F77_TA   &TA
 
#define F77_UL   &UL
 
#define F77_DI   &DI
 
#define F77_N   N
 
#define F77_lda   lda
 
#define F77_incX   incX
 

Functions

void cblas_ctrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
 

Macro Definition Documentation

◆ F77_DI

#define F77_DI   &DI

◆ F77_incX

#define F77_incX   incX

◆ F77_lda

#define F77_lda   lda

◆ F77_N

#define F77_N   N

◆ F77_TA

#define F77_TA   &TA

◆ F77_UL

#define F77_UL   &UL

Function Documentation

◆ cblas_ctrmv()

void cblas_ctrmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const void *  A,
const int  lda,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctrmv.c.

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  int n, i=0, tincX;
34  float *st=0,*x=(float *)X;
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasUpper) UL = 'U';
43  else if (Uplo == CblasLower) UL = 'L';
44  else
45  {
46  cblas_xerbla(2, "cblas_ctrmv","Illegal Uplo setting, %d\n", Uplo);
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  if (TransA == CblasNoTrans) TA = 'N';
52  else if (TransA == CblasTrans) TA = 'T';
53  else if (TransA == CblasConjTrans) TA = 'C';
54  else
55  {
56  cblas_xerbla(3, "cblas_ctrmv","Illegal TransA setting, %d\n", TransA);
57  CBLAS_CallFromC = 0;
58  RowMajorStrg = 0;
59  return;
60  }
61  if (Diag == CblasUnit) DI = 'U';
62  else if (Diag == CblasNonUnit) DI = 'N';
63  else
64  {
65  cblas_xerbla(4, "cblas_ctrmv","Illegal Diag setting, %d\n", Diag);
66  CBLAS_CallFromC = 0;
67  RowMajorStrg = 0;
68  return;
69  }
70  #ifdef F77_CHAR
71  F77_UL = C2F_CHAR(&UL);
72  F77_TA = C2F_CHAR(&TA);
73  F77_DI = C2F_CHAR(&DI);
74  #endif
76  &F77_incX);
77  }
78  else if (order == CblasRowMajor)
79  {
80  RowMajorStrg = 1;
81  if (Uplo == CblasUpper) UL = 'L';
82  else if (Uplo == CblasLower) UL = 'U';
83  else
84  {
85  cblas_xerbla(2, "cblas_ctrmv","Illegal Uplo setting, %d\n", Uplo);
86  CBLAS_CallFromC = 0;
87  RowMajorStrg = 0;
88  return;
89  }
90 
91  if (TransA == CblasNoTrans) TA = 'T';
92  else if (TransA == CblasTrans) TA = 'N';
93  else if (TransA == CblasConjTrans)
94  {
95  TA = 'N';
96  if ( N > 0)
97  {
98  if(incX > 0)
99  tincX = incX;
100  else
101  tincX = -incX;
102  i = tincX << 1;
103  n = i * N;
104  st = x + n;
105  do
106  {
107  x[1] = -x[1];
108  x+= i;
109  }
110  while (x != st);
111  x -= n;
112  }
113  }
114  else
115  {
116  cblas_xerbla(3, "cblas_ctrmv","Illegal TransA setting, %d\n", TransA);
117  CBLAS_CallFromC = 0;
118  RowMajorStrg = 0;
119  return;
120  }
121 
122  if (Diag == CblasUnit) DI = 'U';
123  else if (Diag == CblasNonUnit) DI = 'N';
124  else
125  {
126  cblas_xerbla(4, "cblas_ctrmv","Illegal Diag setting, %d\n", Diag);
127  CBLAS_CallFromC = 0;
128  RowMajorStrg = 0;
129  return;
130  }
131  #ifdef F77_CHAR
132  F77_UL = C2F_CHAR(&UL);
133  F77_TA = C2F_CHAR(&TA);
134  F77_DI = C2F_CHAR(&DI);
135  #endif
136  F77_ctrmv( F77_UL, F77_TA, F77_DI, &F77_N, A, &F77_lda, X,
137  &F77_incX);
138  if (TransA == CblasConjTrans)
139  {
140  if (N > 0)
141  {
142  do
143  {
144  x[1] = -x[1];
145  x += i;
146  }
147  while (x != st);
148  }
149  }
150  }
151  else cblas_xerbla(1, "cblas_ctrmv", "Illegal Order setting, %d\n", order);
152  CBLAS_CallFromC = 0;
153  RowMajorStrg = 0;
154  return;
155 }
#define F77_DI
#define F77_incX
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_lda
#define F77_TA
#define F77_UL
void F77_ctrmv(FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT)
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
const int order
approximation order
#define F77_N
int RowMajorStrg
Definition: cblas_globals.c:2