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