1 //
2 // BAGEL - Brilliantly Advanced General Electronic Structure Library
3 // Filename: RelCASPT2_gen4.cc
4 // Copyright (C) 2014 Toru Shiozaki
5 //
6 // Author: Toru Shiozaki <shiozaki@northwestern.edu>
7 // Maintainer: Shiozaki group
8 //
9 // This file is part of the BAGEL package.
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 //
24 
25 #include <bagel_config.h>
26 #ifdef COMPILE_SMITH
27 
28 #include <src/smith/relcaspt2/RelCASPT2_tasks4.h>
29 
30 using namespace std;
31 using namespace bagel;
32 using namespace bagel::SMITH;
33 using namespace bagel::SMITH::RelCASPT2;
34 
Task150(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)35 Task150::Task150(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
36   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
37   out_ = t[0];
38   in_ = in;
39   subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
40   for (auto& x1 : *range[1])
41     for (auto& a2 : *range[2])
42       if (t[0]->is_local(a2, x1))
43         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, x1}}, in, t[0], range));
44 }
45 
Task151(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)46 Task151::Task151(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
47   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
48   out_ = t[0];
49   in_ = in;
50   subtasks_.reserve(range[0]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
51   for (auto& c3 : *range[0])
52     for (auto& a4 : *range[2])
53       for (auto& c1 : *range[0])
54         for (auto& a2 : *range[2])
55           if (t[0]->is_local(a2, c1, a4, c3))
56             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, a4, c3}}, in, t[0], range));
57 }
58 
Task152(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)59 Task152::Task152(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
60   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
61   out_ = t[0];
62   in_ = in;
63   subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
64   for (auto& x1 : *range[1])
65     for (auto& a4 : *range[2])
66       if (t[0]->is_local(a4, x1))
67         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, x1}}, in, t[0], range));
68 }
69 
Task153(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)70 Task153::Task153(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
71   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
72   out_ = t[0];
73   in_ = in;
74   subtasks_.reserve(range[0]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
75   for (auto& c3 : *range[0])
76     for (auto& a4 : *range[2])
77       for (auto& c1 : *range[0])
78         for (auto& a2 : *range[2])
79           if (t[0]->is_local(a2, c1, a4, c3))
80             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, a4, c3}}, in, t[0], range));
81 }
82 
Task154(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)83 Task154::Task154(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
84   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
85   out_ = t[0];
86   in_ = in;
87   subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
88   for (auto& c1 : *range[0])
89     for (auto& a4 : *range[2])
90       if (t[0]->is_local(a4, c1))
91         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, c1}}, in, t[0], range));
92 }
93 
Task155(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)94 Task155::Task155(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
95   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
96   out_ = t[0];
97   in_ = in;
98   subtasks_.reserve(range[1]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
99   for (auto& x0 : *range[1])
100     for (auto& c1 : *range[0])
101       for (auto& a4 : *range[2])
102         for (auto& x1 : *range[1])
103           if (t[0]->is_local(x1, a4, c1, x0))
104             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a4, c1, x0}}, in, t[0], range));
105 }
106 
Task156(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)107 Task156::Task156(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
108   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
109   out_ = t[0];
110   in_ = in;
111   subtasks_.reserve(range[0]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
112   for (auto& c3 : *range[0])
113     for (auto& a4 : *range[2])
114       for (auto& c1 : *range[0])
115         for (auto& a2 : *range[2])
116           if (t[0]->is_local(a2, c1, a4, c3))
117             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, a4, c3}}, in, t[0], range));
118 }
119 
Task157(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)120 Task157::Task157(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
121   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
122   out_ = t[0];
123   in_ = in;
124   subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
125   for (auto& c1 : *range[0])
126     for (auto& a2 : *range[2])
127       if (t[0]->is_local(a2, c1))
128         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, c1}}, in, t[0], range));
129 }
130 
Task158(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)131 Task158::Task158(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
132   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
133   out_ = t[0];
134   in_ = in;
135   subtasks_.reserve(range[1]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
136   for (auto& x0 : *range[1])
137     for (auto& c1 : *range[0])
138       for (auto& a2 : *range[2])
139         for (auto& x1 : *range[1])
140           if (t[0]->is_local(x1, a2, c1, x0))
141             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a2, c1, x0}}, in, t[0], range));
142 }
143 
Task159(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)144 Task159::Task159(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
145   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
146   out_ = t[0];
147   in_ = in;
148   subtasks_.reserve(range[0]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
149   for (auto& c3 : *range[0])
150     for (auto& a4 : *range[2])
151       for (auto& c1 : *range[0])
152         for (auto& a2 : *range[2])
153           if (t[0]->is_local(a2, c1, a4, c3))
154             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, a4, c3}}, in, t[0], range));
155 }
156 
Task160(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)157 Task160::Task160(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
158   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
159   out_ = t[0];
160   in_ = in;
161   subtasks_.reserve(range[1]->nblock()*range[0]->nblock());
162   for (auto& x1 : *range[1])
163     for (auto& c3 : *range[0])
164       if (t[0]->is_local(c3, x1))
165         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c3, x1}}, in, t[0], range));
166 }
167 
Task161(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)168 Task161::Task161(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
169   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
170   out_ = t[0];
171   in_ = in;
172   subtasks_.reserve(range[0]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
173   for (auto& c3 : *range[0])
174     for (auto& a4 : *range[2])
175       for (auto& c1 : *range[0])
176         for (auto& a2 : *range[2])
177           if (t[0]->is_local(a2, c1, a4, c3))
178             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, a4, c3}}, in, t[0], range));
179 }
180 
Task162(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)181 Task162::Task162(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
182   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
183   out_ = t[0];
184   in_ = in;
185   subtasks_.reserve(range[1]->nblock()*range[0]->nblock());
186   for (auto& x1 : *range[1])
187     for (auto& c3 : *range[0])
188       if (t[0]->is_local(c3, x1))
189         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c3, x1}}, in, t[0], range));
190 }
191 
Task163(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)192 Task163::Task163(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
193   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
194   out_ = t[0];
195   in_ = in;
196   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[2]->nblock()*range[0]->nblock());
197   for (auto& a1 : *range[2])
198     for (auto& x0 : *range[1])
199       for (auto& a3 : *range[2])
200         for (auto& c2 : *range[0])
201           if (t[0]->is_local(c2, a3, x0, a1))
202             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, a3, x0, a1}}, in, t[0], range));
203 }
204 
Task164(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)205 Task164::Task164(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
206   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
207   out_ = t[0];
208   in_ = in;
209   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
210   for (auto& a1 : *range[2])
211     for (auto& x0 : *range[1])
212       for (auto& c2 : *range[0])
213         for (auto& a3 : *range[2])
214           if (t[0]->is_local(a3, c2, x0, a1))
215             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
216 }
217 
Task165(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)218 Task165::Task165(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
219   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
220   out_ = t[0];
221   in_ = in;
222   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
223   for (auto& x0 : *range[1])
224     for (auto& x1 : *range[1])
225       for (auto& c2 : *range[0])
226         for (auto& a3 : *range[2])
227           if (t[0]->is_local(a3, c2, x1, x0))
228             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x1, x0}}, in, t[0], range));
229 }
230 
Task166(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)231 Task166::Task166(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
232   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
233   out_ = t[0];
234   in_ = in;
235   subtasks_.reserve(range[1]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
236   for (auto& x2 : *range[1])
237     for (auto& c2 : *range[0])
238       for (auto& a3 : *range[2])
239         for (auto& x3 : *range[1])
240           if (t[0]->is_local(x3, a3, c2, x2))
241             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x3, a3, c2, x2}}, in, t[0], range));
242 }
243 
Task167(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)244 Task167::Task167(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
245   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
246   out_ = t[0];
247   in_ = in;
248   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
249   for (auto& a1 : *range[2])
250     for (auto& x0 : *range[1])
251       for (auto& c2 : *range[0])
252         for (auto& a3 : *range[2])
253           if (t[0]->is_local(a3, c2, x0, a1))
254             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
255 }
256 
Task168(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)257 Task168::Task168(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
258   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
259   out_ = t[0];
260   in_ = in;
261   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
262   for (auto& x1 : *range[1])
263     for (auto& x0 : *range[1])
264       for (auto& c2 : *range[0])
265         for (auto& a1 : *range[2])
266           if (t[0]->is_local(a1, c2, x0, x1))
267             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, c2, x0, x1}}, in, t[0], range));
268 }
269 
Task169(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)270 Task169::Task169(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
271   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
272   out_ = t[0];
273   in_ = in;
274   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
275   for (auto& x1 : *range[1])
276     for (auto& x0 : *range[1])
277       for (auto& c2 : *range[0])
278         for (auto& a1 : *range[2])
279           if (t[0]->is_local(a1, c2, x0, x1))
280             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, c2, x0, x1}}, in, t[0], range));
281 }
282 
Task170(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)283 Task170::Task170(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
284   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
285   out_ = t[0];
286   in_ = in;
287   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
288   for (auto& a1 : *range[2])
289     for (auto& x0 : *range[1])
290       for (auto& c2 : *range[0])
291         for (auto& a3 : *range[2])
292           if (t[0]->is_local(a3, c2, x0, a1))
293             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
294 }
295 
Task171(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)296 Task171::Task171(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
297   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
298   out_ = t[0];
299   in_ = in;
300   subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
301   for (auto& x0 : *range[1])
302     for (auto& a3 : *range[2])
303       if (t[0]->is_local(a3, x0))
304         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a3, x0}}, in, t[0], range));
305 }
306 
Task172(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)307 Task172::Task172(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
308   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
309   out_ = t[0];
310   in_ = in;
311   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
312   for (auto& a1 : *range[2])
313     for (auto& x0 : *range[1])
314       for (auto& c2 : *range[0])
315         for (auto& a3 : *range[2])
316           if (t[0]->is_local(a3, c2, x0, a1))
317             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
318 }
319 
Task173(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)320 Task173::Task173(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
321   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
322   out_ = t[0];
323   in_ = in;
324   subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
325   for (auto& x0 : *range[1])
326     for (auto& a1 : *range[2])
327       if (t[0]->is_local(a1, x0))
328         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a1, x0}}, in, t[0], range));
329 }
330 
Task174(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)331 Task174::Task174(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
332   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
333   out_ = t[0];
334   in_ = in;
335   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
336   for (auto& a1 : *range[2])
337     for (auto& x0 : *range[1])
338       for (auto& c2 : *range[0])
339         for (auto& a3 : *range[2])
340           if (t[0]->is_local(a3, c2, x0, a1))
341             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
342 }
343 
Task175(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)344 Task175::Task175(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
345   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
346   out_ = t[0];
347   in_ = in;
348   subtasks_.reserve(range[1]->nblock()*range[0]->nblock());
349   for (auto& x0 : *range[1])
350     for (auto& c4 : *range[0])
351       if (t[0]->is_local(c4, x0))
352         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c4, x0}}, in, t[0], range));
353 }
354 
Task176(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)355 Task176::Task176(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
356   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
357   out_ = t[0];
358   in_ = in;
359   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
360   for (auto& a1 : *range[2])
361     for (auto& x0 : *range[1])
362       for (auto& c2 : *range[0])
363         for (auto& a3 : *range[2])
364           if (t[0]->is_local(a3, c2, x0, a1))
365             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
366 }
367 
Task177(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)368 Task177::Task177(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
369   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
370   out_ = t[0];
371   in_ = in;
372   subtasks_.reserve(range[1]->nblock()*range[0]->nblock());
373   for (auto& x0 : *range[1])
374     for (auto& c4 : *range[0])
375       if (t[0]->is_local(c4, x0))
376         subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c4, x0}}, in, t[0], range));
377 }
378 
Task178(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)379 Task178::Task178(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
380   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
381   out_ = t[0];
382   in_ = in;
383   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
384   for (auto& a1 : *range[2])
385     for (auto& x0 : *range[1])
386       for (auto& c2 : *range[0])
387         for (auto& a3 : *range[2])
388           if (t[0]->is_local(a3, c2, x0, a1))
389             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
390 }
391 
Task179(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)392 Task179::Task179(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
393   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
394   out_ = t[0];
395   in_ = in;
396   subtasks_.reserve(range[2]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
397   for (auto& a1 : *range[2])
398     for (auto& c2 : *range[0])
399       for (auto& a3 : *range[2])
400         for (auto& x3 : *range[1])
401           if (t[0]->is_local(x3, a3, c2, a1))
402             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x3, a3, c2, a1}}, in, t[0], range));
403 }
404 
Task180(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)405 Task180::Task180(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
406   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
407   out_ = t[0];
408   in_ = in;
409   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
410   for (auto& a1 : *range[2])
411     for (auto& x0 : *range[1])
412       for (auto& c2 : *range[0])
413         for (auto& a3 : *range[2])
414           if (t[0]->is_local(a3, c2, x0, a1))
415             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
416 }
417 
Task181(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)418 Task181::Task181(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
419   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
420   out_ = t[0];
421   in_ = in;
422   subtasks_.reserve(range[1]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
423   for (auto& x0 : *range[1])
424     for (auto& a1 : *range[2])
425       for (auto& c4 : *range[0])
426         for (auto& a3 : *range[2])
427           if (t[0]->is_local(a3, c4, a1, x0))
428             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c4, a1, x0}}, in, t[0], range));
429 }
430 
Task182(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)431 Task182::Task182(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
432   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
433   out_ = t[0];
434   in_ = in;
435   subtasks_.reserve(range[2]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
436   for (auto& a1 : *range[2])
437     for (auto& c4 : *range[0])
438       for (auto& a3 : *range[2])
439         for (auto& x1 : *range[1])
440           if (t[0]->is_local(x1, a3, c4, a1))
441             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a3, c4, a1}}, in, t[0], range));
442 }
443 
Task183(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)444 Task183::Task183(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
445   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
446   out_ = t[0];
447   in_ = in;
448   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
449   for (auto& a1 : *range[2])
450     for (auto& x0 : *range[1])
451       for (auto& c2 : *range[0])
452         for (auto& a3 : *range[2])
453           if (t[0]->is_local(a3, c2, x0, a1))
454             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
455 }
456 
Task184(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)457 Task184::Task184(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
458   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
459   out_ = t[0];
460   in_ = in;
461   subtasks_.reserve(range[1]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
462   for (auto& x0 : *range[1])
463     for (auto& a3 : *range[2])
464       for (auto& c2 : *range[0])
465         for (auto& a4 : *range[2])
466           if (t[0]->is_local(a4, c2, a3, x0))
467             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a4, c2, a3, x0}}, in, t[0], range));
468 }
469 
Task185(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)470 Task185::Task185(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
471   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
472   out_ = t[0];
473   in_ = in;
474   subtasks_.reserve(range[2]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
475   for (auto& a3 : *range[2])
476     for (auto& c2 : *range[0])
477       for (auto& a4 : *range[2])
478         for (auto& x1 : *range[1])
479           if (t[0]->is_local(x1, a4, c2, a3))
480             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a4, c2, a3}}, in, t[0], range));
481 }
482 
Task186(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)483 Task186::Task186(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
484   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
485   out_ = t[0];
486   in_ = in;
487   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
488   for (auto& a1 : *range[2])
489     for (auto& x0 : *range[1])
490       for (auto& c2 : *range[0])
491         for (auto& a3 : *range[2])
492           if (t[0]->is_local(a3, c2, x0, a1))
493             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
494 }
495 
Task187(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)496 Task187::Task187(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
497   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
498   out_ = t[0];
499   in_ = in;
500   subtasks_.reserve(range[1]->nblock()*range[2]->nblock()*range[0]->nblock()*range[2]->nblock());
501   for (auto& x0 : *range[1])
502     for (auto& a1 : *range[2])
503       for (auto& c2 : *range[0])
504         for (auto& a4 : *range[2])
505           if (t[0]->is_local(a4, c2, a1, x0))
506             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a4, c2, a1, x0}}, in, t[0], range));
507 }
508 
Task188(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)509 Task188::Task188(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
510   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
511   out_ = t[0];
512   in_ = in;
513   subtasks_.reserve(range[2]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
514   for (auto& a1 : *range[2])
515     for (auto& c2 : *range[0])
516       for (auto& a4 : *range[2])
517         for (auto& x1 : *range[1])
518           if (t[0]->is_local(x1, a4, c2, a1))
519             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a4, c2, a1}}, in, t[0], range));
520 }
521 
Task189(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)522 Task189::Task189(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
523   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
524   out_ = t[0];
525   in_ = in;
526   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
527   for (auto& a1 : *range[2])
528     for (auto& x0 : *range[1])
529       for (auto& c2 : *range[0])
530         for (auto& a3 : *range[2])
531           if (t[0]->is_local(a3, c2, x0, a1))
532             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
533 }
534 
Task190(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)535 Task190::Task190(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
536   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
537   out_ = t[0];
538   in_ = in;
539   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[2]->nblock());
540   for (auto& x1 : *range[1])
541     for (auto& x0 : *range[1])
542       for (auto& a3 : *range[2])
543         for (auto& a1 : *range[2])
544           if (t[0]->is_local(a1, a3, x0, x1))
545             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, a3, x0, x1}}, in, t[0], range));
546 }
547 
Task191(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)548 Task191::Task191(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
549   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
550   out_ = t[0];
551   in_ = in;
552   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
553   for (auto& a1 : *range[2])
554     for (auto& x0 : *range[1])
555       for (auto& c2 : *range[0])
556         for (auto& a3 : *range[2])
557           if (t[0]->is_local(a3, c2, x0, a1))
558             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a3, c2, x0, a1}}, in, t[0], range));
559 }
560 
Task192(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range,const double e)561 Task192::Task192(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range, const double e) {
562   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
563   out_ = t[0];
564   in_ = in;
565   subtasks_.reserve(range[2]->nblock()*range[0]->nblock()*range[2]->nblock()*range[1]->nblock());
566   for (auto& a1 : *range[2])
567     for (auto& c2 : *range[0])
568       for (auto& a3 : *range[2])
569         for (auto& x1 : *range[1])
570           if (t[0]->is_local(x1, a3, c2, a1))
571             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a3, c2, a1}}, in, t[0], range, e));
572 }
573 
Task193(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)574 Task193::Task193(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
575   array<shared_ptr<const Tensor>,1> in = {{t[1]}};
576   out_ = t[0];
577   in_ = in;
578   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[2]->nblock()*range[1]->nblock());
579   for (auto& a1 : *range[2])
580     for (auto& x0 : *range[1])
581       for (auto& a2 : *range[2])
582         for (auto& x1 : *range[1])
583           if (t[0]->is_local(x1, a2, x0, a1))
584             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x1, a2, x0, a1}}, in, t[0], range));
585 }
586 
Task194(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)587 Task194::Task194(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
588   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
589   out_ = t[0];
590   in_ = in;
591   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[1]->nblock()*range[2]->nblock());
592   for (auto& a2 : *range[2])
593     for (auto& x1 : *range[1])
594       for (auto& x0 : *range[1])
595         for (auto& a1 : *range[2])
596           if (t[0]->is_local(a1, x0, x1, a2))
597             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, x0, x1, a2}}, in, t[0], range));
598 }
599 
Task195(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)600 Task195::Task195(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
601   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
602   out_ = t[0];
603   in_ = in;
604   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[1]->nblock()*range[2]->nblock());
605   for (auto& x1 : *range[1])
606     for (auto& x2 : *range[1])
607       for (auto& x0 : *range[1])
608         for (auto& a1 : *range[2])
609           if (t[0]->is_local(a1, x0, x2, x1))
610             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, x0, x2, x1}}, in, t[0], range));
611 }
612 
Task196(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)613 Task196::Task196(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
614   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
615   out_ = t[0];
616   in_ = in;
617   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[1]->nblock()*range[2]->nblock());
618   for (auto& a2 : *range[2])
619     for (auto& x1 : *range[1])
620       for (auto& x0 : *range[1])
621         for (auto& a1 : *range[2])
622           if (t[0]->is_local(a1, x0, x1, a2))
623             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, x0, x1, a2}}, in, t[0], range));
624 }
625 
Task197(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)626 Task197::Task197(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
627   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
628   out_ = t[0];
629   in_ = in;
630   subtasks_.reserve(range[1]->nblock()*range[2]->nblock()*range[2]->nblock()*range[1]->nblock());
631   for (auto& x2 : *range[1])
632     for (auto& a2 : *range[2])
633       for (auto& a1 : *range[2])
634         for (auto& x3 : *range[1])
635           if (t[0]->is_local(x3, a1, a2, x2))
636             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{x3, a1, a2, x2}}, in, t[0], range));
637 }
638 
Task198(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)639 Task198::Task198(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
640   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
641   out_ = t[0];
642   in_ = in;
643   subtasks_.reserve(range[2]->nblock()*range[1]->nblock()*range[1]->nblock()*range[2]->nblock());
644   for (auto& a2 : *range[2])
645     for (auto& x1 : *range[1])
646       for (auto& x0 : *range[1])
647         for (auto& a1 : *range[2])
648           if (t[0]->is_local(a1, x0, x1, a2))
649             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, x0, x1, a2}}, in, t[0], range));
650 }
651 
Task199(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)652 Task199::Task199(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
653   array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
654   out_ = t[0];
655   in_ = in;
656   subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[2]->nblock());
657   for (auto& x1 : *range[1])
658     for (auto& x0 : *range[1])
659       for (auto& a3 : *range[2])
660         for (auto& a1 : *range[2])
661           if (t[0]->is_local(a1, a3, x0, x1))
662             subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, a3, x0, x1}}, in, t[0], range));
663 }
664 
665 #endif
666