1 | #pragma once |
---|---|
2 | |
3 | #include "taichi/util/lang_util.h" |
4 | |
5 | namespace taichi::lang { |
6 | class CCProgramImpl; |
7 | |
8 | namespace cccp { |
9 | |
10 | class CCRuntime { |
11 | public: |
12 | CCRuntime(CCProgramImpl *cc_program_impl, |
13 | std::string const &header, |
14 | std::string const &source) |
15 | : header(header), source(source), cc_program_impl_(cc_program_impl) { |
16 | } |
17 | |
18 | std::string get_object() { |
19 | return obj_path_; |
20 | } |
21 | |
22 | void compile(); |
23 | |
24 | std::string header; |
25 | std::string source; |
26 | |
27 | private: |
28 | CCProgramImpl *cc_program_impl_{nullptr}; |
29 | std::string src_path_; |
30 | std::string obj_path_; |
31 | }; |
32 | |
33 | } // namespace cccp |
34 | } // namespace taichi::lang |
35 |