Page MenuHomec4science

operation.h
No OneTemporary

File Metadata

Created
Sun, Feb 23, 10:52

operation.h

#include <vector>
#include <cmath>
#include <mpi.h>
#include <chrono>
using namespace std;
class operation{
private:
static void multiply(double *matrix,double *vec,double *result,int cols,int start,int end);
static void matrVecMultiply(int cols,int rank,double *matrix,double *vec,int *sc,int *displ,double *allValues);
public:
static double dotProduct(vector<double> vec1,vector<double> vec2);
static vector<double> vecAdd(vector<double> a,vector<double> b);
static vector<double> vecSubtract(vector<double> a,vector<double> b);
static double vector_norm(vector<double> v);
//static matrix randomSymMatrix(int rows,int cols,int maxValue);
static vector<double> randomVector(int len,int maxValue);
static void displacement(int size,int *scounts,int *displs);
static void sizeCounts(int n,int size,int *scounts);
static vector<double> matrMultiply(double *A,vector<double> B,int *sc,int *disp);
};

Event Timeline