53 #pragma omp parallel for schedule(static) reduction(+ : s)
54 for (i = rows - 1; i >= 0; i--) {
85 #pragma omp parallel for schedule(static) reduction(+ : s)
86 for (i = rows - 1; i >= 0; i--) {
117 #pragma omp parallel for schedule(static) reduction(+ : s)
118 for (i = rows - 1; i >= 0; i--) {
147 max = fabs(
x[rows - 1]);
148 for (i = rows - 2; i >= 0; i--) {
149 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--) {
334 #pragma omp parallel for schedule(static) private(i) reduction(+ : s)
335 for (i = 0; i < rows; i++) {
364 max = fabs(
x[rows - 1]);
365 for (i = rows - 2; i >= 0; i--) {
366 if (
max < fabs(
x[i]))
396 #pragma omp for schedule(static)
397 for (i = rows - 1; i >= 0; i--) {
401 else if ((a == 1.0) && (
b == 1.0)) {
402 #pragma omp for schedule(static)
403 for (i = rows - 1; i >= 0; i--) {
407 else if ((a == 1.0) && (
b == -1.0)) {
408 #pragma omp for schedule(static)
409 for (i = rows - 1; i >= 0; i--) {
414 #pragma omp for schedule(static)
415 for (i = rows - 1; i >= 0; i--) {
416 z[i] = a * (
x[i] + y[i]);
419 else if (
b == -1.0) {
420 #pragma omp for schedule(static)
421 for (i = rows - 1; i >= 0; i--) {
422 z[i] = a *
x[i] - y[i];
426 #pragma omp for schedule(static)
427 for (i = rows - 1; i >= 0; i--) {
428 z[i] = a *
x[i] + y[i];
432 #pragma omp for schedule(static)
433 for (i = rows - 1; i >= 0; i--) {
434 z[i] = a *
x[i] +
b * y[i];
455 y = memcpy(y,
x, rows *
sizeof(
float));
486 #pragma omp parallel for schedule(static) reduction(+ : s)
487 for (i = rows - 1; i >= 0; i--) {
518 #pragma omp parallel for schedule(static) reduction(+ : s)
519 for (i = rows - 1; i >= 0; i--) {
550 #pragma omp parallel for schedule(static) reduction(+ : s)
551 for (i = rows - 1; i >= 0; i--) {
552 s += (double)abs(
x[i]);
580 max = abs(
x[rows - 1]);
581 for (i = rows - 2; i >= 0; i--) {
612 #pragma omp for schedule(static)
613 for (i = rows - 1; i >= 0; i--) {
617 else if ((a == 1.0) && (
b == 1.0)) {
618 #pragma omp for schedule(static)
619 for (i = rows - 1; i >= 0; i--) {
623 else if ((a == 1.0) && (
b == -1.0)) {
624 #pragma omp for schedule(static)
625 for (i = rows - 1; i >= 0; i--) {
630 #pragma omp for schedule(static)
631 for (i = rows - 1; i >= 0; i--) {
632 z[i] = a * (
x[i] + y[i]);
635 else if (
b == -1.0) {
636 #pragma omp for schedule(static)
637 for (i = rows - 1; i >= 0; i--) {
638 z[i] = a *
x[i] - y[i];
642 #pragma omp for schedule(static)
643 for (i = rows - 1; i >= 0; i--) {
644 z[i] = a *
x[i] + y[i];
648 #pragma omp for schedule(static)
649 for (i = rows - 1; i >= 0; i--) {
650 z[i] = a *
x[i] +
b * y[i];
671 y = memcpy(y,
x, rows *
sizeof(
int));
void G_math_i_euclid_norm(int *x, double *value, int rows)
Compute the euclid norm of vector x.
void G_math_d_asum_norm(double *x, double *value, int rows)
Compute the asum 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_d_max_norm(double *x, double *value, int rows)
Compute the maximum 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_f_max_norm(float *x, float *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_euclid_norm(float *x, float *value, int rows)
Compute the euclid 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_f_x_dot_y(float *x, float *y, float *value, int rows)
Compute the dot product of vector x and y.
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_copy(double *x, double *y, int rows)
Copy the vector x to 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_d_euclid_norm(double *x, double *value, int rows)
Compute the euclid norm of vector x.
void G_math_i_max_norm(int *x, int *value, int rows)
Compute the maximum norm of vector x.
void G_math_i_copy(int *x, int *y, int rows)
Copy the vector x to y.
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_f_copy(float *x, float *y, int rows)
Copy the vector x to y.