LAPACK  3.10.1
LAPACK: Linear Algebra PACKage
cblas_ssymm.c
Go to the documentation of this file.
1 /*
2  *
3  * cblas_ssymm.c
4  * This program is a C interface to ssymm.
5  * Written by Keita Teranishi
6  * 4/8/1998
7  *
8  */
9 
10 #include "cblas.h"
11 #include "cblas_f77.h"
12 void cblas_ssymm(const CBLAS_LAYOUT layout, const CBLAS_SIDE Side,
13  const CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N,
14  const float alpha, const float *A, const CBLAS_INT lda,
15  const float *B, const CBLAS_INT ldb, const float beta,
16  float *C, const CBLAS_INT ldc)
17 {
18  char SD, UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_SD, F77_UL;
21 #else
22  #define F77_SD &SD
23  #define F77_UL &UL
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_M M
31  #define F77_N N
32  #define F77_lda lda
33  #define F77_ldb ldb
34  #define F77_ldc ldc
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( layout == CblasColMajor )
43  {
44  if( Side == CblasRight) SD='R';
45  else if ( Side == CblasLeft ) SD='L';
46  else
47  {
48  cblas_xerbla(2, "cblas_ssymm",
49  "Illegal Side setting, %d\n", Side);
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54 
55  if( Uplo == CblasUpper) UL='U';
56  else if ( Uplo == CblasLower ) UL='L';
57  else
58  {
59  cblas_xerbla(3, "cblas_ssymm",
60  "Illegal Uplo setting, %d\n", Uplo);
61  CBLAS_CallFromC = 0;
62  RowMajorStrg = 0;
63  return;
64  }
65 
66  #ifdef F77_CHAR
67  F77_UL = C2F_CHAR(&UL);
68  F77_SD = C2F_CHAR(&SD);
69  #endif
70 
71  F77_ssymm(F77_SD, F77_UL, &F77_M, &F77_N, &alpha, A, &F77_lda, B, &F77_ldb, &beta, C, &F77_ldc);
72  } else if (layout == CblasRowMajor)
73  {
74  RowMajorStrg = 1;
75  if( Side == CblasRight) SD='L';
76  else if ( Side == CblasLeft ) SD='R';
77  else
78  {
79  cblas_xerbla(2, "cblas_ssymm",
80  "Illegal Side setting, %d\n", Side);
81  CBLAS_CallFromC = 0;
82  RowMajorStrg = 0;
83  return;
84  }
85 
86  if( Uplo == CblasUpper) UL='L';
87  else if ( Uplo == CblasLower ) UL='U';
88  else
89  {
90  cblas_xerbla(3, "cblas_ssymm",
91  "Illegal Uplo setting, %d\n", Uplo);
92  CBLAS_CallFromC = 0;
93  RowMajorStrg = 0;
94  return;
95  }
96 
97  #ifdef F77_CHAR
98  F77_UL = C2F_CHAR(&UL);
99  F77_SD = C2F_CHAR(&SD);
100  #endif
101 
102  F77_ssymm(F77_SD, F77_UL, &F77_N, &F77_M, &alpha, A, &F77_lda, B, &F77_ldb, &beta, C, &F77_ldc);
103  } else cblas_xerbla(1, "cblas_ssymm",
104  "Illegal layout setting, %d\n", layout);
105  CBLAS_CallFromC = 0;
106  RowMajorStrg = 0;
107  return;
108 }
void F77_ssymm(int *layout, char *rtlf, char *uplow, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc)
Definition: c_sblas3.c:73
CBLAS_UPLO
Definition: cblas.h:29
@ CblasLower
Definition: cblas.h:29
@ CblasUpper
Definition: cblas.h:29
void cblas_xerbla(CBLAS_INT p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:12
CBLAS_SIDE
Definition: cblas.h:31
@ CblasRight
Definition: cblas.h:31
@ CblasLeft
Definition: cblas.h:31
CBLAS_LAYOUT
Definition: cblas.h:27
@ CblasColMajor
Definition: cblas.h:27
@ CblasRowMajor
Definition: cblas.h:27
#define CBLAS_INT
Definition: cblas.h:23
#define F77_INT
Definition: cblas_f77.h:32
int CBLAS_CallFromC
Definition: cblas_globals.c:1
int RowMajorStrg
Definition: cblas_globals.c:2
#define F77_ldc
#define F77_ldb
#define F77_N
#define F77_SD
#define F77_lda
#define F77_UL
#define F77_M
void cblas_ssymm(const CBLAS_LAYOUT layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *A, const CBLAS_INT lda, const float *B, const CBLAS_INT ldb, const float beta, float *C, const CBLAS_INT ldc)
Definition: cblas_ssymm.c:12
#define N
Definition: example_user.c:10