-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcost.h
executable file
·52 lines (39 loc) · 2.12 KB
/
cost.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef _COST_H_
#define _COST_H_
#include "tensor.h"
#include "helper.h"
#include <ctime>
#include <sys/time.h>
namespace RRR{
using namespace std;
class cost
{
private:
Tensor* A;
Tensor* B;
Tensor* C;
int dimA, dimB, dimC,dimG,nprocs,minCost;
Grid* G;
bool found;
public:
cost(Tensor* &Ainit, Tensor* &Binit, Tensor* &Cinit, Grid* &Ginit);
bool bestCost(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void contract_2D_2D_2D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void contract_4D_4D_4D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void Grid_Comb_4D(int arr[], int data[], int start, int end, int index, int r,int* &idmapA, int* &idmapB, int* &idmapC, int* &npgrid);
void best_Cost_GGrid_4D(int curGrid[], int* &curidmapA, int* &curidmapB, int* &curidmapC);
void contract_4D_2D_4D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void Grid_Comb_4Db(int arr[], int data[], int start, int end, int index, int r,int* &idmapA, int* &idmapB, int* &idmapC, int* &npgrid);
void best_Cost_GGrid_4Db(int* &curGrid, int* &curidmapA, int* &curidmapB, int* &curidmapC);
void contract_4D_4D_2D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void Grid_Comb_4Dc(int arr[], int data[], int start, int end, int index, int r,int* &idmapA, int* &idmapB, int* &idmapC, int* &npgrid);
void best_Cost_GGrid_4Dc(int* &curGrid, int* &curidmapA, int* &curidmapB, int* &curidmapC);
void contract_2D_4D_4D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void Grid_Comb_4Dd(int arr[], int data[], int start, int end, int index, int r,int* &idmapA, int* &idmapB, int* &idmapC, int* &npgrid);
void best_Cost_GGrid_4Dd(int* &curGrid, int* &curidmapA, int* &curidmapB, int* &curidmapC);
void contract_4D_2D_2D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void contract_2D_4D_2D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
void contract_2D_2D_4D(int* &idmapA, int* &idmapB, int* &idmapC, int* &ndimG, int* &npgrid);
};
}
#endif