27 #define EPSILON 0.00000000000000001 53 #pragma omp for schedule (static) private(i, j, tmp) 54 for (i = 0; i <
rows; i++) {
56 for (j = cols - 1; j >= 0; j--) {
57 tmp += A[i][j] * x[j];
87 #pragma omp for schedule (static) private(i, j, tmp) 88 for (i = 0; i <
rows; i++) {
90 for (j = cols - 1; j >= 0; j--) {
91 tmp += A[i][j] * x[j];
119 #pragma omp for schedule (static) private(i, j) 120 for (i = 0; i <
rows; i++) {
121 for (j = cols - 1; j >= 0; j--) {
122 A[i][j] = x[i] * y[j];
149 #pragma omp for schedule (static) private(i, j) 150 for (i = 0; i <
rows; i++) {
151 for (j = cols - 1; j >= 0; j--) {
152 A[i][j] = x[i] * y[j];
188 #pragma omp for schedule (static) private(i, j, tmp) 189 for (i = 0; i <
rows; i++) {
191 for (j = cols - 1; j >= 0; j--) {
192 tmp += A[i][j] * x[j] + y[j];
197 else if (b == -1.0) {
198 #pragma omp for schedule (static) private(i, j, tmp) 199 for (i = 0; i <
rows; i++) {
201 for (j = cols - 1; j >= 0; j--) {
202 tmp += a * A[i][j] * x[j] - y[j];
208 #pragma omp for schedule (static) private(i, j, tmp) 209 for (i = 0; i <
rows; i++) {
211 for (j = cols - 1; j >= 0; j--) {
212 tmp += A[i][j] * x[j];
217 else if (a == -1.0) {
218 #pragma omp for schedule (static) private(i, j, tmp) 219 for (i = 0; i <
rows; i++) {
221 for (j = cols - 1; j >= 0; j--) {
222 tmp += b * y[j] - A[i][j] * x[j];
228 #pragma omp for schedule (static) private(i, j, tmp) 229 for (i = 0; i <
rows; i++) {
231 for (j = cols - 1; j >= 0; j--) {
232 tmp += a * A[i][j] * x[j] + b * y[j];
270 #pragma omp for schedule (static) private(i, j, tmp) 271 for (i = 0; i <
rows; i++) {
273 for (j = cols - 1; j >= 0; j--) {
274 tmp += A[i][j] * x[j] + y[j];
279 else if (b == -1.0) {
280 #pragma omp for schedule (static) private(i, j, tmp) 281 for (i = 0; i <
rows; i++) {
283 for (j = cols - 1; j >= 0; j--) {
284 tmp += a * A[i][j] * x[j] - y[j];
290 #pragma omp for schedule (static) private(i, j, tmp) 291 for (i = 0; i <
rows; i++) {
293 for (j = cols - 1; j >= 0; j--) {
294 tmp += A[i][j] * x[j];
299 else if (a == -1.0) {
300 #pragma omp for schedule (static) private(i, j, tmp) 301 for (i = 0; i <
rows; i++) {
303 for (j = cols - 1; j >= 0; j--) {
304 tmp += b * y[j] - A[i][j] * x[j];
310 #pragma omp for schedule (static) private(i, j, tmp) 311 for (i = 0; i <
rows; i++) {
313 for (j = cols - 1; j >= 0; j--) {
314 tmp += a * A[i][j] * x[j] + b * y[j];
345 #pragma omp for schedule (static) private(i, j, tmp) 346 for (i = 0; i <
rows; i++)
347 for (j = 0; j < i; j++) {
378 #pragma omp for schedule (static) private(i, j, tmp) 379 for (i = 0; i <
rows; i++)
380 for (j = 0; j < i; j++) {
int G_math_d_A_T(double **A, int rows)
Compute the transposition of matrix A. Matrix A will be overwritten.
void G_math_d_Ax(double **A, double *x, double *y, int rows, int cols)
Compute the matrix - vector product of matrix A and vector x.
int G_math_f_A_T(float **A, int rows)
Compute the transposition of matrix A. Matrix A will be overwritten.
void G_math_d_x_dyad_y(double *x, double *y, double **A, int rows, int cols)
Compute the dyadic product of two vectors. The result is stored in the matrix A.
void G_math_d_aAx_by(double **A, double *x, double *y, double a, double b, double *z, int rows, int cols)
Compute the scaled matrix - vector product of matrix double **A and vector x and y.
void G_math_f_Ax(float **A, float *x, float *y, int rows, int cols)
Compute the matrix - vector product of matrix A and vector x.
void G_math_f_x_dyad_y(float *x, float *y, float **A, int rows, int cols)
Compute the dyadic product of two vectors. The result is stored in the matrix A.
void G_math_f_aAx_by(float **A, float *x, float *y, float a, float b, float *z, int rows, int cols)
Compute the scaled matrix - vector product of matrix A and vectors x and y.