Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102758186
operation.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 23, 21:42
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Feb 25, 21:42 (2 d)
Engine
blob
Format
Raw Data
Handle
24417350
Attached To
R6658 PHPC CG Project
operation.h
View Options
#include <vector>
#include <cmath>
#include <mpi.h>
#include <chrono>
using namespace std;
class operation{
private:
static void multiply(int numCols,double *matrix,double *vec,double *result,int colStart,int colEnd,int rowStart,int rowEnd);
static void blockMultiply(MPI_Comm row_com,MPI_Comm even_com,int rows,int rank,double *matrix,double *vec,int *sc,int *disp,double *result);
static void rowMultiply(int rows,int rank,double *matrix,double *vec,int *sc,int *disp,double *result);
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 vector<double> randomVector(int len,int maxValue);
static void displacement(int isBlock,int size,int *scounts,int *displs);
static void sizeCounts(int isBlock,int n,int size,int *scounts);
static vector<double> matrMultiply(int isBlock,double *A,vector<double> B,int *sc,int *disp,MPI_Comm row_com,MPI_Comm even_com);
};
Event Timeline
Log In to Comment