Commit 3c757cbb authored by iker_martin's avatar iker_martin
Browse files

Added own mymkl files. Needed for compilation.

parent 2f4cf4c9
#include <stdio.h>
#include <stdlib.h>
#include "mymkl.h"
/**********************************************/
void rcopy (int *n, double *x, int *incx, double *y, int *incy) {
int i, dim = *n, ix = *incx, iy = *incy;
double *px = x, *py = y;
for (i=0; i<dim; i++) {
*py = *px; px += ix; py += iy;
}
}
void rscal (int *n, double *alpha, double *x, int *incx) {
int i, dim = *n, ix = *incx;
double *px = x, a = *alpha;
for (i=0; i<dim; i++) {
*px *= a; px += ix;
}
}
void raxpy (int *n, double *alpha, double *x, int *incx, double *y, int *incy) {
int i, dim = *n, ix = *incx, iy = *incy;
double *px = x, *py = y, a = *alpha;
for (i=0; i<dim; i++) {
*py += *px * a; px += ix; py += iy;
}
}
double rdot (int *n, double *x, int *incx, double *y, int *incy) {
int i, dim = *n, ix = *incx, iy = *incy;
double aux = 0.0, *px = x, *py = y;
for (i=0; i<dim; i++) {
aux += *py * *px; px += ix; py += iy;
}
return aux;
}
/**********************************************/
#ifndef mymkl
#define mymkl 1
void rcopy (int *n, double *x, int *incx, double *y, int *incy);
void rscal (int *n, double *alpha, double *x, int *incx);
void raxpy (int *n, double *alpha, double *x, int *incx, double *y, int *incy);
double rdot (int *n, double *x, int *incx, double *y, int *incy);
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment