44 typedef std::vector<std::string> Tasks;
45 Libint2Iface(
const std::shared_ptr<CompilationParameters>& cparams,
46 const std::shared_ptr<CodeContext>& ctext);
50 void to_types(
const std::string& s) { th_ << s << std::endl; }
52 void to_params(
const std::string& s) { ph_ << s << std::endl; }
54 void to_iface(
const std::string& s) { ih_ << s << std::endl; }
66 std::string
macro(
const std::string& label) {
67 std::string result(
"LIBINT2_");
72 std::string
macro(
const std::string& task_label,
const std::string& label) {
73 std::string result(
"LIBINT2_");
75 if (task_label !=
"") {
83 std::string macro_define(
const std::string& label,
const T& value) {
85 oss_ <<
"#ifndef " <<
macro(label) << std::endl;
86 oss_ <<
"# define " <<
macro(label) <<
" " << value << std::endl;
87 oss_ <<
"#endif" << std::endl;
92 std::string macro_define(
const std::string& task_label,
93 const std::string& label,
const T& value) {
95 oss_ <<
"#define " <<
macro(task_label, label) <<
" " << value << std::endl;
100 std::string var_declare_v(
const std::string& label) {
101 return ctext_->declare_v(ctext_->type_name<T>(),
102 ctext_->label_to_name(label),
macro(
"MAX_VECLEN"));
106 std::string null_str_;
107 std::ostringstream oss_;
108 std::shared_ptr<CompilationParameters> cparams_;
109 std::shared_ptr<CodeContext> ctext_;
114 std::vector<std::string> li_decls_;
115 std::vector<std::string> lm_decls_;
116 std::vector<std::string> lc_decls_;
118 std::string lf_decl_;
120 typedef std::basic_ofstream<char> fstream;
130 void generate_inteval_type(std::ostream& os);