54 #pragma omp parallel for schedule (static) reduction(+:s) 55 for (i = rows - 1; i >= 0; i--) {
86 #pragma omp parallel for schedule (static) reduction(+:s) 87 for (i = rows - 1; i >= 0; i--) {
118 #pragma omp parallel for schedule (static) reduction(+:s) 119 for (i = rows - 1; i >= 0; i--) {
148 max = fabs(x[rows - 1]);
149 for (i = rows - 2; i >= 0; i--) {
150 if (max < fabs(x[i]))
180 #pragma omp for schedule (static) 181 for (i = rows - 1; i >= 0; i--) {
185 else if ((a == 1.0) && (b == 1.0)) {
186 #pragma omp for schedule (static) 187 for (i = rows - 1; i >= 0; i--) {
191 else if ((a == 1.0) && (b == -1.0)) {
192 #pragma omp for schedule (static) 193 for (i = rows - 1; i >= 0; i--) {
198 #pragma omp for schedule (static) 199 for (i = rows - 1; i >= 0; i--) {
200 z[i] = a * (x[i] + y[i]);
203 else if (b == -1.0) {
204 #pragma omp for schedule (static) 205 for (i = rows - 1; i >= 0; i--) {
206 z[i] = a * x[i] - y[i];
210 #pragma omp for schedule (static) 211 for (i = rows - 1; i >= 0; i--) {
212 z[i] = a * x[i] + y[i];
216 #pragma omp for schedule (static) 217 for (i = rows - 1; i >= 0; i--) {
218 z[i] = a * x[i] + b * y[i];
239 y = memcpy(y, x, rows *
sizeof(
double));
270 #pragma omp parallel for schedule (static) reduction(+:s) 271 for (i = rows - 1; i >= 0; i--) {
302 #pragma omp parallel for schedule (static) reduction(+:s) 303 for (i = rows - 1; i >= 0; i--) {
336 #pragma omp parallel for schedule (static) private(i) reduction(+:s, count) 337 for (i = 0; i <
rows; i++) {
367 max = fabs(x[rows - 1]);
368 for (i = rows - 2; i >= 0; i--) {
369 if (max < fabs(x[i]))
398 #pragma omp for schedule (static) 399 for (i = rows - 1; i >= 0; i--) {
403 else if ((a == 1.0) && (b == 1.0)) {
404 #pragma omp for schedule (static) 405 for (i = rows - 1; i >= 0; i--) {
409 else if ((a == 1.0) && (b == -1.0)) {
410 #pragma omp for schedule (static) 411 for (i = rows - 1; i >= 0; i--) {
416 #pragma omp for schedule (static) 417 for (i = rows - 1; i >= 0; i--) {
418 z[i] = a * (x[i] + y[i]);
421 else if (b == -1.0) {
422 #pragma omp for schedule (static) 423 for (i = rows - 1; i >= 0; i--) {
424 z[i] = a * x[i] - y[i];
428 #pragma omp for schedule (static) 429 for (i = rows - 1; i >= 0; i--) {
430 z[i] = a * x[i] + y[i];
434 #pragma omp for schedule (static) 435 for (i = rows - 1; i >= 0; i--) {
436 z[i] = a * x[i] + b * y[i];
457 y = memcpy(y, x, rows *
sizeof(
float));
488 #pragma omp parallel for schedule (static) reduction(+:s) 489 for (i = rows - 1; i >= 0; i--) {
520 #pragma omp parallel for schedule (static) reduction(+:s) 521 for (i = rows - 1; i >= 0; i--) {
552 #pragma omp parallel for schedule (static) reduction(+:s) 553 for (i = rows - 1; i >= 0; i--) {
554 s += (double)abs(x[i]);
582 max = abs(x[rows - 1]);
583 for (i = rows - 2; i >= 0; i--) {
613 #pragma omp for schedule (static) 614 for (i = rows - 1; i >= 0; i--) {
618 else if ((a == 1.0) && (b == 1.0)) {
619 #pragma omp for schedule (static) 620 for (i = rows - 1; i >= 0; i--) {
624 else if ((a == 1.0) && (b == -1.0)) {
625 #pragma omp for schedule (static) 626 for (i = rows - 1; i >= 0; i--) {
631 #pragma omp for schedule (static) 632 for (i = rows - 1; i >= 0; i--) {
633 z[i] = a * (x[i] + y[i]);
636 else if (b == -1.0) {
637 #pragma omp for schedule (static) 638 for (i = rows - 1; i >= 0; i--) {
639 z[i] = a * x[i] - y[i];
643 #pragma omp for schedule (static) 644 for (i = rows - 1; i >= 0; i--) {
645 z[i] = a * x[i] + y[i];
649 #pragma omp for schedule (static) 650 for (i = rows - 1; i >= 0; i--) {
651 z[i] = a * x[i] + b * y[i];
672 y = memcpy(y, x, rows *
sizeof(
int));
void G_math_f_x_dot_y(float *x, float *y, float *value, int rows)
Compute the dot product of vector x and y.
void G_math_i_max_norm(int *x, int *value, int rows)
Compute the maximum norm of vector x.
void G_math_f_ax_by(float *x, float *y, float *z, float a, float b, int rows)
Scales vectors x and y with the scalars a and b and adds them.
void G_math_d_max_norm(double *x, double *value, int rows)
Compute the maximum norm of vector x.
void G_math_d_x_dot_y(double *x, double *y, double *value, int rows)
Compute the dot product of vector x and y.
void G_math_f_copy(float *x, float *y, int rows)
Copy the vector x to y.
void G_math_f_max_norm(float *x, float *value, int rows)
Compute the maximum norm of vector x.
void G_math_f_asum_norm(float *x, float *value, int rows)
Compute the asum norm of vector x.
void G_math_i_copy(int *x, int *y, int rows)
Copy the vector x to y.
void G_math_d_euclid_norm(double *x, double *value, int rows)
Compute the euclid norm of vector x.
void G_math_d_copy(double *x, double *y, int rows)
Copy the vector x to y.
void G_math_d_asum_norm(double *x, double *value, int rows)
Compute the asum norm of vector x.
void G_math_i_x_dot_y(int *x, int *y, double *value, int rows)
Compute the dot product of vector x and y.
void G_math_i_ax_by(int *x, int *y, int *z, int a, int b, int rows)
Scales vectors x and y with the scalars a and b and adds them.
void G_math_f_euclid_norm(float *x, float *value, int rows)
Compute the euclid norm of vector x.
void G_math_i_asum_norm(int *x, double *value, int rows)
Compute the asum norm of vector x.
void G_math_d_ax_by(double *x, double *y, double *z, double a, double b, int rows)
Scales vectors x and y with the scalars a and b and adds them.
void G_math_i_euclid_norm(int *x, double *value, int rows)
Compute the euclid norm of vector x.