forked from dillonhuff/clockwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lucas_kanade.cpp
694 lines (578 loc) · 67.6 KB
/
lucas_kanade.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
#include "example_progs.h"
prog lucas_kanade() {
prog prg;
prg.compute_unit_file = "lucas_kanade_compute.h";
prg.name = "lucas_kanade";
// Stencil<float, 34, 34, 2, 2> &AtA_stencil = arg_0;
prg.add_input("AtA_stencil");
prg.buffer_port_widths["AtA_stencil"] = 32;
// Stencil<uint8_t, 65, 65> &input0_copy_stencil = arg_1;
prg.add_input("input0_copy_stencil");
prg.buffer_port_widths["input0_copy_stencil"] = 8;
// Stencil<uint8_t, 65, 65> &input1_copy_stencil = arg_2;
prg.add_input("input1_copy_stencil");
prg.buffer_port_widths["input1_copy_stencil"] = 8;
// Stencil<float, 34, 34, 2> &hw_output_stencil = arg_3;
prg.add_output("hw_output_stencil");
prg.buffer_port_widths["hw_output_stencil"] = 32;
auto hw_output_s0_z = prg.add_loop("hw_output_s0_z", 0, 2);
auto hw_output_s0_y_yi = hw_output_s0_z->add_loop("hw_output_s0_y_yi", 0, 34);
auto hw_output_s0_x_xi = hw_output_s0_y_yi->add_loop("hw_output_s0_x_xi", 0, 34);
////producing nu.stencil
auto nu_s0_w = hw_output_s0_x_xi->add_loop("nu_s0_w", 0, 2);
//store is: nu.stencil(0, 0, nu_s0_w) = 0.000000f
auto hcompute_nu_stencil = nu_s0_w->add_op("op_hcompute_nu_stencil");
hcompute_nu_stencil->add_function("hcompute_nu_stencil");
prg.buffer_port_widths["nu_stencil"] = 32;
hcompute_nu_stencil->add_store("nu_stencil", "nu_s0_w", "0", "0");
auto nu_s1_w = hw_output_s0_x_xi->add_loop("nu_s1_w", 0, 2);
auto nu_s1_rwin_x_rwin_x = nu_s1_w->add_loop("nu_s1_rwin_x_rwin_x", 0, 120);
////producing ft.stencil
auto ft_s0_x = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x", 0, 31);
//store is: ft.stencil(ft_s0_x, 0) = 0.000000f
auto hcompute_ft_stencil = ft_s0_x->add_op("op_hcompute_ft_stencil");
hcompute_ft_stencil->add_function("hcompute_ft_stencil");
prg.buffer_port_widths["ft_stencil"] = 32;
hcompute_ft_stencil->add_store("ft_stencil", "0", "ft_s0_x");
auto ft_s1_x = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x", 0, 31);
//store is: ft.stencil(ft_s1_x, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1)))) - float32(uint16(input0_copy.stencil(((ft_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1)))) - float32(uint16(input0_copy.stencil(((ft_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_1 = ft_s1_x->add_op("op_hcompute_ft_stencil_1");
hcompute_ft_stencil_1->add_function("hcompute_ft_stencil_1");
hcompute_ft_stencil_1->add_load("ft_stencil", "0", "ft_s1_x");
hcompute_ft_stencil_1->add_load("input0_copy_stencil", "((floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi) + 1)", "((ft_s1_x + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_1->add_load("input0_copy_stencil", "(floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi)", "(ft_s1_x + hw_output_s0_x_xi)");
hcompute_ft_stencil_1->add_load("input1_copy_stencil", "((floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi) + 1)", "((ft_s1_x + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_1->add_load("input1_copy_stencil", "(floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi)", "(ft_s1_x + hw_output_s0_x_xi)");
hcompute_ft_stencil_1->add_store("ft_stencil", "0", "ft_s1_x");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil");
hcompute_Apinv_stencil->add_function("hcompute_Apinv_stencil");
prg.buffer_port_widths["Apinv_stencil"] = 32;
hcompute_Apinv_stencil->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x, 0) = 0.000000f
auto hcompute_fx_1_stencil = fx_1_s0_x->add_op("op_hcompute_fx_1_stencil");
hcompute_fx_1_stencil->add_function("hcompute_fx_1_stencil");
prg.buffer_port_widths["fx_1_stencil"] = 32;
hcompute_fx_1_stencil->add_store("fx_1_stencil", "0", "fx_1_s0_x");
auto fx_1_s1_x = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi) + 1))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x + hw_output_s0_x_xi), (((nu_s1_rwin_x_rwin_x*8)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_1 = fx_1_s1_x->add_op("op_hcompute_fx_1_stencil_1");
hcompute_fx_1_stencil_1->add_function("hcompute_fx_1_stencil_1");
hcompute_fx_1_stencil_1->add_load("fx_1_stencil", "0", "fx_1_s1_x");
hcompute_fx_1_stencil_1->add_load("input0_copy_stencil", "((floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi) + 1)", "((fx_1_s1_x + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_1->add_load("input0_copy_stencil", "(floor(((nu_s1_rwin_x_rwin_x*8)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_1->add_store("fx_1_stencil", "0", "fx_1_s1_x");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil(((nu_s1_rwin_x_rwin_x*8) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil(((nu_s1_rwin_x_rwin_x*8) % 31), 0))))
auto hcompute_Apinv_stencil_1 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_1");
hcompute_Apinv_stencil_1->add_function("hcompute_Apinv_stencil_1");
hcompute_Apinv_stencil_1->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_1->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_1->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_1->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_1->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
prg.buffer_port_widths["fx_stencil"] = 32;
hcompute_Apinv_stencil_1->add_load("fx_stencil", "0", "((nu_s1_rwin_x_rwin_x*8) % 31)");
hcompute_Apinv_stencil_1->add_load("fx_1_stencil", "0", "((nu_s1_rwin_x_rwin_x*8) % 31)");
prg.buffer_port_widths["inv_stencil"] = 32;
hcompute_Apinv_stencil_1->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_1->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_1->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil(((nu_s1_rwin_x_rwin_x*8) % 31), 0))
auto hcompute_nu_stencil_1 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_1");
hcompute_nu_stencil_1->add_function("hcompute_nu_stencil_1");
hcompute_nu_stencil_1->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_1->add_load("ft_stencil", "0", "((nu_s1_rwin_x_rwin_x*8) % 31)");
hcompute_nu_stencil_1->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_1 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_1", 0, 31);
//store is: ft.stencil(ft_s0_x_1, 0) = 0.000000f
auto hcompute_ft_stencil_2 = ft_s0_x_1->add_op("op_hcompute_ft_stencil_2");
hcompute_ft_stencil_2->add_function("hcompute_ft_stencil_2");
hcompute_ft_stencil_2->add_store("ft_stencil", "0", "ft_s0_x_1");
auto ft_s1_x_1 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_1", 0, 31);
//store is: ft.stencil(ft_s1_x_1, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_1, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_3 = ft_s1_x_1->add_op("op_hcompute_ft_stencil_3");
hcompute_ft_stencil_3->add_function("hcompute_ft_stencil_3");
hcompute_ft_stencil_3->add_load("ft_stencil", "0", "ft_s1_x_1");
hcompute_ft_stencil_3->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 32)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_1 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_3->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 1)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_1 + hw_output_s0_x_xi)");
hcompute_ft_stencil_3->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 32)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_1 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_3->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 1)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_1 + hw_output_s0_x_xi)");
hcompute_ft_stencil_3->add_store("ft_stencil", "0", "ft_s1_x_1");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_2 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_2");
hcompute_Apinv_stencil_2->add_function("hcompute_Apinv_stencil_2");
hcompute_Apinv_stencil_2->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_1 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_1", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_1, 0) = 0.000000f
auto hcompute_fx_1_stencil_2 = fx_1_s0_x_1->add_op("op_hcompute_fx_1_stencil_2");
hcompute_fx_1_stencil_2->add_function("hcompute_fx_1_stencil_2");
hcompute_fx_1_stencil_2->add_store("fx_1_stencil", "0", "fx_1_s0_x_1");
auto fx_1_s1_x_1 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_1", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_1, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_1 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 32)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_1, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_1 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 1)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_3 = fx_1_s1_x_1->add_op("op_hcompute_fx_1_stencil_3");
hcompute_fx_1_stencil_3->add_function("hcompute_fx_1_stencil_3");
hcompute_fx_1_stencil_3->add_load("fx_1_stencil", "0", "fx_1_s1_x_1");
hcompute_fx_1_stencil_3->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 32)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_1 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_3->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 1)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_1 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_3->add_store("fx_1_stencil", "0", "fx_1_s1_x_1");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 1) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 1) % 31), 0))))
auto hcompute_Apinv_stencil_3 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_3");
hcompute_Apinv_stencil_3->add_function("hcompute_Apinv_stencil_3");
hcompute_Apinv_stencil_3->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_3->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_3->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_3->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_3->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_3->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 1) % 31)");
hcompute_Apinv_stencil_3->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 1) % 31)");
hcompute_Apinv_stencil_3->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_3->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_3->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 1) % 31), 0))
auto hcompute_nu_stencil_2 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_2");
hcompute_nu_stencil_2->add_function("hcompute_nu_stencil_2");
hcompute_nu_stencil_2->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_2->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 1) % 31)");
hcompute_nu_stencil_2->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_2 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_2", 0, 31);
//store is: ft.stencil(ft_s0_x_2, 0) = 0.000000f
auto hcompute_ft_stencil_4 = ft_s0_x_2->add_op("op_hcompute_ft_stencil_4");
hcompute_ft_stencil_4->add_function("hcompute_ft_stencil_4");
hcompute_ft_stencil_4->add_store("ft_stencil", "0", "ft_s0_x_2");
auto ft_s1_x_2 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_2", 0, 31);
//store is: ft.stencil(ft_s1_x_2, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_2, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_5 = ft_s1_x_2->add_op("op_hcompute_ft_stencil_5");
hcompute_ft_stencil_5->add_function("hcompute_ft_stencil_5");
hcompute_ft_stencil_5->add_load("ft_stencil", "0", "ft_s1_x_2");
hcompute_ft_stencil_5->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 2)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_2 + hw_output_s0_x_xi)");
hcompute_ft_stencil_5->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 33)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_2 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_5->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 33)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_2 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_5->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 2)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_2 + hw_output_s0_x_xi)");
hcompute_ft_stencil_5->add_store("ft_stencil", "0", "ft_s1_x_2");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_4 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_4");
hcompute_Apinv_stencil_4->add_function("hcompute_Apinv_stencil_4");
hcompute_Apinv_stencil_4->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_2 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_2", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_2, 0) = 0.000000f
auto hcompute_fx_1_stencil_4 = fx_1_s0_x_2->add_op("op_hcompute_fx_1_stencil_4");
hcompute_fx_1_stencil_4->add_function("hcompute_fx_1_stencil_4");
hcompute_fx_1_stencil_4->add_store("fx_1_stencil", "0", "fx_1_s0_x_2");
auto fx_1_s1_x_2 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_2", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_2, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_2 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 33)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_2, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_2 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 2)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_5 = fx_1_s1_x_2->add_op("op_hcompute_fx_1_stencil_5");
hcompute_fx_1_stencil_5->add_function("hcompute_fx_1_stencil_5");
hcompute_fx_1_stencil_5->add_load("fx_1_stencil", "0", "fx_1_s1_x_2");
hcompute_fx_1_stencil_5->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 33)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_2 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_5->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 2)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_2 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_5->add_store("fx_1_stencil", "0", "fx_1_s1_x_2");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 2) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 2) % 31), 0))))
auto hcompute_Apinv_stencil_5 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_5");
hcompute_Apinv_stencil_5->add_function("hcompute_Apinv_stencil_5");
hcompute_Apinv_stencil_5->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_5->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_5->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_5->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_5->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_5->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 2) % 31)");
hcompute_Apinv_stencil_5->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 2) % 31)");
hcompute_Apinv_stencil_5->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_5->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_5->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 2) % 31), 0))
auto hcompute_nu_stencil_3 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_3");
hcompute_nu_stencil_3->add_function("hcompute_nu_stencil_3");
hcompute_nu_stencil_3->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_3->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 2) % 31)");
hcompute_nu_stencil_3->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_3 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_3", 0, 31);
//store is: ft.stencil(ft_s0_x_3, 0) = 0.000000f
auto hcompute_ft_stencil_6 = ft_s0_x_3->add_op("op_hcompute_ft_stencil_6");
hcompute_ft_stencil_6->add_function("hcompute_ft_stencil_6");
hcompute_ft_stencil_6->add_store("ft_stencil", "0", "ft_s0_x_3");
auto ft_s1_x_3 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_3", 0, 31);
//store is: ft.stencil(ft_s1_x_3, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_3, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_7 = ft_s1_x_3->add_op("op_hcompute_ft_stencil_7");
hcompute_ft_stencil_7->add_function("hcompute_ft_stencil_7");
hcompute_ft_stencil_7->add_load("ft_stencil", "0", "ft_s1_x_3");
hcompute_ft_stencil_7->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 34)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_3 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_7->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 3)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_3 + hw_output_s0_x_xi)");
hcompute_ft_stencil_7->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 34)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_3 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_7->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 3)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_3 + hw_output_s0_x_xi)");
hcompute_ft_stencil_7->add_store("ft_stencil", "0", "ft_s1_x_3");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_6 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_6");
hcompute_Apinv_stencil_6->add_function("hcompute_Apinv_stencil_6");
hcompute_Apinv_stencil_6->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_3 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_3", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_3, 0) = 0.000000f
auto hcompute_fx_1_stencil_6 = fx_1_s0_x_3->add_op("op_hcompute_fx_1_stencil_6");
hcompute_fx_1_stencil_6->add_function("hcompute_fx_1_stencil_6");
hcompute_fx_1_stencil_6->add_store("fx_1_stencil", "0", "fx_1_s0_x_3");
auto fx_1_s1_x_3 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_3", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_3, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_3 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 34)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_3, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_3 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 3)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_7 = fx_1_s1_x_3->add_op("op_hcompute_fx_1_stencil_7");
hcompute_fx_1_stencil_7->add_function("hcompute_fx_1_stencil_7");
hcompute_fx_1_stencil_7->add_load("fx_1_stencil", "0", "fx_1_s1_x_3");
hcompute_fx_1_stencil_7->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 34)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_3 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_7->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 3)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_3 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_7->add_store("fx_1_stencil", "0", "fx_1_s1_x_3");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 3) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 3) % 31), 0))))
auto hcompute_Apinv_stencil_7 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_7");
hcompute_Apinv_stencil_7->add_function("hcompute_Apinv_stencil_7");
hcompute_Apinv_stencil_7->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_7->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_7->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_7->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_7->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_7->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 3) % 31)");
hcompute_Apinv_stencil_7->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 3) % 31)");
hcompute_Apinv_stencil_7->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_7->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_7->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 3) % 31), 0))
auto hcompute_nu_stencil_4 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_4");
hcompute_nu_stencil_4->add_function("hcompute_nu_stencil_4");
hcompute_nu_stencil_4->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_4->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 3) % 31)");
hcompute_nu_stencil_4->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_4 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_4", 0, 31);
//store is: ft.stencil(ft_s0_x_4, 0) = 0.000000f
auto hcompute_ft_stencil_8 = ft_s0_x_4->add_op("op_hcompute_ft_stencil_8");
hcompute_ft_stencil_8->add_function("hcompute_ft_stencil_8");
hcompute_ft_stencil_8->add_store("ft_stencil", "0", "ft_s0_x_4");
auto ft_s1_x_4 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_4", 0, 31);
//store is: ft.stencil(ft_s1_x_4, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_4, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_9 = ft_s1_x_4->add_op("op_hcompute_ft_stencil_9");
hcompute_ft_stencil_9->add_function("hcompute_ft_stencil_9");
hcompute_ft_stencil_9->add_load("ft_stencil", "0", "ft_s1_x_4");
hcompute_ft_stencil_9->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 35)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_4 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_9->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 4)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_4 + hw_output_s0_x_xi)");
hcompute_ft_stencil_9->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 4)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_4 + hw_output_s0_x_xi)");
hcompute_ft_stencil_9->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 35)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_4 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_9->add_store("ft_stencil", "0", "ft_s1_x_4");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_8 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_8");
hcompute_Apinv_stencil_8->add_function("hcompute_Apinv_stencil_8");
hcompute_Apinv_stencil_8->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_4 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_4", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_4, 0) = 0.000000f
auto hcompute_fx_1_stencil_8 = fx_1_s0_x_4->add_op("op_hcompute_fx_1_stencil_8");
hcompute_fx_1_stencil_8->add_function("hcompute_fx_1_stencil_8");
hcompute_fx_1_stencil_8->add_store("fx_1_stencil", "0", "fx_1_s0_x_4");
auto fx_1_s1_x_4 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_4", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_4, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_4 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 35)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_4, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_4 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 4)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_9 = fx_1_s1_x_4->add_op("op_hcompute_fx_1_stencil_9");
hcompute_fx_1_stencil_9->add_function("hcompute_fx_1_stencil_9");
hcompute_fx_1_stencil_9->add_load("fx_1_stencil", "0", "fx_1_s1_x_4");
hcompute_fx_1_stencil_9->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 35)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_4 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_9->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 4)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_4 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_9->add_store("fx_1_stencil", "0", "fx_1_s1_x_4");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 4) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 4) % 31), 0))))
auto hcompute_Apinv_stencil_9 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_9");
hcompute_Apinv_stencil_9->add_function("hcompute_Apinv_stencil_9");
hcompute_Apinv_stencil_9->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_9->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_9->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_9->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_9->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_9->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 4) % 31)");
hcompute_Apinv_stencil_9->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 4) % 31)");
hcompute_Apinv_stencil_9->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_9->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_9->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 4) % 31), 0))
auto hcompute_nu_stencil_5 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_5");
hcompute_nu_stencil_5->add_function("hcompute_nu_stencil_5");
hcompute_nu_stencil_5->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_5->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 4) % 31)");
hcompute_nu_stencil_5->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_5 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_5", 0, 31);
//store is: ft.stencil(ft_s0_x_5, 0) = 0.000000f
auto hcompute_ft_stencil_10 = ft_s0_x_5->add_op("op_hcompute_ft_stencil_10");
hcompute_ft_stencil_10->add_function("hcompute_ft_stencil_10");
hcompute_ft_stencil_10->add_store("ft_stencil", "0", "ft_s0_x_5");
auto ft_s1_x_5 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_5", 0, 31);
//store is: ft.stencil(ft_s1_x_5, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_5, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_11 = ft_s1_x_5->add_op("op_hcompute_ft_stencil_11");
hcompute_ft_stencil_11->add_function("hcompute_ft_stencil_11");
hcompute_ft_stencil_11->add_load("ft_stencil", "0", "ft_s1_x_5");
hcompute_ft_stencil_11->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 36)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_5 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_11->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 5)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_5 + hw_output_s0_x_xi)");
hcompute_ft_stencil_11->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 36)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_5 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_11->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 5)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_5 + hw_output_s0_x_xi)");
hcompute_ft_stencil_11->add_store("ft_stencil", "0", "ft_s1_x_5");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_10 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_10");
hcompute_Apinv_stencil_10->add_function("hcompute_Apinv_stencil_10");
hcompute_Apinv_stencil_10->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_5 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_5", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_5, 0) = 0.000000f
auto hcompute_fx_1_stencil_10 = fx_1_s0_x_5->add_op("op_hcompute_fx_1_stencil_10");
hcompute_fx_1_stencil_10->add_function("hcompute_fx_1_stencil_10");
hcompute_fx_1_stencil_10->add_store("fx_1_stencil", "0", "fx_1_s0_x_5");
auto fx_1_s1_x_5 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_5", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_5, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_5 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 36)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_5, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_5 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 5)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_11 = fx_1_s1_x_5->add_op("op_hcompute_fx_1_stencil_11");
hcompute_fx_1_stencil_11->add_function("hcompute_fx_1_stencil_11");
hcompute_fx_1_stencil_11->add_load("fx_1_stencil", "0", "fx_1_s1_x_5");
hcompute_fx_1_stencil_11->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 36)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_5 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_11->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 5)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_5 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_11->add_store("fx_1_stencil", "0", "fx_1_s1_x_5");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 5) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 5) % 31), 0))))
auto hcompute_Apinv_stencil_11 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_11");
hcompute_Apinv_stencil_11->add_function("hcompute_Apinv_stencil_11");
hcompute_Apinv_stencil_11->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_11->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_11->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_11->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_11->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_11->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 5) % 31)");
hcompute_Apinv_stencil_11->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 5) % 31)");
hcompute_Apinv_stencil_11->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_11->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_11->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 5) % 31), 0))
auto hcompute_nu_stencil_6 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_6");
hcompute_nu_stencil_6->add_function("hcompute_nu_stencil_6");
hcompute_nu_stencil_6->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_6->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 5) % 31)");
hcompute_nu_stencil_6->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_6 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_6", 0, 31);
//store is: ft.stencil(ft_s0_x_6, 0) = 0.000000f
auto hcompute_ft_stencil_12 = ft_s0_x_6->add_op("op_hcompute_ft_stencil_12");
hcompute_ft_stencil_12->add_function("hcompute_ft_stencil_12");
hcompute_ft_stencil_12->add_store("ft_stencil", "0", "ft_s0_x_6");
auto ft_s1_x_6 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_6", 0, 31);
//store is: ft.stencil(ft_s1_x_6, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_6, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_13 = ft_s1_x_6->add_op("op_hcompute_ft_stencil_13");
hcompute_ft_stencil_13->add_function("hcompute_ft_stencil_13");
hcompute_ft_stencil_13->add_load("ft_stencil", "0", "ft_s1_x_6");
hcompute_ft_stencil_13->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 37)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_6 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_13->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 6)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_6 + hw_output_s0_x_xi)");
hcompute_ft_stencil_13->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 37)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_6 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_13->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 6)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_6 + hw_output_s0_x_xi)");
hcompute_ft_stencil_13->add_store("ft_stencil", "0", "ft_s1_x_6");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_12 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_12");
hcompute_Apinv_stencil_12->add_function("hcompute_Apinv_stencil_12");
hcompute_Apinv_stencil_12->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_6 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_6", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_6, 0) = 0.000000f
auto hcompute_fx_1_stencil_12 = fx_1_s0_x_6->add_op("op_hcompute_fx_1_stencil_12");
hcompute_fx_1_stencil_12->add_function("hcompute_fx_1_stencil_12");
hcompute_fx_1_stencil_12->add_store("fx_1_stencil", "0", "fx_1_s0_x_6");
auto fx_1_s1_x_6 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_6", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_6, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_6 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 37)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_6, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_6 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 6)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_13 = fx_1_s1_x_6->add_op("op_hcompute_fx_1_stencil_13");
hcompute_fx_1_stencil_13->add_function("hcompute_fx_1_stencil_13");
hcompute_fx_1_stencil_13->add_load("fx_1_stencil", "0", "fx_1_s1_x_6");
hcompute_fx_1_stencil_13->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 37)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_6 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_13->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 6)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_6 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_13->add_store("fx_1_stencil", "0", "fx_1_s1_x_6");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 6) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 6) % 31), 0))))
auto hcompute_Apinv_stencil_13 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_13");
hcompute_Apinv_stencil_13->add_function("hcompute_Apinv_stencil_13");
hcompute_Apinv_stencil_13->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_13->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_13->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_13->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_13->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_13->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 6) % 31)");
hcompute_Apinv_stencil_13->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 6) % 31)");
hcompute_Apinv_stencil_13->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_13->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_13->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 6) % 31), 0))
auto hcompute_nu_stencil_7 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_7");
hcompute_nu_stencil_7->add_function("hcompute_nu_stencil_7");
hcompute_nu_stencil_7->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_7->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 6) % 31)");
hcompute_nu_stencil_7->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_7 = nu_s1_rwin_x_rwin_x->add_loop("ft_s0_x_7", 0, 31);
//store is: ft.stencil(ft_s0_x_7, 0) = 0.000000f
auto hcompute_ft_stencil_14 = ft_s0_x_7->add_op("op_hcompute_ft_stencil_14");
hcompute_ft_stencil_14->add_function("hcompute_ft_stencil_14");
hcompute_ft_stencil_14->add_store("ft_stencil", "0", "ft_s0_x_7");
auto ft_s1_x_7 = nu_s1_rwin_x_rwin_x->add_loop("ft_s1_x_7", 0, 31);
//store is: ft.stencil(ft_s1_x_7, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi)))))*0.000980f) + (ft.stencil(ft_s1_x_7, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi)))) - float32(uint16(input0_copy.stencil((ft_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi)))))*0.000980f)))))
auto hcompute_ft_stencil_15 = ft_s1_x_7->add_op("op_hcompute_ft_stencil_15");
hcompute_ft_stencil_15->add_function("hcompute_ft_stencil_15");
hcompute_ft_stencil_15->add_load("ft_stencil", "0", "ft_s1_x_7");
hcompute_ft_stencil_15->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 38)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_7 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_15->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 7)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_7 + hw_output_s0_x_xi)");
hcompute_ft_stencil_15->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 38)/31)) + hw_output_s0_y_yi)", "((ft_s1_x_7 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_15->add_load("input1_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 7)/31)) + hw_output_s0_y_yi)", "(ft_s1_x_7 + hw_output_s0_x_xi)");
hcompute_ft_stencil_15->add_store("ft_stencil", "0", "ft_s1_x_7");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_14 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_14");
hcompute_Apinv_stencil_14->add_function("hcompute_Apinv_stencil_14");
hcompute_Apinv_stencil_14->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_7 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s0_x_7", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_7, 0) = 0.000000f
auto hcompute_fx_1_stencil_14 = fx_1_s0_x_7->add_op("op_hcompute_fx_1_stencil_14");
hcompute_fx_1_stencil_14->add_function("hcompute_fx_1_stencil_14");
hcompute_fx_1_stencil_14->add_store("fx_1_stencil", "0", "fx_1_s0_x_7");
auto fx_1_s1_x_7 = nu_s1_rwin_x_rwin_x->add_loop("fx_1_s1_x_7", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_7, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_7 + hw_output_s0_x_xi) + 1), ((((nu_s1_rwin_x_rwin_x*8) + 38)/31) + hw_output_s0_y_yi))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_7, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_7 + hw_output_s0_x_xi), ((((nu_s1_rwin_x_rwin_x*8) + 7)/31) + hw_output_s0_y_yi))))*0.000980f))))
auto hcompute_fx_1_stencil_15 = fx_1_s1_x_7->add_op("op_hcompute_fx_1_stencil_15");
hcompute_fx_1_stencil_15->add_function("hcompute_fx_1_stencil_15");
hcompute_fx_1_stencil_15->add_load("fx_1_stencil", "0", "fx_1_s1_x_7");
hcompute_fx_1_stencil_15->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 38)/31)) + hw_output_s0_y_yi)", "((fx_1_s1_x_7 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_15->add_load("input0_copy_stencil", "(floor((((nu_s1_rwin_x_rwin_x*8) + 7)/31)) + hw_output_s0_y_yi)", "(fx_1_s1_x_7 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_15->add_store("fx_1_stencil", "0", "fx_1_s1_x_7");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil((((nu_s1_rwin_x_rwin_x*8) + 7) % 31), 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil((((nu_s1_rwin_x_rwin_x*8) + 7) % 31), 0))))
auto hcompute_Apinv_stencil_15 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_Apinv_stencil_15");
hcompute_Apinv_stencil_15->add_function("hcompute_Apinv_stencil_15");
hcompute_Apinv_stencil_15->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_15->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_15->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_15->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_15->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_15->add_load("fx_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 7) % 31)");
hcompute_Apinv_stencil_15->add_load("fx_1_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 7) % 31)");
hcompute_Apinv_stencil_15->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_15->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_15->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil((((nu_s1_rwin_x_rwin_x*8) + 7) % 31), 0))
auto hcompute_nu_stencil_8 = nu_s1_rwin_x_rwin_x->add_op("op_hcompute_nu_stencil_8");
hcompute_nu_stencil_8->add_function("hcompute_nu_stencil_8");
hcompute_nu_stencil_8->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_8->add_load("ft_stencil", "0", "(((nu_s1_rwin_x_rwin_x*8) + 7) % 31)");
hcompute_nu_stencil_8->add_store("nu_stencil", "nu_s1_w", "0", "0");
////producing ft.stencil
auto ft_s0_x_8 = nu_s1_w->add_loop("ft_s0_x_8", 0, 31);
//store is: ft.stencil(ft_s0_x_8, 0) = 0.000000f
auto hcompute_ft_stencil_16 = ft_s0_x_8->add_op("op_hcompute_ft_stencil_16");
hcompute_ft_stencil_16->add_function("hcompute_ft_stencil_16");
hcompute_ft_stencil_16->add_store("ft_stencil", "0", "ft_s0_x_8");
auto ft_s1_x_8 = nu_s1_w->add_loop("ft_s1_x_8", 0, 31);
//store is: ft.stencil(ft_s1_x_8, 0) = (((float32(uint16(input1_copy.stencil(((ft_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31)))))*0.000980f) + (((float32(uint16(input1_copy.stencil(((ft_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31)))) - float32(uint16(input0_copy.stencil(((ft_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31)))))*0.000980f) + (((float32(uint16(input1_copy.stencil((ft_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30)))) - float32(uint16(input0_copy.stencil((ft_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30)))))*0.000980f) + (ft.stencil(ft_s1_x_8, 0) + ((float32(uint16(input1_copy.stencil((ft_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30)))) - float32(uint16(input0_copy.stencil((ft_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30)))))*0.000980f)))))
auto hcompute_ft_stencil_17 = ft_s1_x_8->add_op("op_hcompute_ft_stencil_17");
hcompute_ft_stencil_17->add_function("hcompute_ft_stencil_17");
hcompute_ft_stencil_17->add_load("ft_stencil", "0", "ft_s1_x_8");
hcompute_ft_stencil_17->add_load("input0_copy_stencil", "(hw_output_s0_y_yi + 31)", "((ft_s1_x_8 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_17->add_load("input0_copy_stencil", "(hw_output_s0_y_yi + 30)", "(ft_s1_x_8 + hw_output_s0_x_xi)");
hcompute_ft_stencil_17->add_load("input1_copy_stencil", "(hw_output_s0_y_yi + 31)", "((ft_s1_x_8 + hw_output_s0_x_xi) + 1)");
hcompute_ft_stencil_17->add_load("input1_copy_stencil", "(hw_output_s0_y_yi + 30)", "(ft_s1_x_8 + hw_output_s0_x_xi)");
hcompute_ft_stencil_17->add_store("ft_stencil", "0", "ft_s1_x_8");
//consuming ft.stencil
////producing Apinv.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = 0.000000f
auto hcompute_Apinv_stencil_16 = nu_s1_w->add_op("op_hcompute_Apinv_stencil_16");
hcompute_Apinv_stencil_16->add_function("hcompute_Apinv_stencil_16");
hcompute_Apinv_stencil_16->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming inv.stencil
////producing fx$1.stencil
auto fx_1_s0_x_8 = nu_s1_w->add_loop("fx_1_s0_x_8", 0, 31);
//store is: fx$1.stencil(fx_1_s0_x_8, 0) = 0.000000f
auto hcompute_fx_1_stencil_16 = fx_1_s0_x_8->add_op("op_hcompute_fx_1_stencil_16");
hcompute_fx_1_stencil_16->add_function("hcompute_fx_1_stencil_16");
hcompute_fx_1_stencil_16->add_store("fx_1_stencil", "0", "fx_1_s0_x_8");
auto fx_1_s1_x_8 = nu_s1_w->add_loop("fx_1_s1_x_8", 0, 31);
//store is: fx$1.stencil(fx_1_s1_x_8, 0) = ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31))))*0.000980f) + ((float32(uint16(input0_copy.stencil(((fx_1_s1_x_8 + hw_output_s0_x_xi) + 1), (hw_output_s0_y_yi + 31))))*0.000980f) + ((fx$1.stencil(fx_1_s1_x_8, 0) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30))))*0.000980f)) - (float32(uint16(input0_copy.stencil((fx_1_s1_x_8 + hw_output_s0_x_xi), (hw_output_s0_y_yi + 30))))*0.000980f))))
auto hcompute_fx_1_stencil_17 = fx_1_s1_x_8->add_op("op_hcompute_fx_1_stencil_17");
hcompute_fx_1_stencil_17->add_function("hcompute_fx_1_stencil_17");
hcompute_fx_1_stencil_17->add_load("fx_1_stencil", "0", "fx_1_s1_x_8");
hcompute_fx_1_stencil_17->add_load("input0_copy_stencil", "(hw_output_s0_y_yi + 31)", "((fx_1_s1_x_8 + hw_output_s0_x_xi) + 1)");
hcompute_fx_1_stencil_17->add_load("input0_copy_stencil", "(hw_output_s0_y_yi + 30)", "(fx_1_s1_x_8 + hw_output_s0_x_xi)");
hcompute_fx_1_stencil_17->add_store("fx_1_stencil", "0", "fx_1_s1_x_8");
//consuming fx$1.stencil
//consuming fx.stencil
//store is: Apinv.stencil(0, 0, 0, 0) = ((fx$1.stencil(30, 0)*(inv.stencil(0, 0, 1, nu_s1_w)/((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1))))) + (Apinv.stencil(0, 0, 0, 0) + (inv.stencil(0, 0, 0, nu_s1_w)*fx.stencil(30, 0))))
auto hcompute_Apinv_stencil_17 = nu_s1_w->add_op("op_hcompute_Apinv_stencil_17");
hcompute_Apinv_stencil_17->add_function("hcompute_Apinv_stencil_17");
hcompute_Apinv_stencil_17->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_Apinv_stencil_17->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_17->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_17->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_17->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_Apinv_stencil_17->add_load("fx_stencil", "0", "30");
hcompute_Apinv_stencil_17->add_load("fx_1_stencil", "0", "30");
hcompute_Apinv_stencil_17->add_load("inv_stencil", "nu_s1_w", "1", "0", "0");
hcompute_Apinv_stencil_17->add_load("inv_stencil", "nu_s1_w", "0", "0", "0");
hcompute_Apinv_stencil_17->add_store("Apinv_stencil", "0", "0", "0", "0");
//consuming Apinv.stencil
//store is: nu.stencil(0, 0, nu_s1_w) = (Apinv.stencil(0, 0, 0, 0)*ft.stencil(30, 0))
auto hcompute_nu_stencil_9 = nu_s1_w->add_op("op_hcompute_nu_stencil_9");
hcompute_nu_stencil_9->add_function("hcompute_nu_stencil_9");
hcompute_nu_stencil_9->add_load("Apinv_stencil", "0", "0", "0", "0");
hcompute_nu_stencil_9->add_load("ft_stencil", "0", "30");
hcompute_nu_stencil_9->add_store("nu_stencil", "nu_s1_w", "0", "0");
//consuming nu.stencil
//store is: hw_output.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, hw_output_s0_z) = select(((select((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) < (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)), (((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f) - ((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))))*0.250000f), 0.000000f) + (min((select((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) < (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)), (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)), (sqrt_f32((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) - (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f))) + (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1))))*select((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) < (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)), (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)), (sqrt_f32((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) - (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f))) + (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1))))), (select((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) < (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)), (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)), ((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - sqrt_f32((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) - (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)))))*select((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) < (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)), (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)), ((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - sqrt_f32((((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))*(AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1) - AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0))) - (((AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 1)) - (AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 1, 0)*AtA.stencil(hw_output_s0_x_xi, hw_output_s0_y_yi, 0, 1)))*4.000000f)))))))*0.250000f)) < 0.010000f), 0.000000f, (nu.stencil(0, 0, 0) + nu.stencil(0, 0, 1)))
auto hcompute_hw_output_stencil = hw_output_s0_x_xi->add_op("op_hcompute_hw_output_stencil");
hcompute_hw_output_stencil->add_function("hcompute_hw_output_stencil");
hcompute_hw_output_stencil->add_load("AtA_stencil", "1", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_hw_output_stencil->add_load("AtA_stencil", "0", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_hw_output_stencil->add_load("AtA_stencil", "0", "1", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_hw_output_stencil->add_load("AtA_stencil", "1", "0", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
hcompute_hw_output_stencil->add_load("nu_stencil", "0", "0", "0");
hcompute_hw_output_stencil->add_load("nu_stencil", "1", "0", "0");
hcompute_hw_output_stencil->add_store("hw_output_stencil", "hw_output_s0_z", "hw_output_s0_y_yi", "hw_output_s0_x_xi");
return prg;
}