From 2fce43d484e4148ae858f410d51dcd9951d34374 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sun, 18 Sep 2016 15:45:13 +0000 Subject: remove include & rename --- omegalib/codegen/include/code_gen/codegen.h | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 omegalib/codegen/include/code_gen/codegen.h (limited to 'omegalib/codegen/include/code_gen/codegen.h') diff --git a/omegalib/codegen/include/code_gen/codegen.h b/omegalib/codegen/include/code_gen/codegen.h new file mode 100755 index 0000000..469653d --- /dev/null +++ b/omegalib/codegen/include/code_gen/codegen.h @@ -0,0 +1,44 @@ +#ifndef _CODEGEN_H +#define _CODEGEN_H + +#include +#include +#include +#include +#include + +namespace omega { + +class CodeGen { +public: + static const std::string loop_var_name_prefix; + static const int var_substitution_threshold; + +protected: + std::vector > projected_IS_; // projected_IS_[level-1][new stmt#] + std::vector xforms_; // transformations[original stmt#] + Relation known_; // no need to generate code for constraints satisfied in known + std::vector remap_; // map new stmt# to original stmt# + +public: + CodeGen(const std::vector &xforms, const std::vector &IS, const Relation &known = Relation::Null(), + std::vector< std::vector > smtNonSplitLevels_ = std::vector< std::vector >(), + std::vector< std::vector > loopIdxNames_ = std::vector< std::vector >(), + std::vector< std::pair > syncs_ = std::vector< std::pair >() + ); + ~CodeGen() {} + + CG_result *buildAST(int effort = 1); + int num_level() const { return projected_IS_.size(); } + +private: + CG_result *buildAST(int level, const BoolSet<> &active, bool split_on_const, const Relation &restriction); + + friend class CG_result; + friend class CG_split; + friend class CG_loop; + friend class CG_leaf; +}; + +} +#endif -- cgit v1.2.3-70-g09d2