20 #ifndef _libint2_src_bin_libint_iface_h_ 21 #define _libint2_src_bin_libint_iface_h_ 25 #include <smart_ptr.h> 26 #include <default_params.h> 44 typedef std::vector<std::string> Tasks;
45 Libint2Iface(
const SafePtr<CompilationParameters>& cparams,
46 const SafePtr<CodeContext>& ctext);
78 const std::string
macro(
const std::string& label) {
79 std::string result(
"LIBINT2_"); result += label;
83 const std::string macro(
const std::string& task_label,
const std::string& label) {
84 std::string result(
"LIBINT2_"); result += label;
if (task_label !=
"") { result +=
"_"; result += task_label; }
88 template <
typename T>
const std::string macro_define(
const std::string& label,
const T& value) {
90 oss_ <<
"#ifndef " << macro(label) << endl;
91 oss_ <<
"# define " << macro(label) <<
" " << value << endl;
92 oss_ <<
"#endif" << endl;
96 template <
typename T>
const std::string macro_define(
const std::string& task_label,
const std::string& label,
const T& value) {
98 oss_ <<
"#define " << macro(task_label,label) <<
" " << value << endl;
102 template <
typename T>
const std::string var_declare_v(
const std::string& label) {
103 return ctext_->declare_v(ctext_->type_name<T>(),ctext_->label_to_name(label),macro(
"MAX_VECLEN"));
107 std::string null_str_;
108 std::ostringstream oss_;
109 SafePtr<CompilationParameters> cparams_;
110 SafePtr<CodeContext> ctext_;
114 std::vector<std::string> li_decls_;
115 std::vector<std::string> lm_decls_;
116 std::vector<std::string> lc_decls_;
118 typedef std::basic_ofstream<char> fstream;
128 void generate_inteval_type(std::ostream& os);
void to_static_init(const std::string &s)
Writes string s to the static init code.
Definition: iface.h:66
Libint2Iface is used to generate Libint2 interfaces.
Definition: iface.h:42
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
void to_int_iface(const std::string &s)
Writes string s to the internal iface header.
Definition: iface.h:62
Definition: stdarray.h:18
void to_params(const std::string &s)
Writes string s to the params header.
Definition: iface.h:54
void to_types(const std::string &s)
Writes string s to the types header.
Definition: iface.h:50
void to_iface(const std::string &s)
Writes string s to the iface header.
Definition: iface.h:58
void to_static_cleanup(const std::string &s)
Writes string s to the static cleanup code.
Definition: iface.h:70
const std::string macro(const std::string &label)
Writes string s to the Libint_t init code.
Definition: iface.h:78