49 void G_math_d_aA_B(
double **A,
double **B,
double a,
double **C,
int rows,
56 #pragma omp for schedule(static) private(i, j)
57 for (i = rows - 1; i >= 0; i--)
58 for (j = cols - 1; j >= 0; j--)
59 C[i][j] = a * A[i][j];
66 #pragma omp for schedule(static) private(i, j)
67 for (i = rows - 1; i >= 0; i--)
68 for (j = cols - 1; j >= 0; j--)
69 C[i][j] = A[i][j] + B[i][j];
72 #pragma omp for schedule(static) private(i, j)
73 for (i = rows - 1; i >= 0; i--)
74 for (j = cols - 1; j >= 0; j--)
75 C[i][j] = B[i][j] - A[i][j];
78 #pragma omp for schedule(static) private(i, j)
79 for (i = rows - 1; i >= 0; i--)
80 for (j = cols - 1; j >= 0; j--)
81 C[i][j] = a * A[i][j] + B[i][j];
112 void G_math_f_aA_B(
float **A,
float **B,
float a,
float **C,
int rows,
int cols)
118 #pragma omp for schedule(static) private(i, j)
119 for (i = rows - 1; i >= 0; i--)
120 for (j = cols - 1; j >= 0; j--)
121 C[i][j] = a * A[i][j];
127 #pragma omp for schedule(static) private(i, j)
128 for (i = rows - 1; i >= 0; i--)
129 for (j = cols - 1; j >= 0; j--)
130 C[i][j] = A[i][j] + B[i][j];
132 else if (a == -1.0) {
133 #pragma omp for schedule(static) private(i, j)
134 for (i = rows - 1; i >= 0; i--)
135 for (j = cols - 1; j >= 0; j--)
136 C[i][j] = B[i][j] - A[i][j];
139 #pragma omp for schedule(static) private(i, j)
140 for (i = rows - 1; i >= 0; i--)
141 for (j = cols - 1; j >= 0; j--)
142 C[i][j] = a * A[i][j] + B[i][j];
172 void G_math_d_AB(
double **A,
double **B,
double **C,
int rows_A,
int cols_A,
177 #pragma omp for schedule(static) private(i, j, k)
178 for (i = 0; i < rows_A; i++) {
179 for (j = 0; j < cols_B; j++) {
181 for (k = cols_A - 1; k >= 0; k--) {
182 C[i][j] += A[i][k] * B[k][j];
214 void G_math_f_AB(
float **A,
float **B,
float **C,
int rows_A,
int cols_A,
219 #pragma omp for schedule(static) private(i, j, k)
220 for (i = 0; i < rows_A; i++) {
221 for (j = 0; j < cols_B; j++) {
223 for (k = cols_A - 1; k >= 0; k--) {
224 C[i][j] += A[i][k] * B[k][j];
void G_math_f_aA_B(float **A, float **B, float a, float **C, int rows, int cols)
Add two matrices and scale matrix A with the scalar a.
void G_math_f_AB(float **A, float **B, float **C, int rows_A, int cols_A, int cols_B)
Matrix multiplication.
void G_math_d_aA_B(double **A, double **B, double a, double **C, int rows, int cols)
Add two matrices and scale matrix A with the scalar a.
void G_math_d_AB(double **A, double **B, double **C, int rows_A, int cols_A, int cols_B)
Matrix multiplication.