-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathir_cudarose.hh
52 lines (31 loc) · 1 KB
/
ir_cudarose.hh
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
#ifndef IR_CUDAROSE_HH
#define IR_CUDAROSE_HH
#include "chill_io.hh"
#include <code_gen/CG_roseRepr.h>
#include <code_gen/CG_roseBuilder.h>
#include "ir_rose.hh"
#include "loop.hh"
// these are DAMNED close now
#include "loop_cuda_chill.hh"
#include "ir_rose_utils.hh"
class IR_cudaroseCode : public IR_roseCode{
public:
IR_cudaroseCode(const char *filename, const char* proc_name);
std::string cudaFileToWrite;
// TODO delete
SgGlobal *gsym_;
SgScopeStatement* defn;
SgGlobal* first_scope;
SgSymbolTable* parameter;
SgSymbolTable* body;
std::vector<SgSymbolTable*> write_procs;//procs to write
IR_ArraySymbol *CreateArraySymbol(const IR_Symbol *sym, std::vector<omega::CG_outputRepr *> &size,int sharedAnnotation = 1);
bool commit_loop(Loop *loop, int loop_num);
std::vector<SgForStatement *> get_loops()
{
std::vector<SgForStatement *> loops = find_loops(func->get_definition()->get_body());
return loops;
}
~IR_cudaroseCode();
};
#endif