21#ifndef _libint2_src_bin_libint_iface_h_
22#define _libint2_src_bin_libint_iface_h_
27#include <default_params.h>
43 typedef std::vector<std::string> Tasks;
44 Libint2Iface(
const SafePtr<CompilationParameters>& cparams,
45 const SafePtr<CodeContext>& ctext);
50 th_ << s << std::endl;
54 ph_ << s << std::endl;
58 ih_ << s << std::endl;
62 ii_ << s << std::endl;
66 si_ << s << std::endl;
70 sc_ << s << std::endl;
77 std::string
macro(
const std::string& label) {
78 std::string result(
"LIBINT2_"); result += label;
82 std::string
macro(
const std::string& task_label,
const std::string& label) {
83 std::string result(
"LIBINT2_"); result += label;
if (task_label !=
"") { result +=
"_"; result += task_label; }
87 template <
typename T> std::string macro_define(
const std::string& label,
const T& value) {
89 oss_ <<
"#ifndef " <<
macro(label) << std::endl;
90 oss_ <<
"# define " <<
macro(label) <<
" " << value << std::endl;
91 oss_ <<
"#endif" << std::endl;
95 template <
typename T> std::string macro_define(
const std::string& task_label,
const std::string& label,
const T& value) {
97 oss_ <<
"#define " <<
macro(task_label,label) <<
" " << value << std::endl;
101 template <
typename T> std::string var_declare_v(
const std::string& label) {
102 return ctext_->declare_v(ctext_->type_name<T>(),ctext_->label_to_name(label),
macro(
"MAX_VECLEN"));
106 std::string null_str_;
107 std::ostringstream oss_;
108 SafePtr<CompilationParameters> cparams_;
109 SafePtr<CodeContext> ctext_;
113 std::vector<std::string> li_decls_;
114 std::vector<std::string> lm_decls_;
115 std::vector<std::string> lc_decls_;
117 std::string lf_decl_;
119 typedef std::basic_ofstream<char> fstream;
129 void generate_inteval_type(std::ostream& os);
Libint2Iface is used to generate Libint2 interfaces.
Definition: iface.h:41
std::string macro(const std::string &label)
Writes string s to the Libint_t init code.
Definition: iface.h:77
void to_int_iface(const std::string &s)
Writes string s to the internal iface header.
Definition: iface.h:61
void to_types(const std::string &s)
Writes string s to the types header.
Definition: iface.h:49
void to_iface(const std::string &s)
Writes string s to the iface header.
Definition: iface.h:57
void to_static_cleanup(const std::string &s)
Writes string s to the static cleanup code.
Definition: iface.h:69
void to_params(const std::string &s)
Writes string s to the params header.
Definition: iface.h:53
void to_static_init(const std::string &s)
Writes string s to the static init code.
Definition: iface.h:65
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24