38 extern "C" void dgemm_ (
const char *TRANSA,
const char *TRANSB,
39 const unsigned long *
M,
const unsigned long *
N,
const unsigned long *K,
40 const double *ALPHA,
const double *
A,
const unsigned long *LDA,
const double *B,
const unsigned long *LDB,
41 const double *BETA,
double *C,
const unsigned long *LDC)
46 for (k = 0; k < *
N; k++)
47 for (j = 0; j < *
M; j++)
50 for (k = 0; k < *
N; k++)
51 for (j = 0; j < *
M; j++)
52 C[j+(*LDC)*k] = -C[j+(*LDC)*k];
54 for (k = 0; k < *
N; k++)
55 for (j = 0; j < *
M; j++)
56 C[j+(*LDC)*k] *= *BETA;
60 for (k = 0; k < *
N; k++)
61 for (j = 0; j < *
M; j++)
62 for (i = 0; i < *K; i++)
63 C[j+(*LDC)*k] += A[j+(*LDA)*i] * B[i+(*LDB)*k];
65 for (k = 0; k < *
N; k++)
66 for (j = 0; j < *
M; j++)
67 for (i = 0; i < *K; i++)
68 C[j+(*LDC)*k] -= A[j+(*LDA)*i] * B[i+(*LDB)*k];
70 for (k = 0; k < *
N; k++)
71 for (j = 0; j < *
M; j++)
72 for (i = 0; i < *K; i++)
73 C[j+(*LDC)*k] += *ALPHA * A[j+(*LDA)*i] * B[i+(*LDB)*k];
76 for (k = 0; k < *
N; k++)
77 for (j = 0; j < *
M; j++)
78 for (i = 0; i < *K; i++)
79 C[j+(*LDC)*k] += A[i+(*LDA)*j] * B[i+(*LDB)*k];
81 for (k = 0; k < *
N; k++)
82 for (j = 0; j < *
M; j++)
83 for (i = 0; i < *K; i++)
84 C[j+(*LDC)*k] -= A[i+(*LDA)*j] * B[i+(*LDB)*k];
86 for (k = 0; k < *
N; k++)
87 for (j = 0; j < *
M; j++)
88 for (i = 0; i < *K; i++)
89 C[j+(*LDC)*k] += *ALPHA * A[i+(*LDA)*j] * B[i+(*LDB)*k];
92 extern "C" void sgemm_ (
const char *TRANSA,
const char *TRANSB,
93 const unsigned long *
M,
const unsigned long *
N,
const unsigned long *K,
94 const float *ALPHA,
const float *
A,
const unsigned long *LDA,
const float *B,
const unsigned long *LDB,
95 const float *BETA,
float *C,
const unsigned long *LDC)
100 for (k = 0; k < *
N; k++)
101 for (j = 0; j < *
M; j++)
104 for (k = 0; k < *
N; k++)
105 for (j = 0; j < *
M; j++)
106 C[j+(*LDC)*k] = -C[j+(*LDC)*k];
108 for (k = 0; k < *
N; k++)
109 for (j = 0; j < *
M; j++)
110 C[j+(*LDC)*k] *= *BETA;
112 if (TRANSA[0] ==
'N')
114 for (k = 0; k < *
N; k++)
115 for (j = 0; j < *
M; j++)
116 for (i = 0; i < *K; i++)
117 C[j+(*LDC)*k] += A[j+(*LDA)*i] * B[i+(*LDB)*k];
119 for (k = 0; k < *
N; k++)
120 for (j = 0; j < *
M; j++)
121 for (i = 0; i < *K; i++)
122 C[j+(*LDC)*k] -= A[j+(*LDA)*i] * B[i+(*LDB)*k];
124 for (k = 0; k < *
N; k++)
125 for (j = 0; j < *
M; j++)
126 for (i = 0; i < *K; i++)
127 C[j+(*LDC)*k] += *ALPHA * A[j+(*LDA)*i] * B[i+(*LDB)*k];
130 for (k = 0; k < *
N; k++)
131 for (j = 0; j < *
M; j++)
132 for (i = 0; i < *K; i++)
133 C[j+(*LDC)*k] += A[i+(*LDA)*j] * B[i+(*LDB)*k];
135 for (k = 0; k < *
N; k++)
136 for (j = 0; j < *
M; j++)
137 for (i = 0; i < *K; i++)
138 C[j+(*LDC)*k] -= A[i+(*LDA)*j] * B[i+(*LDB)*k];
140 for (k = 0; k < *
N; k++)
141 for (j = 0; j < *
M; j++)
142 for (i = 0; i < *K; i++)
143 C[j+(*LDC)*k] += *ALPHA * A[i+(*LDA)*j] * B[i+(*LDB)*k];
#define USING_NAMESPACE_QPOASES
void sgemm_(const char *TRANSA, const char *TRANSB, const unsigned long *M, const unsigned long *N, const unsigned long *K, const float *ALPHA, const float *A, const unsigned long *LDA, const float *B, const unsigned long *LDB, const float *BETA, float *C, const unsigned long *LDC)
bool isExactlyMinusOne(real_t a)
BEGIN_NAMESPACE_QPOASES bool isExactlyOne(real_t a)
USING_NAMESPACE_QPOASES void dgemm_(const char *TRANSA, const char *TRANSB, const unsigned long *M, const unsigned long *N, const unsigned long *K, const double *ALPHA, const double *A, const unsigned long *LDA, const double *B, const unsigned long *LDB, const double *BETA, double *C, const unsigned long *LDC)
bool isExactlyZero(real_t a)