1 //
2 // BAGEL - Brilliantly Advanced General Electronic Structure Library
3 // Filename: SPCASPT2_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/caspt2/SPCASPT2_tasks4.h>
29
30 using namespace std;
31 using namespace bagel;
32 using namespace bagel::SMITH;
33 using namespace bagel::SMITH::SPCASPT2;
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& a4 : *range[2])
42 if (t[0]->is_local(a4, x1))
43 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, 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>,1> in = {{t[1]}};
48 out_ = t[0];
49 in_ = in;
50 subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
51 for (auto& x0 : *range[1])
52 for (auto& a4 : *range[2])
53 if (t[0]->is_local(a4, x0))
54 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, x0}}, in, t[0], range));
55 }
56
Task152(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)57 Task152::Task152(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
58 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
59 out_ = t[0];
60 in_ = in;
61 subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
62 for (auto& x0 : *range[1])
63 for (auto& a4 : *range[2])
64 if (t[0]->is_local(a4, x0))
65 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, x0}}, in, t[0], range));
66 }
67
Task153(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)68 Task153::Task153(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
69 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
70 out_ = t[0];
71 in_ = in;
72 subtasks_.reserve(range[1]->nblock()*range[2]->nblock());
73 for (auto& x2 : *range[1])
74 for (auto& a1 : *range[2])
75 if (t[0]->is_local(a1, x2))
76 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a1, x2}}, in, t[0], range));
77 }
78
Task154(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)79 Task154::Task154(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
80 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
81 out_ = t[0];
82 in_ = in;
83 subtasks_.reserve(range[2]->nblock()*range[1]->nblock());
84 for (auto& a1 : *range[2])
85 for (auto& x2 : *range[1])
86 if (t[0]->is_local(x2, a1))
87 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, a1}}, in, t[0], range));
88 }
89
Task155(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)90 Task155::Task155(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
91 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
92 out_ = t[0];
93 in_ = in;
94 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[1]->nblock()*range[0]->nblock());
95 for (auto& x0 : *range[1])
96 for (auto& x2 : *range[1])
97 for (auto& x1 : *range[1])
98 for (auto& c2 : *range[0])
99 if (t[0]->is_local(c2, x1, x2, x0))
100 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, x1, x2, x0}}, in, t[0], range));
101 }
102
Task156(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)103 Task156::Task156(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
104 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
105 out_ = t[0];
106 in_ = in;
107 subtasks_.reserve(range[1]->nblock()*range[0]->nblock());
108 for (auto& x2 : *range[1])
109 for (auto& c3 : *range[0])
110 if (t[0]->is_local(c3, x2))
111 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c3, x2}}, in, t[0], range));
112 }
113
Task157(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)114 Task157::Task157(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
115 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
116 out_ = t[0];
117 in_ = in;
118 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
119 for (auto& c3 : *range[0])
120 for (auto& x2 : *range[1])
121 if (t[0]->is_local(x2, c3))
122 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c3}}, in, t[0], range));
123 }
124
Task158(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)125 Task158::Task158(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
126 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
127 out_ = t[0];
128 in_ = in;
129 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[0]->nblock());
130 for (auto& x2 : *range[1])
131 for (auto& x3 : *range[1])
132 for (auto& a1 : *range[2])
133 for (auto& c2 : *range[0])
134 if (t[0]->is_local(c2, a1, x3, x2))
135 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, a1, x3, x2}}, in, t[0], range));
136 }
137
Task159(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)138 Task159::Task159(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
139 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
140 out_ = t[0];
141 in_ = in;
142 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
143 for (auto& c3 : *range[0])
144 for (auto& x2 : *range[1])
145 if (t[0]->is_local(x2, c3))
146 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c3}}, in, t[0], range));
147 }
148
Task160(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)149 Task160::Task160(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
150 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
151 out_ = t[0];
152 in_ = in;
153 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[0]->nblock());
154 for (auto& x3 : *range[1])
155 for (auto& x2 : *range[1])
156 for (auto& a1 : *range[2])
157 for (auto& c2 : *range[0])
158 if (t[0]->is_local(c2, a1, x2, x3))
159 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, a1, x2, x3}}, in, t[0], range));
160 }
161
Task161(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)162 Task161::Task161(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
163 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
164 out_ = t[0];
165 in_ = in;
166 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
167 for (auto& c3 : *range[0])
168 for (auto& x2 : *range[1])
169 if (t[0]->is_local(x2, c3))
170 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c3}}, in, t[0], range));
171 }
172
Task162(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)173 Task162::Task162(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
174 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
175 out_ = t[0];
176 in_ = in;
177 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
178 for (auto& x3 : *range[1])
179 for (auto& x2 : *range[1])
180 for (auto& c1 : *range[0])
181 for (auto& a2 : *range[2])
182 if (t[0]->is_local(a2, c1, x2, x3))
183 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x2, x3}}, in, t[0], range));
184 }
185
Task163(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)186 Task163::Task163(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
187 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
188 out_ = t[0];
189 in_ = in;
190 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
191 for (auto& c3 : *range[0])
192 for (auto& x2 : *range[1])
193 if (t[0]->is_local(x2, c3))
194 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c3}}, in, t[0], range));
195 }
196
Task164(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)197 Task164::Task164(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
198 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
199 out_ = t[0];
200 in_ = in;
201 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
202 for (auto& x3 : *range[1])
203 for (auto& x2 : *range[1])
204 for (auto& c1 : *range[0])
205 for (auto& a2 : *range[2])
206 if (t[0]->is_local(a2, c1, x2, x3))
207 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x2, x3}}, in, t[0], range));
208 }
209
Task165(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)210 Task165::Task165(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
211 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
212 out_ = t[0];
213 in_ = in;
214 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
215 for (auto& c3 : *range[0])
216 for (auto& x2 : *range[1])
217 if (t[0]->is_local(x2, c3))
218 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c3}}, in, t[0], range));
219 }
220
Task166(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)221 Task166::Task166(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
222 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
223 out_ = t[0];
224 in_ = in;
225 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[2]->nblock());
226 for (auto& x2 : *range[1])
227 for (auto& x3 : *range[1])
228 for (auto& a1 : *range[2])
229 for (auto& a2 : *range[2])
230 if (t[0]->is_local(a2, a1, x3, x2))
231 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, a1, x3, x2}}, in, t[0], range));
232 }
233
Task167(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)234 Task167::Task167(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
235 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
236 out_ = t[0];
237 in_ = in;
238 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
239 for (auto& a3 : *range[2])
240 for (auto& a1 : *range[2])
241 if (t[0]->is_local(a1, a3))
242 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a1, a3}}, in, t[0], range));
243 }
244
Task168(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)245 Task168::Task168(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
246 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
247 out_ = t[0];
248 in_ = in;
249 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
250 for (auto& a3 : *range[2])
251 for (auto& a1 : *range[2])
252 if (t[0]->is_local(a1, a3))
253 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a1, a3}}, in, t[0], range));
254 }
255
Task169(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)256 Task169::Task169(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
257 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
258 out_ = t[0];
259 in_ = in;
260 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[0]->nblock());
261 for (auto& x3 : *range[1])
262 for (auto& x2 : *range[1])
263 for (auto& a1 : *range[2])
264 for (auto& c2 : *range[0])
265 if (t[0]->is_local(c2, a1, x2, x3))
266 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, a1, x2, x3}}, in, t[0], range));
267 }
268
Task170(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)269 Task170::Task170(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
270 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
271 out_ = t[0];
272 in_ = in;
273 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
274 for (auto& a3 : *range[2])
275 for (auto& a1 : *range[2])
276 if (t[0]->is_local(a1, a3))
277 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a1, a3}}, in, t[0], range));
278 }
279
Task171(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)280 Task171::Task171(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
281 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
282 out_ = t[0];
283 in_ = in;
284 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[0]->nblock());
285 for (auto& x2 : *range[1])
286 for (auto& x3 : *range[1])
287 for (auto& a1 : *range[2])
288 for (auto& c2 : *range[0])
289 if (t[0]->is_local(c2, a1, x3, x2))
290 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c2, a1, x3, x2}}, in, t[0], range));
291 }
292
Task172(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)293 Task172::Task172(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
294 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
295 out_ = t[0];
296 in_ = in;
297 subtasks_.reserve(range[2]->nblock()*range[0]->nblock());
298 for (auto& a4 : *range[2])
299 for (auto& c3 : *range[0])
300 if (t[0]->is_local(c3, a4))
301 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c3, a4}}, in, t[0], range));
302 }
303
Task173(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)304 Task173::Task173(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
305 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
306 out_ = t[0];
307 in_ = in;
308 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
309 for (auto& c3 : *range[0])
310 for (auto& a4 : *range[2])
311 if (t[0]->is_local(a4, c3))
312 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, c3}}, in, t[0], range));
313 }
314
Task174(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)315 Task174::Task174(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
316 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
317 out_ = t[0];
318 in_ = in;
319 subtasks_.reserve(range[2]->nblock()*range[0]->nblock());
320 for (auto& a1 : *range[2])
321 for (auto& c2 : *range[0])
322 if (t[0]->is_local(c2, a1))
323 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c2, a1}}, in, t[0], range));
324 }
325
Task175(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)326 Task175::Task175(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
327 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
328 out_ = t[0];
329 in_ = in;
330 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
331 for (auto& c3 : *range[0])
332 for (auto& a4 : *range[2])
333 if (t[0]->is_local(a4, c3))
334 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, c3}}, in, t[0], range));
335 }
336
Task176(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)337 Task176::Task176(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
338 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
339 out_ = t[0];
340 in_ = in;
341 subtasks_.reserve(range[2]->nblock()*range[0]->nblock());
342 for (auto& a1 : *range[2])
343 for (auto& c2 : *range[0])
344 if (t[0]->is_local(c2, a1))
345 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c2, a1}}, in, t[0], range));
346 }
347
Task177(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)348 Task177::Task177(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
349 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
350 out_ = t[0];
351 in_ = in;
352 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
353 for (auto& c3 : *range[0])
354 for (auto& a4 : *range[2])
355 if (t[0]->is_local(a4, c3))
356 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, c3}}, in, t[0], range));
357 }
358
Task178(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)359 Task178::Task178(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
360 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
361 out_ = t[0];
362 in_ = in;
363 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
364 for (auto& c1 : *range[0])
365 for (auto& a2 : *range[2])
366 if (t[0]->is_local(a2, c1))
367 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, c1}}, in, t[0], range));
368 }
369
Task179(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)370 Task179::Task179(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
371 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
372 out_ = t[0];
373 in_ = in;
374 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
375 for (auto& c3 : *range[0])
376 for (auto& a4 : *range[2])
377 if (t[0]->is_local(a4, c3))
378 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a4, c3}}, in, t[0], range));
379 }
380
Task180(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)381 Task180::Task180(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
382 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
383 out_ = t[0];
384 in_ = in;
385 subtasks_.reserve(range[0]->nblock()*range[2]->nblock());
386 for (auto& c1 : *range[0])
387 for (auto& a2 : *range[2])
388 if (t[0]->is_local(a2, c1))
389 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, c1}}, in, t[0], range));
390 }
391
Task181(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)392 Task181::Task181(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[1]->nblock()*range[2]->nblock());
397 for (auto& x2 : *range[1])
398 for (auto& a2 : *range[2])
399 if (t[0]->is_local(a2, x2))
400 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, x2}}, in, t[0], range));
401 }
402
Task182(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)403 Task182::Task182(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
404 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
405 out_ = t[0];
406 in_ = in;
407 subtasks_.reserve(range[2]->nblock()*range[1]->nblock());
408 for (auto& a2 : *range[2])
409 for (auto& x2 : *range[1])
410 if (t[0]->is_local(x2, a2))
411 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, a2}}, in, t[0], range));
412 }
413
Task183(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)414 Task183::Task183(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
415 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
416 out_ = t[0];
417 in_ = in;
418 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[1]->nblock()*range[0]->nblock());
419 for (auto& x2 : *range[1])
420 for (auto& x0 : *range[1])
421 for (auto& x1 : *range[1])
422 for (auto& c1 : *range[0])
423 if (t[0]->is_local(c1, x1, x0, x2))
424 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{c1, x1, x0, x2}}, in, t[0], range));
425 }
426
Task184(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)427 Task184::Task184(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
428 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
429 out_ = t[0];
430 in_ = in;
431 subtasks_.reserve(range[2]->nblock()*range[1]->nblock());
432 for (auto& a2 : *range[2])
433 for (auto& x2 : *range[1])
434 if (t[0]->is_local(x2, a2))
435 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, a2}}, in, t[0], range));
436 }
437
Task185(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)438 Task185::Task185(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
439 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
440 out_ = t[0];
441 in_ = in;
442 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[1]->nblock()*range[2]->nblock());
443 for (auto& x1 : *range[1])
444 for (auto& x2 : *range[1])
445 for (auto& x0 : *range[1])
446 for (auto& a1 : *range[2])
447 if (t[0]->is_local(a1, x0, x2, x1))
448 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a1, x0, x2, x1}}, in, t[0], range));
449 }
450
Task186(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)451 Task186::Task186(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
452 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
453 out_ = t[0];
454 in_ = in;
455 subtasks_.reserve(range[0]->nblock()*range[0]->nblock());
456 for (auto& c1 : *range[0])
457 for (auto& c3 : *range[0])
458 if (t[0]->is_local(c3, c1))
459 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c3, c1}}, in, t[0], range));
460 }
461
Task187(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)462 Task187::Task187(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
463 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
464 out_ = t[0];
465 in_ = in;
466 subtasks_.reserve(range[0]->nblock()*range[0]->nblock());
467 for (auto& c3 : *range[0])
468 for (auto& c1 : *range[0])
469 if (t[0]->is_local(c1, c3))
470 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c1, c3}}, in, t[0], range));
471 }
472
Task188(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)473 Task188::Task188(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
474 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
475 out_ = t[0];
476 in_ = in;
477 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
478 for (auto& x2 : *range[1])
479 for (auto& x3 : *range[1])
480 for (auto& c1 : *range[0])
481 for (auto& a2 : *range[2])
482 if (t[0]->is_local(a2, c1, x3, x2))
483 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x3, x2}}, in, t[0], range));
484 }
485
Task189(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)486 Task189::Task189(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
487 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
488 out_ = t[0];
489 in_ = in;
490 subtasks_.reserve(range[0]->nblock()*range[0]->nblock());
491 for (auto& c3 : *range[0])
492 for (auto& c1 : *range[0])
493 if (t[0]->is_local(c1, c3))
494 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{c1, c3}}, in, t[0], range));
495 }
496
Task190(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)497 Task190::Task190(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
498 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
499 out_ = t[0];
500 in_ = in;
501 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
502 for (auto& x2 : *range[1])
503 for (auto& x3 : *range[1])
504 for (auto& c1 : *range[0])
505 for (auto& a2 : *range[2])
506 if (t[0]->is_local(a2, c1, x3, x2))
507 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x3, x2}}, in, t[0], range));
508 }
509
Task191(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)510 Task191::Task191(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
511 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
512 out_ = t[0];
513 in_ = in;
514 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
515 for (auto& a3 : *range[2])
516 for (auto& a2 : *range[2])
517 if (t[0]->is_local(a2, a3))
518 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, a3}}, in, t[0], range));
519 }
520
Task192(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)521 Task192::Task192(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
522 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
523 out_ = t[0];
524 in_ = in;
525 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
526 for (auto& a3 : *range[2])
527 for (auto& a2 : *range[2])
528 if (t[0]->is_local(a2, a3))
529 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, a3}}, in, t[0], range));
530 }
531
Task193(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)532 Task193::Task193(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
533 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
534 out_ = t[0];
535 in_ = in;
536 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
537 for (auto& x2 : *range[1])
538 for (auto& x3 : *range[1])
539 for (auto& c1 : *range[0])
540 for (auto& a2 : *range[2])
541 if (t[0]->is_local(a2, c1, x3, x2))
542 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x3, x2}}, in, t[0], range));
543 }
544
Task194(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)545 Task194::Task194(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
546 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
547 out_ = t[0];
548 in_ = in;
549 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
550 for (auto& a3 : *range[2])
551 for (auto& a2 : *range[2])
552 if (t[0]->is_local(a2, a3))
553 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, a3}}, in, t[0], range));
554 }
555
Task195(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)556 Task195::Task195(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
557 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
558 out_ = t[0];
559 in_ = in;
560 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[0]->nblock()*range[2]->nblock());
561 for (auto& x2 : *range[1])
562 for (auto& x3 : *range[1])
563 for (auto& c1 : *range[0])
564 for (auto& a2 : *range[2])
565 if (t[0]->is_local(a2, c1, x3, x2))
566 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, c1, x3, x2}}, in, t[0], range));
567 }
568
Task196(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)569 Task196::Task196(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
570 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
571 out_ = t[0];
572 in_ = in;
573 subtasks_.reserve(range[2]->nblock()*range[2]->nblock());
574 for (auto& a3 : *range[2])
575 for (auto& a2 : *range[2])
576 if (t[0]->is_local(a2, a3))
577 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{a2, a3}}, in, t[0], range));
578 }
579
Task197(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)580 Task197::Task197(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
581 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
582 out_ = t[0];
583 in_ = in;
584 subtasks_.reserve(range[1]->nblock()*range[1]->nblock()*range[2]->nblock()*range[2]->nblock());
585 for (auto& x2 : *range[1])
586 for (auto& x3 : *range[1])
587 for (auto& a1 : *range[2])
588 for (auto& a2 : *range[2])
589 if (t[0]->is_local(a2, a1, x3, x2))
590 subtasks_.push_back(make_shared<Task_local>(array<const Index,4>{{a2, a1, x3, x2}}, in, t[0], range));
591 }
592
Task198(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)593 Task198::Task198(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
594 array<shared_ptr<const Tensor>,1> in = {{t[1]}};
595 out_ = t[0];
596 in_ = in;
597 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
598 for (auto& c1 : *range[0])
599 for (auto& x2 : *range[1])
600 if (t[0]->is_local(x2, c1))
601 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c1}}, in, t[0], range));
602 }
603
Task199(vector<shared_ptr<Tensor>> t,array<shared_ptr<const IndexRange>,3> range)604 Task199::Task199(vector<shared_ptr<Tensor>> t, array<shared_ptr<const IndexRange>,3> range) {
605 array<shared_ptr<const Tensor>,2> in = {{t[1], t[2]}};
606 out_ = t[0];
607 in_ = in;
608 subtasks_.reserve(range[0]->nblock()*range[1]->nblock());
609 for (auto& c1 : *range[0])
610 for (auto& x2 : *range[1])
611 if (t[0]->is_local(x2, c1))
612 subtasks_.push_back(make_shared<Task_local>(array<const Index,2>{{x2, c1}}, in, t[0], range));
613 }
614
615 #endif
616