LIBINT 2.9.0
graph_registry.h
1/*
2 * Copyright (C) 2004-2024 Edward F. Valeev
3 *
4 * This file is part of Libint compiler.
5 *
6 * Libint compiler is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Libint compiler is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Libint compiler. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef _libint2_src_bin_libint_tforms_h_
22#define _libint2_src_bin_libint_tforms_h_
23
24#include <memory.h>
25
26#include <string>
27
28namespace libint2 {
29
35 public:
38
39 GraphRegistry* clone() const;
40
43 bool accumulate_targets() const { return accumulate_targets_; }
44 void accumulate_targets(bool at) { accumulate_targets_ = at; }
46 bool return_targets() const { return return_targets_; }
47 void return_targets(bool rt) { return_targets_ = rt; }
50 unsigned int unroll_threshold() const { return unroll_threshold_; }
51 void unroll_threshold(unsigned int ut) { unroll_threshold_ = ut; }
54 bool uncontract() const { return uncontract_; }
55 void uncontract(bool uc) { uncontract_ = uc; }
58 bool ignore_missing_prereqs() const { return ignore_missing_prereqs_; }
59 void ignore_missing_prereqs(bool imp) { ignore_missing_prereqs_ = imp; }
61 bool do_cse() const { return do_cse_; }
62 void do_cse(bool dc) { do_cse_ = dc; }
65 const std::string& stack_name() const { return stack_name_; }
66 void stack_name(const std::string& stack_name) { stack_name_ = stack_name; }
68 bool condense_expr() const { return condense_expr_; }
69 void condense_expr(bool ce) { condense_expr_ = ce; }
71 int current_timer() const { return current_timer_; }
72 void current_timer(int ct) { current_timer_ = ct; }
73
74 private:
75 bool accumulate_targets_;
76 bool return_targets_;
77 unsigned int unroll_threshold_;
78 bool uncontract_;
79 bool ignore_missing_prereqs_;
80 bool do_cse_;
81 bool condense_expr_;
82 std::string stack_name_;
83 int current_timer_;
84};
85
91 public:
94
98 return accumulate_targets_directly_;
99 }
100 void accumulate_targets_directly(bool atd) {
101 accumulate_targets_directly_ = atd;
102 }
105 MemoryManager::Size size_of_target_accum() const {
106 return size_of_target_accum_;
107 }
108 void size_of_target_accum(const MemoryManager::Size& sota) {
109 size_of_target_accum_ = sota;
110 }
111
112 private:
113 bool accumulate_targets_directly_;
114 MemoryManager::Size size_of_target_accum_;
115};
116
117} // namespace libint2
118
119#endif
Externally accessible registry of information about a graph.
Definition graph_registry.h:34
bool do_cse() const
Do Common Subexpression Elimination (CSE)? The default is false.
Definition graph_registry.h:61
bool condense_expr() const
Condense expressions? The default is false.
Definition graph_registry.h:68
const std::string & stack_name() const
Names the primary scratch space for the intermediates.
Definition graph_registry.h:65
bool accumulate_targets() const
Accumulate (true) or assign (false) target vertices? The default is to assign.
Definition graph_registry.h:43
bool ignore_missing_prereqs() const
Ignore missing prerequisites – generate the code as is, without generating code for the prerequisites...
Definition graph_registry.h:58
int current_timer() const
if -1, no profiling, otherwise, indicates the current timer
Definition graph_registry.h:71
unsigned int unroll_threshold() const
Will unroll the integral sets with size <= unroll_threshold.
Definition graph_registry.h:50
bool return_targets() const
Return pointers to targets via Libint_t::targets? Default is true.
Definition graph_registry.h:46
bool uncontract() const
Minimum size when can unroll Will uncontract the integral sets if true.
Definition graph_registry.h:54
Internal registry of information.
Definition graph_registry.h:90
MemoryManager::Size size_of_target_accum() const
The size of the buffer at the beginning of stack allocated to hold accumulated targets.
Definition graph_registry.h:105
bool accumulate_targets_directly() const
Are targets computed, then accumulated, or accumulated directly? The latter possible only if all targ...
Definition graph_registry.h:97
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24