Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102713179
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, 10:52
Size
964 B
Mime Type
text/x-c
Expires
Tue, Feb 25, 10:52 (2 d)
Engine
blob
Format
Raw Data
Handle
24406344
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
(
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
Log In to Comment