-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverb.h
More file actions
42 lines (36 loc) · 813 Bytes
/
verb.h
File metadata and controls
42 lines (36 loc) · 813 Bytes
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
#ifndef _VERB_H
#define _VERB_H
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include "gdc.h"
#include "FH.h"
class Verb {
private:
FH * host_A_file = nullptr;
FH * host_B_file = nullptr;
std::ofstream *outputFilePtr = nullptr;
int i = _CHUNK_SIZE;
protected:
size_t A_cols, A_rows, B_cols, B_rows;
float *device_A, *device_B, *device_C;
public:
Verb(std::string file1, std::string file2, std::string outputFile);
Verb(std::string file1, std::string outputFile);
virtual void execute() {};
void dispatch();
};
#define DECLARE_VERB(ClassName) \
class ClassName : public Verb { \
using Verb::Verb; \
void execute () override; \
};
DECLARE_VERB(Add)
DECLARE_VERB(Exp)
DECLARE_VERB(Mul)
DECLARE_VERB(Div)
DECLARE_VERB(Sin)
DECLARE_VERB(Cos)
DECLARE_VERB(Tan)
#endif