ARTS 2.5.4 (git: 31ce4f0e)
matpackVII.cc
Go to the documentation of this file.
1/* Copyright (C) 2002-2012 Stefan Buehler <sbuehler@ltu.se>
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
25#include "matpackVII.h"
26
27#include "exceptions.h"
28
29// Functions for ConstTensor7View:
30// ------------------------------
31
32// Const index operators:
33
34// -------
36 const Range& v,
37 const Range& s,
38 const Range& b,
39 const Range& p,
40 const Range& r,
41 const Range& c) const {
42 return ConstTensor7View(
43 mdata, mlr, mvr, msr, mbr, mpr, mrr, mcr, l, v, s, b, p, r, c);
44}
45// |------
47 const Range& v,
48 const Range& s,
49 const Range& b,
50 const Range& p,
51 const Range& r,
52 const Range& c) const {
53 CHECK(l);
54 return ConstTensor6View(
55 mdata + OFFSET(l), mvr, msr, mbr, mpr, mrr, mcr, v, s, b, p, r, c);
56}
57
58// ------|
60 const Range& v,
61 const Range& s,
62 const Range& b,
63 const Range& p,
64 const Range& r,
65 Index c) const {
66 CHECK(c);
67 return ConstTensor6View(
68 mdata + OFFSET(c), mlr, mvr, msr, mbr, mpr, mrr, l, v, s, b, p, r);
69}
70// |-----|
72 const Range& v,
73 const Range& s,
74 const Range& b,
75 const Range& p,
76 const Range& r,
77 Index c) const {
78 CHECK(l);
79 CHECK(c);
80 return ConstTensor5View(
81 mdata + OFFSET(l) + OFFSET(c), mvr, msr, mbr, mpr, mrr, v, s, b, p, r);
82}
83
84// -----|-
86 const Range& v,
87 const Range& s,
88 const Range& b,
89 const Range& p,
90 Index r,
91 const Range& c) const {
92 CHECK(r);
93 return ConstTensor6View(
94 mdata + OFFSET(r), mlr, mvr, msr, mbr, mpr, mcr, l, v, s, b, p, c);
95}
96// |----|-
98 const Range& v,
99 const Range& s,
100 const Range& b,
101 const Range& p,
102 Index r,
103 const Range& c) const {
104 CHECK(l);
105 CHECK(r);
106 return ConstTensor5View(
107 mdata + OFFSET(l) + OFFSET(r), mvr, msr, mbr, mpr, mcr, v, s, b, p, c);
108}
109
110// ----|--
112 const Range& v,
113 const Range& s,
114 const Range& b,
115 Index p,
116 const Range& r,
117 const Range& c) const {
118 CHECK(p);
119 return ConstTensor6View(
120 mdata + OFFSET(p), mlr, mvr, msr, mbr, mrr, mcr, l, v, s, b, r, c);
121}
122// |---|--
124 const Range& v,
125 const Range& s,
126 const Range& b,
127 Index p,
128 const Range& r,
129 const Range& c) const {
130 CHECK(l);
131 CHECK(p);
132 return ConstTensor5View(
133 mdata + OFFSET(l) + OFFSET(p), mvr, msr, mbr, mrr, mcr, v, s, b, r, c);
134}
135
136// ---|---
138 const Range& v,
139 const Range& s,
140 Index b,
141 const Range& p,
142 const Range& r,
143 const Range& c) const {
144 CHECK(b);
145 return ConstTensor6View(
146 mdata + OFFSET(b), mlr, mvr, msr, mpr, mrr, mcr, l, v, s, p, r, c);
147}
148// |--|---
150 const Range& v,
151 const Range& s,
152 Index b,
153 const Range& p,
154 const Range& r,
155 const Range& c) const {
156 CHECK(l);
157 CHECK(b);
158 return ConstTensor5View(
159 mdata + OFFSET(l) + OFFSET(b), mvr, msr, mpr, mrr, mcr, v, s, p, r, c);
160}
161
162// --|----
164 const Range& v,
165 Index s,
166 const Range& b,
167 const Range& p,
168 const Range& r,
169 const Range& c) const {
170 CHECK(s);
171 return ConstTensor6View(
172 mdata + OFFSET(s), mlr, mvr, mbr, mpr, mrr, mcr, l, v, b, p, r, c);
173}
174// |-|----
176 const Range& v,
177 Index s,
178 const Range& b,
179 const Range& p,
180 const Range& r,
181 const Range& c) const {
182 CHECK(l);
183 CHECK(s);
184 return ConstTensor5View(
185 mdata + OFFSET(l) + OFFSET(s), mvr, mbr, mpr, mrr, mcr, v, b, p, r, c);
186}
187
188// -|-----
190 Index v,
191 const Range& s,
192 const Range& b,
193 const Range& p,
194 const Range& r,
195 const Range& c) const {
196 CHECK(v);
197 return ConstTensor6View(
198 mdata + OFFSET(v), mlr, msr, mbr, mpr, mrr, mcr, l, s, b, p, r, c);
199}
200// ||-----
202 Index v,
203 const Range& s,
204 const Range& b,
205 const Range& p,
206 const Range& r,
207 const Range& c) const {
208 CHECK(l);
209 CHECK(v);
210 return ConstTensor5View(
211 mdata + OFFSET(l) + OFFSET(v), msr, mbr, mpr, mrr, mcr, s, b, p, r, c);
212}
213
214// -----||
216 const Range& v,
217 const Range& s,
218 const Range& b,
219 const Range& p,
220 Index r,
221 Index c) const {
222 CHECK(r);
223 CHECK(c);
224 return ConstTensor5View(
225 mdata + OFFSET(r) + OFFSET(c), mlr, mvr, msr, mbr, mpr, l, v, s, b, p);
226}
227// |----||
229 const Range& v,
230 const Range& s,
231 const Range& b,
232 const Range& p,
233 Index r,
234 Index c) const {
235 CHECK(l);
236 CHECK(r);
237 CHECK(c);
238 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(r) + OFFSET(c),
239 mvr,
240 msr,
241 mbr,
242 mpr,
243 v,
244 s,
245 b,
246 p);
247}
248
249// ----|-|
251 const Range& v,
252 const Range& s,
253 const Range& b,
254 Index p,
255 const Range& r,
256 Index c) const {
257 CHECK(p);
258 CHECK(c);
259 return ConstTensor5View(
260 mdata + OFFSET(p) + OFFSET(c), mlr, mvr, msr, mbr, mrr, l, v, s, b, r);
261}
262// |---|-|
264 const Range& v,
265 const Range& s,
266 const Range& b,
267 Index p,
268 const Range& r,
269 Index c) const {
270 CHECK(l);
271 CHECK(p);
272 CHECK(c);
273 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(c),
274 mvr,
275 msr,
276 mbr,
277 mrr,
278 v,
279 s,
280 b,
281 r);
282}
283
284// ---|--|
286 const Range& v,
287 const Range& s,
288 Index b,
289 const Range& p,
290 const Range& r,
291 Index c) const {
292 CHECK(b);
293 CHECK(c);
294 return ConstTensor5View(
295 mdata + OFFSET(b) + OFFSET(c), mlr, mvr, msr, mpr, mrr, l, v, s, p, r);
296}
297// |--|--|
299 const Range& v,
300 const Range& s,
301 Index b,
302 const Range& p,
303 const Range& r,
304 Index c) const {
305 CHECK(l);
306 CHECK(b);
307 CHECK(c);
308 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(c),
309 mvr,
310 msr,
311 mpr,
312 mrr,
313 v,
314 s,
315 p,
316 r);
317}
318
319// --|---|
321 const Range& v,
322 Index s,
323 const Range& b,
324 const Range& p,
325 const Range& r,
326 Index c) const {
327 CHECK(s);
328 CHECK(c);
329 return ConstTensor5View(
330 mdata + OFFSET(s) + OFFSET(c), mlr, mvr, mbr, mpr, mrr, l, v, b, p, r);
331}
332// |-|---|
334 const Range& v,
335 Index s,
336 const Range& b,
337 const Range& p,
338 const Range& r,
339 Index c) const {
340 CHECK(l);
341 CHECK(s);
342 CHECK(c);
343 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(c),
344 mvr,
345 mbr,
346 mpr,
347 mrr,
348 v,
349 b,
350 p,
351 r);
352}
353
354// -|----|
356 Index v,
357 const Range& s,
358 const Range& b,
359 const Range& p,
360 const Range& r,
361 Index c) const {
362 CHECK(v);
363 CHECK(c);
364 return ConstTensor5View(
365 mdata + OFFSET(v) + OFFSET(c), mlr, msr, mbr, mpr, mrr, l, s, b, p, r);
366}
367// ||----|
369 Index v,
370 const Range& s,
371 const Range& b,
372 const Range& p,
373 const Range& r,
374 Index c) const {
375 CHECK(l);
376 CHECK(v);
377 CHECK(c);
378 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(c),
379 msr,
380 mbr,
381 mpr,
382 mrr,
383 s,
384 b,
385 p,
386 r);
387}
388
389// ----||-
391 const Range& v,
392 const Range& s,
393 const Range& b,
394 Index p,
395 Index r,
396 const Range& c) const {
397 CHECK(p);
398 CHECK(r);
399 return ConstTensor5View(
400 mdata + OFFSET(p) + OFFSET(r), mlr, mvr, msr, mbr, mcr, l, v, s, b, c);
401}
402// |---||-
404 const Range& v,
405 const Range& s,
406 const Range& b,
407 Index p,
408 Index r,
409 const Range& c) const {
410 CHECK(l);
411 CHECK(p);
412 CHECK(r);
413 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r),
414 mvr,
415 msr,
416 mbr,
417 mcr,
418 v,
419 s,
420 b,
421 c);
422}
423
424// ---|-|-
426 const Range& v,
427 const Range& s,
428 Index b,
429 const Range& p,
430 Index r,
431 const Range& c) const {
432 CHECK(b);
433 CHECK(r);
434 return ConstTensor5View(
435 mdata + OFFSET(b) + OFFSET(r), mlr, mvr, msr, mpr, mcr, l, v, s, p, c);
436}
437// |--|-|-
439 const Range& v,
440 const Range& s,
441 Index b,
442 const Range& p,
443 Index r,
444 const Range& c) const {
445 CHECK(l);
446 CHECK(b);
447 CHECK(r);
448 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r),
449 mvr,
450 msr,
451 mpr,
452 mcr,
453 v,
454 s,
455 p,
456 c);
457}
458
459// --|--|-
461 const Range& v,
462 Index s,
463 const Range& b,
464 const Range& p,
465 Index r,
466 const Range& c) const {
467 CHECK(s);
468 CHECK(r);
469 return ConstTensor5View(
470 mdata + OFFSET(s) + OFFSET(r), mlr, mvr, mbr, mpr, mcr, l, v, b, p, c);
471}
472// |-|--|-
474 const Range& v,
475 Index s,
476 const Range& b,
477 const Range& p,
478 Index r,
479 const Range& c) const {
480 CHECK(l);
481 CHECK(s);
482 CHECK(r);
483 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r),
484 mvr,
485 mbr,
486 mpr,
487 mcr,
488 v,
489 b,
490 p,
491 c);
492}
493
494// -|---|-
496 Index v,
497 const Range& s,
498 const Range& b,
499 const Range& p,
500 Index r,
501 const Range& c) const {
502 CHECK(v);
503 CHECK(r);
504 return ConstTensor5View(
505 mdata + OFFSET(v) + OFFSET(r), mlr, msr, mbr, mpr, mcr, l, s, b, p, c);
506}
507// ||---|-
509 Index v,
510 const Range& s,
511 const Range& b,
512 const Range& p,
513 Index r,
514 const Range& c) const {
515 CHECK(l);
516 CHECK(v);
517 CHECK(r);
518 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r),
519 msr,
520 mbr,
521 mpr,
522 mcr,
523 s,
524 b,
525 p,
526 c);
527}
528
529// ---||--
531 const Range& v,
532 const Range& s,
533 Index b,
534 Index p,
535 const Range& r,
536 const Range& c) const {
537 CHECK(b);
538 CHECK(p);
539 return ConstTensor5View(
540 mdata + OFFSET(b) + OFFSET(p), mlr, mvr, msr, mrr, mcr, l, v, s, r, c);
541}
542// |--||--
544 const Range& v,
545 const Range& s,
546 Index b,
547 Index p,
548 const Range& r,
549 const Range& c) const {
550 CHECK(l);
551 CHECK(b);
552 CHECK(p);
553 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p),
554 mvr,
555 msr,
556 mrr,
557 mcr,
558 v,
559 s,
560 r,
561 c);
562}
563
564// --|-|--
566 const Range& v,
567 Index s,
568 const Range& b,
569 Index p,
570 const Range& r,
571 const Range& c) const {
572 CHECK(s);
573 CHECK(p);
574 return ConstTensor5View(
575 mdata + OFFSET(s) + OFFSET(p), mlr, mvr, mbr, mrr, mcr, l, v, b, r, c);
576}
577// |-|-|--
579 const Range& v,
580 Index s,
581 const Range& b,
582 Index p,
583 const Range& r,
584 const Range& c) const {
585 CHECK(l);
586 CHECK(s);
587 CHECK(p);
588 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p),
589 mvr,
590 mbr,
591 mrr,
592 mcr,
593 v,
594 b,
595 r,
596 c);
597}
598
599// -|--|--
601 Index v,
602 const Range& s,
603 const Range& b,
604 Index p,
605 const Range& r,
606 const Range& c) const {
607 CHECK(v);
608 CHECK(p);
609 return ConstTensor5View(
610 mdata + OFFSET(v) + OFFSET(p), mlr, msr, mbr, mrr, mcr, l, s, b, r, c);
611}
612// ||--|--
614 Index v,
615 const Range& s,
616 const Range& b,
617 Index p,
618 const Range& r,
619 const Range& c) const {
620 CHECK(l);
621 CHECK(v);
622 CHECK(p);
623 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p),
624 msr,
625 mbr,
626 mrr,
627 mcr,
628 s,
629 b,
630 r,
631 c);
632}
633
634// --||---
636 const Range& v,
637 Index s,
638 Index b,
639 const Range& p,
640 const Range& r,
641 const Range& c) const {
642 CHECK(s);
643 CHECK(b);
644 return ConstTensor5View(
645 mdata + OFFSET(s) + OFFSET(b), mlr, mvr, mpr, mrr, mcr, l, v, p, r, c);
646}
647// |-||---
649 const Range& v,
650 Index s,
651 Index b,
652 const Range& p,
653 const Range& r,
654 const Range& c) const {
655 CHECK(l);
656 CHECK(s);
657 CHECK(b);
658 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b),
659 mvr,
660 mpr,
661 mrr,
662 mcr,
663 v,
664 p,
665 r,
666 c);
667}
668
669// -|-|---
671 Index v,
672 const Range& s,
673 Index b,
674 const Range& p,
675 const Range& r,
676 const Range& c) const {
677 CHECK(v);
678 CHECK(b);
679 return ConstTensor5View(
680 mdata + OFFSET(v) + OFFSET(b), mlr, msr, mpr, mrr, mcr, l, s, p, r, c);
681}
682// ||-|---
684 Index v,
685 const Range& s,
686 Index b,
687 const Range& p,
688 const Range& r,
689 const Range& c) const {
690 CHECK(l);
691 CHECK(v);
692 CHECK(b);
693 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b),
694 msr,
695 mpr,
696 mrr,
697 mcr,
698 s,
699 p,
700 r,
701 c);
702}
703
704// -||----
706 Index v,
707 Index s,
708 const Range& b,
709 const Range& p,
710 const Range& r,
711 const Range& c) const {
712 CHECK(v);
713 CHECK(s);
714 return ConstTensor5View(
715 mdata + OFFSET(v) + OFFSET(s), mlr, mbr, mpr, mrr, mcr, l, b, p, r, c);
716}
717// |||----
719 Index v,
720 Index s,
721 const Range& b,
722 const Range& p,
723 const Range& r,
724 const Range& c) const {
725 CHECK(l);
726 CHECK(v);
727 CHECK(s);
728 return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s),
729 mbr,
730 mpr,
731 mrr,
732 mcr,
733 b,
734 p,
735 r,
736 c);
737}
738
739// ----|||
741 const Range& v,
742 const Range& s,
743 const Range& b,
744 Index p,
745 Index r,
746 Index c) const {
747 CHECK(p);
748 CHECK(r);
749 CHECK(c);
750 return ConstTensor4View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
751 mlr,
752 mvr,
753 msr,
754 mbr,
755 l,
756 v,
757 s,
758 b);
759}
760// |---|||
762 const Range& v,
763 const Range& s,
764 const Range& b,
765 Index p,
766 Index r,
767 Index c) const {
768 CHECK(l);
769 CHECK(p);
770 CHECK(r);
771 CHECK(c);
772 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r) + OFFSET(c),
773 mvr,
774 msr,
775 mbr,
776 v,
777 s,
778 b);
779}
780
781// ---|-||
783 const Range& v,
784 const Range& s,
785 Index b,
786 const Range& p,
787 Index r,
788 Index c) const {
789 CHECK(b);
790 CHECK(r);
791 CHECK(c);
792 return ConstTensor4View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
793 mlr,
794 mvr,
795 msr,
796 mpr,
797 l,
798 v,
799 s,
800 p);
801}
802// |--|-||
804 const Range& v,
805 const Range& s,
806 Index b,
807 const Range& p,
808 Index r,
809 Index c) const {
810 CHECK(l);
811 CHECK(b);
812 CHECK(r);
813 CHECK(c);
814 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r) + OFFSET(c),
815 mvr,
816 msr,
817 mpr,
818 v,
819 s,
820 p);
821}
822
823// --|--||
825 const Range& v,
826 Index s,
827 const Range& b,
828 const Range& p,
829 Index r,
830 Index c) const {
831 CHECK(s);
832 CHECK(r);
833 CHECK(c);
834 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
835 mlr,
836 mvr,
837 mbr,
838 mpr,
839 l,
840 v,
841 b,
842 p);
843}
844// |-|--||
846 const Range& v,
847 Index s,
848 const Range& b,
849 const Range& p,
850 Index r,
851 Index c) const {
852 CHECK(l);
853 CHECK(s);
854 CHECK(r);
855 CHECK(c);
856 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r) + OFFSET(c),
857 mvr,
858 mbr,
859 mpr,
860 v,
861 b,
862 p);
863}
864
865// -|---||
867 Index v,
868 const Range& s,
869 const Range& b,
870 const Range& p,
871 Index r,
872 Index c) const {
873 CHECK(v);
874 CHECK(r);
875 CHECK(c);
876 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
877 mlr,
878 msr,
879 mbr,
880 mpr,
881 l,
882 s,
883 b,
884 p);
885}
886// ||---||
888 Index v,
889 const Range& s,
890 const Range& b,
891 const Range& p,
892 Index r,
893 Index c) const {
894 CHECK(l);
895 CHECK(v);
896 CHECK(r);
897 CHECK(c);
898 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r) + OFFSET(c),
899 msr,
900 mbr,
901 mpr,
902 s,
903 b,
904 p);
905}
906
907// ---||-|
909 const Range& v,
910 const Range& s,
911 Index b,
912 Index p,
913 const Range& r,
914 Index c) const {
915 CHECK(b);
916 CHECK(p);
917 CHECK(c);
918 return ConstTensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
919 mlr,
920 mvr,
921 msr,
922 mrr,
923 l,
924 v,
925 s,
926 r);
927}
928// |--||-|
930 const Range& v,
931 const Range& s,
932 Index b,
933 Index p,
934 const Range& r,
935 Index c) const {
936 CHECK(l);
937 CHECK(b);
938 CHECK(p);
939 CHECK(c);
940 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(c),
941 mvr,
942 msr,
943 mrr,
944 v,
945 s,
946 r);
947}
948
949// --|-|-|
951 const Range& v,
952 Index s,
953 const Range& b,
954 Index p,
955 const Range& r,
956 Index c) const {
957 CHECK(s);
958 CHECK(p);
959 CHECK(c);
960 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
961 mlr,
962 mvr,
963 mbr,
964 mrr,
965 l,
966 v,
967 b,
968 r);
969}
970// |-|-|-|
972 const Range& v,
973 Index s,
974 const Range& b,
975 Index p,
976 const Range& r,
977 Index c) const {
978 CHECK(l);
979 CHECK(s);
980 CHECK(p);
981 CHECK(c);
982 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(c),
983 mvr,
984 mbr,
985 mrr,
986 v,
987 b,
988 r);
989}
990
991// -|--|-|
993 Index v,
994 const Range& s,
995 const Range& b,
996 Index p,
997 const Range& r,
998 Index c) const {
999 CHECK(v);
1000 CHECK(p);
1001 CHECK(c);
1002 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
1003 mlr,
1004 msr,
1005 mbr,
1006 mrr,
1007 l,
1008 s,
1009 b,
1010 r);
1011}
1012// ||--|-|
1014 Index v,
1015 const Range& s,
1016 const Range& b,
1017 Index p,
1018 const Range& r,
1019 Index c) const {
1020 CHECK(l);
1021 CHECK(v);
1022 CHECK(p);
1023 CHECK(c);
1024 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(c),
1025 msr,
1026 mbr,
1027 mrr,
1028 s,
1029 b,
1030 r);
1031}
1032
1033// --||--|
1035 const Range& v,
1036 Index s,
1037 Index b,
1038 const Range& p,
1039 const Range& r,
1040 Index c) const {
1041 CHECK(s);
1042 CHECK(b);
1043 CHECK(c);
1044 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
1045 mlr,
1046 mvr,
1047 mpr,
1048 mrr,
1049 l,
1050 v,
1051 p,
1052 r);
1053}
1054// |-||--|
1056 const Range& v,
1057 Index s,
1058 Index b,
1059 const Range& p,
1060 const Range& r,
1061 Index c) const {
1062 CHECK(l);
1063 CHECK(s);
1064 CHECK(b);
1065 CHECK(c);
1066 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(c),
1067 mvr,
1068 mpr,
1069 mrr,
1070 v,
1071 p,
1072 r);
1073}
1074
1075// -|-|--|
1077 Index v,
1078 const Range& s,
1079 Index b,
1080 const Range& p,
1081 const Range& r,
1082 Index c) const {
1083 CHECK(v);
1084 CHECK(b);
1085 CHECK(c);
1086 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
1087 mlr,
1088 msr,
1089 mpr,
1090 mrr,
1091 l,
1092 s,
1093 p,
1094 r);
1095}
1096// ||-|--|
1098 Index v,
1099 const Range& s,
1100 Index b,
1101 const Range& p,
1102 const Range& r,
1103 Index c) const {
1104 CHECK(l);
1105 CHECK(v);
1106 CHECK(b);
1107 CHECK(c);
1108 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(c),
1109 msr,
1110 mpr,
1111 mrr,
1112 s,
1113 p,
1114 r);
1115}
1116
1117// -||---|
1119 Index v,
1120 Index s,
1121 const Range& b,
1122 const Range& p,
1123 const Range& r,
1124 Index c) const {
1125 CHECK(v);
1126 CHECK(s);
1127 CHECK(c);
1128 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
1129 mlr,
1130 mbr,
1131 mpr,
1132 mrr,
1133 l,
1134 b,
1135 p,
1136 r);
1137}
1138// |||---|
1140 Index v,
1141 Index s,
1142 const Range& b,
1143 const Range& p,
1144 const Range& r,
1145 Index c) const {
1146 CHECK(l);
1147 CHECK(v);
1148 CHECK(s);
1149 CHECK(c);
1150 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(c),
1151 mbr,
1152 mpr,
1153 mrr,
1154 b,
1155 p,
1156 r);
1157}
1158
1159// ---|||-
1161 const Range& v,
1162 const Range& s,
1163 Index b,
1164 Index p,
1165 Index r,
1166 const Range& c) const {
1167 CHECK(b);
1168 CHECK(p);
1169 CHECK(r);
1170 return ConstTensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r),
1171 mlr,
1172 mvr,
1173 msr,
1174 mcr,
1175 l,
1176 v,
1177 s,
1178 c);
1179}
1180// |--|||-
1182 const Range& v,
1183 const Range& s,
1184 Index b,
1185 Index p,
1186 Index r,
1187 const Range& c) const {
1188 CHECK(l);
1189 CHECK(b);
1190 CHECK(p);
1191 CHECK(r);
1192 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1193 mvr,
1194 msr,
1195 mcr,
1196 v,
1197 s,
1198 c);
1199}
1200
1201// --|-||-
1203 const Range& v,
1204 Index s,
1205 const Range& b,
1206 Index p,
1207 Index r,
1208 const Range& c) const {
1209 CHECK(s);
1210 CHECK(p);
1211 CHECK(r);
1212 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r),
1213 mlr,
1214 mvr,
1215 mbr,
1216 mcr,
1217 l,
1218 v,
1219 b,
1220 c);
1221}
1222// |-|-||-
1224 const Range& v,
1225 Index s,
1226 const Range& b,
1227 Index p,
1228 Index r,
1229 const Range& c) const {
1230 CHECK(l);
1231 CHECK(s);
1232 CHECK(p);
1235 mvr,
1236 mbr,
1237 mcr,
1238 v,
1239 b,
1240 c);
1241}
1242
1243// -|--||-
1245 Index v,
1246 const Range& s,
1247 const Range& b,
1248 Index p,
1249 Index r,
1250 const Range& c) const {
1251 CHECK(v);
1252 CHECK(p);
1253 CHECK(r);
1254 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r),
1255 mlr,
1256 msr,
1257 mbr,
1258 mcr,
1259 l,
1260 s,
1261 b,
1262 c);
1263}
1264// ||--||-
1266 Index v,
1267 const Range& s,
1268 const Range& b,
1269 Index p,
1270 Index r,
1271 const Range& c) const {
1272 CHECK(l);
1273 CHECK(v);
1274 CHECK(p);
1275 CHECK(r);
1276 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r),
1277 msr,
1278 mbr,
1279 mcr,
1280 s,
1281 b,
1282 c);
1283}
1284
1285// --||-|-
1287 const Range& v,
1288 Index s,
1289 Index b,
1290 const Range& p,
1291 Index r,
1292 const Range& c) const {
1293 CHECK(s);
1294 CHECK(b);
1295 CHECK(r);
1296 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r),
1297 mlr,
1298 mvr,
1299 mpr,
1300 mcr,
1301 l,
1302 v,
1303 p,
1304 c);
1305}
1306// |-||-|-
1308 const Range& v,
1309 Index s,
1310 Index b,
1311 const Range& p,
1312 Index r,
1313 const Range& c) const {
1314 CHECK(l);
1315 CHECK(s);
1316 CHECK(b);
1317 CHECK(r);
1318 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1319 mvr,
1320 mpr,
1321 mcr,
1322 v,
1323 p,
1324 c);
1325}
1326
1327// -|-|-|-
1329 Index v,
1330 const Range& s,
1331 Index b,
1332 const Range& p,
1333 Index r,
1334 const Range& c) const {
1335 CHECK(v);
1336 CHECK(b);
1337 CHECK(r);
1338 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r),
1339 mlr,
1340 msr,
1341 mpr,
1342 mcr,
1343 l,
1344 s,
1345 p,
1346 c);
1347}
1348// ||-|-|-
1350 Index v,
1351 const Range& s,
1352 Index b,
1353 const Range& p,
1354 Index r,
1355 const Range& c) const {
1356 CHECK(l);
1357 CHECK(v);
1358 CHECK(b);
1359 CHECK(r);
1360 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r),
1361 msr,
1362 mpr,
1363 mcr,
1364 s,
1365 p,
1366 c);
1367}
1368
1369// -||--|-
1371 Index v,
1372 Index s,
1373 const Range& b,
1374 const Range& p,
1375 Index r,
1376 const Range& c) const {
1377 CHECK(v);
1378 CHECK(s);
1379 CHECK(r);
1380 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r),
1381 mlr,
1382 mbr,
1383 mpr,
1384 mcr,
1385 l,
1386 b,
1387 p,
1388 c);
1389}
1390// |||--|-
1392 Index v,
1393 Index s,
1394 const Range& b,
1395 const Range& p,
1396 Index r,
1397 const Range& c) const {
1398 CHECK(l);
1399 CHECK(v);
1400 CHECK(s);
1401 CHECK(r);
1402 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r),
1403 mbr,
1404 mpr,
1405 mcr,
1406 b,
1407 p,
1408 c);
1409}
1410
1411// --|||--
1413 const Range& v,
1414 Index s,
1415 Index b,
1416 Index p,
1417 const Range& r,
1418 const Range& c) const {
1419 CHECK(s);
1420 CHECK(b);
1421 CHECK(p);
1422 return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p),
1423 mlr,
1424 mvr,
1425 mrr,
1426 mcr,
1427 l,
1428 v,
1429 r,
1430 c);
1431}
1432// |-|||--
1434 const Range& v,
1435 Index s,
1436 Index b,
1437 Index p,
1438 const Range& r,
1439 const Range& c) const {
1440 CHECK(l);
1441 CHECK(s);
1442 CHECK(b);
1443 CHECK(p);
1444 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1445 mvr,
1446 mrr,
1447 mcr,
1448 v,
1449 r,
1450 c);
1451}
1452
1453// -|-||--
1455 Index v,
1456 const Range& s,
1457 Index b,
1458 Index p,
1459 const Range& r,
1460 const Range& c) const {
1461 CHECK(v);
1462 CHECK(b);
1463 CHECK(p);
1464 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p),
1465 mlr,
1466 msr,
1467 mrr,
1468 mcr,
1469 l,
1470 s,
1471 r,
1472 c);
1473}
1474// ||-||--
1476 Index v,
1477 const Range& s,
1478 Index b,
1479 Index p,
1480 const Range& r,
1481 const Range& c) const {
1482 CHECK(l);
1483 CHECK(v);
1484 CHECK(b);
1485 CHECK(p);
1486 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p),
1487 msr,
1488 mrr,
1489 mcr,
1490 s,
1491 r,
1492 c);
1493}
1494
1495// -||-|--
1497 Index v,
1498 Index s,
1499 const Range& b,
1500 Index p,
1501 const Range& r,
1502 const Range& c) const {
1503 CHECK(v);
1504 CHECK(s);
1505 CHECK(p);
1506 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p),
1507 mlr,
1508 mbr,
1509 mrr,
1510 mcr,
1511 l,
1512 b,
1513 r,
1514 c);
1515}
1516// |||-|--
1518 Index v,
1519 Index s,
1520 const Range& b,
1521 Index p,
1522 const Range& r,
1523 const Range& c) const {
1524 CHECK(l);
1525 CHECK(v);
1526 CHECK(s);
1527 CHECK(p);
1528 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p),
1529 mbr,
1530 mrr,
1531 mcr,
1532 b,
1533 r,
1534 c);
1535}
1536
1537// -|||---
1539 Index v,
1540 Index s,
1541 Index b,
1542 const Range& p,
1543 const Range& r,
1544 const Range& c) const {
1545 CHECK(v);
1546 CHECK(s);
1547 CHECK(b);
1548 return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b),
1549 mlr,
1550 mpr,
1551 mrr,
1552 mcr,
1553 l,
1554 p,
1555 r,
1556 c);
1557}
1558// ||||---
1560 Index v,
1561 Index s,
1562 Index b,
1563 const Range& p,
1564 const Range& r,
1565 const Range& c) const {
1566 CHECK(l);
1567 CHECK(v);
1568 CHECK(s);
1569 CHECK(b);
1570 return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b),
1571 mpr,
1572 mrr,
1573 mcr,
1574 p,
1575 r,
1576 c);
1577}
1578
1579// -||||--
1581 Index v,
1582 Index s,
1583 Index b,
1584 Index p,
1585 const Range& r,
1586 const Range& c) const {
1587 CHECK(v);
1588 CHECK(s);
1589 CHECK(b);
1590 CHECK(p);
1591 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1592 mlr,
1593 mrr,
1594 mcr,
1595 l,
1596 r,
1597 c);
1598}
1599// |||||--
1601 Index v,
1602 Index s,
1603 Index b,
1604 Index p,
1605 const Range& r,
1606 const Range& c) const {
1607 CHECK(l);
1608 CHECK(v);
1609 CHECK(s);
1610 CHECK(b);
1611 CHECK(p);
1612 return ConstMatrixView(
1613 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1614 mrr,
1615 mcr,
1616 r,
1617 c);
1618}
1619
1620// -|||-|-
1622 Index v,
1623 Index s,
1624 Index b,
1625 const Range& p,
1626 Index r,
1627 const Range& c) const {
1628 CHECK(v);
1629 CHECK(s);
1630 CHECK(b);
1631 CHECK(r);
1632 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1633 mlr,
1634 mpr,
1635 mcr,
1636 l,
1637 p,
1638 c);
1639}
1640// ||||-|-
1642 Index v,
1643 Index s,
1644 Index b,
1645 const Range& p,
1646 Index r,
1647 const Range& c) const {
1648 CHECK(l);
1649 CHECK(v);
1650 CHECK(s);
1651 CHECK(b);
1652 CHECK(r);
1653 return ConstMatrixView(
1654 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1655 mpr,
1656 mcr,
1657 p,
1658 c);
1659}
1660
1661// -||-||-
1663 Index v,
1664 Index s,
1665 const Range& b,
1666 Index p,
1667 Index r,
1668 const Range& c) const {
1669 CHECK(v);
1670 CHECK(s);
1671 CHECK(p);
1672 CHECK(r);
1673 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
1674 mlr,
1675 mbr,
1676 mcr,
1677 l,
1678 b,
1679 c);
1680}
1681// |||-||-
1683 Index v,
1684 Index s,
1685 const Range& b,
1686 Index p,
1687 Index r,
1688 const Range& c) const {
1689 CHECK(l);
1690 CHECK(v);
1691 CHECK(s);
1692 CHECK(p);
1693 CHECK(r);
1694 return ConstMatrixView(
1695 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
1696 mbr,
1697 mcr,
1698 b,
1699 c);
1700}
1701
1702// -|-|||-
1704 Index v,
1705 const Range& s,
1706 Index b,
1707 Index p,
1708 Index r,
1709 const Range& c) const {
1710 CHECK(v);
1711 CHECK(b);
1712 CHECK(p);
1713 CHECK(r);
1714 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1715 mlr,
1716 msr,
1717 mcr,
1718 l,
1719 s,
1720 c);
1721}
1722// ||-|||-
1724 Index v,
1725 const Range& s,
1726 Index b,
1727 Index p,
1728 Index r,
1729 const Range& c) const {
1730 CHECK(l);
1731 CHECK(v);
1732 CHECK(b);
1733 CHECK(p);
1734 CHECK(r);
1735 return ConstMatrixView(
1736 mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1737 msr,
1738 mcr,
1739 s,
1740 c);
1741}
1742
1743// --||||-
1745 const Range& v,
1746 Index s,
1747 Index b,
1748 Index p,
1749 Index r,
1750 const Range& c) const {
1751 CHECK(s);
1752 CHECK(b);
1753 CHECK(p);
1754 CHECK(r);
1755 return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1756 mlr,
1757 mvr,
1758 mcr,
1759 l,
1760 v,
1761 c);
1762}
1763// |-||||-
1765 const Range& v,
1766 Index s,
1767 Index b,
1768 Index p,
1769 Index r,
1770 const Range& c) const {
1771 CHECK(l);
1772 CHECK(s);
1773 CHECK(b);
1774 CHECK(p);
1775 CHECK(r);
1776 return ConstMatrixView(
1777 mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1778 mvr,
1779 mcr,
1780 v,
1781 c);
1782}
1783
1784// -|||--|
1786 Index v,
1787 Index s,
1788 Index b,
1789 const Range& p,
1790 const Range& r,
1791 Index c) const {
1792 CHECK(v);
1793 CHECK(s);
1794 CHECK(b);
1795 CHECK(c);
1796 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
1797 mlr,
1798 mpr,
1799 mrr,
1800 l,
1801 p,
1802 r);
1803}
1804// ||||--|
1806 Index v,
1807 Index s,
1808 Index b,
1809 const Range& p,
1810 const Range& r,
1811 Index c) const {
1812 CHECK(l);
1813 CHECK(v);
1814 CHECK(s);
1815 CHECK(b);
1816 CHECK(c);
1817 return ConstMatrixView(
1818 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
1819 mpr,
1820 mrr,
1821 p,
1822 r);
1823}
1824
1825// -||-|-|
1827 Index v,
1828 Index s,
1829 const Range& b,
1830 Index p,
1831 const Range& r,
1832 Index c) const {
1833 CHECK(v);
1834 CHECK(s);
1835 CHECK(p);
1836 CHECK(c);
1837 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
1838 mlr,
1839 mbr,
1840 mrr,
1841 l,
1842 b,
1843 r);
1844}
1845// |||-|-|
1847 Index v,
1848 Index s,
1849 const Range& b,
1850 Index p,
1851 const Range& r,
1852 Index c) const {
1853 CHECK(l);
1854 CHECK(v);
1855 CHECK(s);
1856 CHECK(p);
1857 CHECK(c);
1858 return ConstMatrixView(
1859 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
1860 mbr,
1861 mrr,
1862 b,
1863 r);
1864}
1865
1866// -|-||-|
1868 Index v,
1869 const Range& s,
1870 Index b,
1871 Index p,
1872 const Range& r,
1873 Index c) const {
1874 CHECK(v);
1875 CHECK(b);
1876 CHECK(p);
1877 CHECK(c);
1878 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1879 mlr,
1880 msr,
1881 mrr,
1882 l,
1883 s,
1884 r);
1885}
1886// ||-||-|
1888 Index v,
1889 const Range& s,
1890 Index b,
1891 Index p,
1892 const Range& r,
1893 Index c) const {
1894 CHECK(l);
1895 CHECK(v);
1896 CHECK(b);
1897 CHECK(p);
1898 CHECK(c);
1899 return ConstMatrixView(
1900 mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1901 msr,
1902 mrr,
1903 s,
1904 r);
1905}
1906
1907// --|||-|
1909 const Range& v,
1910 Index s,
1911 Index b,
1912 Index p,
1913 const Range& r,
1914 Index c) const {
1915 CHECK(s);
1916 CHECK(b);
1917 CHECK(p);
1918 CHECK(c);
1919 return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1920 mlr,
1921 mvr,
1922 mrr,
1923 l,
1924 v,
1925 r);
1926}
1927// |-|||-|
1929 const Range& v,
1930 Index s,
1931 Index b,
1932 Index p,
1933 const Range& r,
1934 Index c) const {
1935 CHECK(l);
1936 CHECK(s);
1937 CHECK(b);
1938 CHECK(p);
1939 CHECK(c);
1940 return ConstMatrixView(
1941 mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1942 mvr,
1943 mrr,
1944 v,
1945 r);
1946}
1947
1948// -||--||
1950 Index v,
1951 Index s,
1952 const Range& b,
1953 const Range& p,
1954 Index r,
1955 Index c) const {
1956 CHECK(v);
1957 CHECK(s);
1958 CHECK(r);
1959 CHECK(c);
1960 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
1961 mlr,
1962 mbr,
1963 mpr,
1964 l,
1965 b,
1966 p);
1967}
1968// |||--||
1970 Index v,
1971 Index s,
1972 const Range& b,
1973 const Range& p,
1974 Index r,
1975 Index c) const {
1976 CHECK(l);
1977 CHECK(v);
1978 CHECK(s);
1979 CHECK(r);
1980 CHECK(c);
1981 return ConstMatrixView(
1982 mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
1983 mbr,
1984 mpr,
1985 b,
1986 p);
1987}
1988
1989// -|-|-||
1991 Index v,
1992 const Range& s,
1993 Index b,
1994 const Range& p,
1995 Index r,
1996 Index c) const {
1997 CHECK(v);
1998 CHECK(b);
1999 CHECK(r);
2000 CHECK(c);
2001 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2002 mlr,
2003 msr,
2004 mpr,
2005 l,
2006 s,
2007 p);
2008}
2009// ||-|-||
2011 Index v,
2012 const Range& s,
2013 Index b,
2014 const Range& p,
2015 Index r,
2016 Index c) const {
2017 CHECK(l);
2018 CHECK(v);
2019 CHECK(b);
2020 CHECK(r);
2021 CHECK(c);
2022 return ConstMatrixView(
2023 mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2024 msr,
2025 mpr,
2026 s,
2027 p);
2028}
2029
2030// --||-||
2032 const Range& v,
2033 Index s,
2034 Index b,
2035 const Range& p,
2036 Index r,
2037 Index c) const {
2038 CHECK(s);
2039 CHECK(b);
2040 CHECK(r);
2041 CHECK(c);
2042 return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2043 mlr,
2044 mvr,
2045 mpr,
2046 l,
2047 v,
2048 p);
2049}
2050// |-||-||
2052 const Range& v,
2053 Index s,
2054 Index b,
2055 const Range& p,
2056 Index r,
2057 Index c) const {
2058 CHECK(l);
2059 CHECK(s);
2060 CHECK(b);
2061 CHECK(r);
2062 CHECK(c);
2063 return ConstMatrixView(
2064 mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2065 mvr,
2066 mpr,
2067 v,
2068 p);
2069}
2070
2071// -|--|||
2073 Index v,
2074 const Range& s,
2075 const Range& b,
2076 Index p,
2077 Index r,
2078 Index c) const {
2079 CHECK(v);
2080 CHECK(p);
2081 CHECK(r);
2082 CHECK(c);
2083 return ConstTensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2084 mlr,
2085 msr,
2086 mbr,
2087 l,
2088 s,
2089 b);
2090}
2091// ||--|||
2093 Index v,
2094 const Range& s,
2095 const Range& b,
2096 Index p,
2097 Index r,
2098 Index c) const {
2099 CHECK(l);
2100 CHECK(v);
2101 CHECK(p);
2102 CHECK(r);
2103 CHECK(c);
2104 return ConstMatrixView(
2105 mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2106 msr,
2107 mbr,
2108 s,
2109 b);
2110}
2111
2112// --|-|||
2114 const Range& v,
2115 Index s,
2116 const Range& b,
2117 Index p,
2118 Index r,
2119 Index c) const {
2120 CHECK(s);
2121 CHECK(p);
2122 CHECK(r);
2123 CHECK(c);
2124 return ConstTensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2125 mlr,
2126 mvr,
2127 mbr,
2128 l,
2129 v,
2130 b);
2131}
2132// |-|-|||
2134 const Range& v,
2135 Index s,
2136 const Range& b,
2137 Index p,
2138 Index r,
2139 Index c) const {
2140 CHECK(l);
2141 CHECK(s);
2142 CHECK(p);
2143 CHECK(r);
2144 CHECK(c);
2145 return ConstMatrixView(
2146 mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2147 mvr,
2148 mbr,
2149 v,
2150 b);
2151}
2152
2153// ---||||
2155 const Range& v,
2156 const Range& s,
2157 Index b,
2158 Index p,
2159 Index r,
2160 Index c) const {
2161 CHECK(b);
2162 CHECK(p);
2163 CHECK(r);
2164 CHECK(c);
2165 return ConstTensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2166 mlr,
2167 mvr,
2168 msr,
2169 l,
2170 v,
2171 s);
2172}
2173// |--||||
2175 const Range& v,
2176 const Range& s,
2177 Index b,
2178 Index p,
2179 Index r,
2180 Index c) const {
2181 CHECK(l);
2182 CHECK(b);
2183 CHECK(p);
2184 CHECK(r);
2185 CHECK(c);
2186 return ConstMatrixView(
2187 mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2188 mvr,
2189 msr,
2190 v,
2191 s);
2192}
2193
2194// -|||||-
2196 Index v,
2197 Index s,
2198 Index b,
2199 Index p,
2200 Index r,
2201 const Range& c) const {
2202 CHECK(v);
2203 CHECK(s);
2204 CHECK(b);
2205 CHECK(p);
2206 CHECK(r);
2207 return ConstMatrixView(
2208 mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
2209 mlr,
2210 mcr,
2211 l,
2212 c);
2213}
2214// ||||||-
2216 Index v,
2217 Index s,
2218 Index b,
2219 Index p,
2220 Index r,
2221 const Range& c) const {
2222 CHECK(l);
2223 CHECK(v);
2224 CHECK(s);
2225 CHECK(b);
2226 CHECK(p);
2227 CHECK(r);
2228 return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) +
2229 OFFSET(p) + OFFSET(r),
2230 mcr,
2231 c);
2232}
2233
2234// -||||-|
2236 Index v,
2237 Index s,
2238 Index b,
2239 Index p,
2240 const Range& r,
2241 Index c) const {
2242 CHECK(v);
2243 CHECK(s);
2244 CHECK(b);
2245 CHECK(p);
2246 CHECK(c);
2247 return ConstMatrixView(
2248 mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
2249 mlr,
2250 mrr,
2251 l,
2252 r);
2253}
2254// |||||-|
2256 Index v,
2257 Index s,
2258 Index b,
2259 Index p,
2260 const Range& r,
2261 Index c) const {
2262 CHECK(l);
2263 CHECK(v);
2264 CHECK(s);
2265 CHECK(b);
2266 CHECK(p);
2267 CHECK(c);
2268 return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) +
2269 OFFSET(p) + OFFSET(c),
2270 mrr,
2271 r);
2272}
2273
2274// -|||-||
2276 Index v,
2277 Index s,
2278 Index b,
2279 const Range& p,
2280 Index r,
2281 Index c) const {
2282 CHECK(v);
2283 CHECK(s);
2284 CHECK(b);
2285 CHECK(r);
2286 CHECK(c);
2287 return ConstMatrixView(
2288 mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2289 mlr,
2290 mpr,
2291 l,
2292 p);
2293}
2294// ||||-||
2296 Index v,
2297 Index s,
2298 Index b,
2299 const Range& p,
2300 Index r,
2301 Index c) const {
2302 CHECK(l);
2303 CHECK(v);
2304 CHECK(s);
2305 CHECK(b);
2306 CHECK(r);
2307 CHECK(c);
2308 return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) +
2309 OFFSET(r) + OFFSET(c),
2310 mpr,
2311 p);
2312}
2313
2314// -||-|||
2316 Index v,
2317 Index s,
2318 const Range& b,
2319 Index p,
2320 Index r,
2321 Index c) const {
2322 CHECK(v);
2323 CHECK(s);
2324 CHECK(p);
2325 CHECK(r);
2326 CHECK(c);
2327 return ConstMatrixView(
2328 mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2329 mlr,
2330 mbr,
2331 l,
2332 b);
2333}
2334// |||-|||
2336 Index v,
2337 Index s,
2338 const Range& b,
2339 Index p,
2340 Index r,
2341 Index c) const {
2342 CHECK(l);
2343 CHECK(v);
2344 CHECK(s);
2345 CHECK(p);
2346 CHECK(r);
2347 CHECK(c);
2348 return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) +
2349 OFFSET(r) + OFFSET(c),
2350 mbr,
2351 b);
2352}
2353
2354// -|-||||
2356 Index v,
2357 const Range& s,
2358 Index b,
2359 Index p,
2360 Index r,
2361 Index c) const {
2362 CHECK(v);
2363 CHECK(b);
2364 CHECK(p);
2365 CHECK(r);
2366 CHECK(c);
2367 return ConstMatrixView(
2368 mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2369 mlr,
2370 msr,
2371 l,
2372 s);
2373}
2374// ||-||||
2376 Index v,
2377 const Range& s,
2378 Index b,
2379 Index p,
2380 Index r,
2381 Index c) const {
2382 CHECK(l);
2383 CHECK(v);
2384 CHECK(b);
2385 CHECK(p);
2386 CHECK(r);
2387 CHECK(c);
2388 return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) +
2389 OFFSET(r) + OFFSET(c),
2390 msr,
2391 s);
2392}
2393
2394// --|||||
2396 const Range& v,
2397 Index s,
2398 Index b,
2399 Index p,
2400 Index r,
2401 Index c) const {
2402 CHECK(s);
2403 CHECK(b);
2404 CHECK(p);
2405 CHECK(r);
2406 CHECK(c);
2407 return ConstMatrixView(
2408 mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2409 mlr,
2410 mvr,
2411 l,
2412 v);
2413}
2414// |-|||||
2416 const Range& v,
2417 Index s,
2418 Index b,
2419 Index p,
2420 Index r,
2421 Index c) const {
2422 CHECK(l);
2423 CHECK(s);
2424 CHECK(b);
2425 CHECK(p);
2426 CHECK(r);
2427 CHECK(c);
2428 return ConstVectorView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) +
2429 OFFSET(r) + OFFSET(c),
2430 mvr,
2431 v);
2432}
2433
2434// -||||||
2436 Index v,
2437 Index s,
2438 Index b,
2439 Index p,
2440 Index r,
2441 Index c) const {
2442 CHECK(v);
2443 CHECK(s);
2444 CHECK(b);
2445 CHECK(p);
2446 CHECK(r);
2447 CHECK(c);
2448 return ConstVectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) +
2449 OFFSET(r) + OFFSET(c),
2450 mlr,
2451 l);
2452}
2453
2456 return ConstIterator7D(
2458 mlr.mstride);
2459}
2460
2463 return ConstIterator7D(
2465 mvr,
2466 msr,
2467 mbr,
2468 mpr,
2469 mrr,
2470 mcr),
2471 mlr.mstride);
2472}
2473
2476 : mlr(0,
2477 1,
2478 a.mvr.mextent * a.msr.mextent * a.mbr.mextent * a.mpr.mextent *
2479 a.mrr.mextent * a.mcr.mextent),
2480 mvr(a.mvr),
2481 msr(a.msr),
2482 mbr(a.mbr),
2483 mpr(a.mpr),
2484 mrr(a.mrr),
2485 mcr(a.mcr),
2486 mdata(a.mdata) {
2487 // Nothing to do here.
2488}
2489
2495 const Range& l,
2496 const Range& v,
2497 const Range& s,
2498 const Range& b,
2499 const Range& p,
2500 const Range& r,
2501 const Range& c)
2502 : mlr(l), mvr(v), msr(s), mbr(b), mpr(p), mrr(r), mcr(c), mdata(data) {
2503 // Nothing to do here.
2504}
2505
2514 const Range& pl,
2515 const Range& pv,
2516 const Range& ps,
2517 const Range& pb,
2518 const Range& pp,
2519 const Range& pr,
2520 const Range& pc,
2521 const Range& nl,
2522 const Range& nv,
2523 const Range& ns,
2524 const Range& nb,
2525 const Range& np,
2526 const Range& nr,
2527 const Range& nc)
2528 : mlr(pl, nl),
2529 mvr(pv, nv),
2530 msr(ps, ns),
2531 mbr(pb, nb),
2532 mpr(pp, np),
2533 mrr(pr, nr),
2534 mcr(pc, nc),
2535 mdata(data) {
2536 // Nothing to do here.
2537}
2538
2542std::ostream& operator<<(std::ostream& os, const ConstTensor7View& v) {
2543 // Page iterators:
2544 ConstIterator7D ip = v.begin();
2545 const ConstIterator7D end_page = v.end();
2546
2547 if (ip != end_page) {
2548 os << *ip;
2549 ++ip;
2550 }
2551
2552 for (; ip != end_page; ++ip) {
2553 os << "\n\n";
2554 os << *ip;
2555 }
2556
2557 return os;
2558}
2559
2560// Functions for Tensor7View:
2561// -------------------------
2562
2563// Non-const index operators:
2564
2565// -------
2567 const Range& v,
2568 const Range& s,
2569 const Range& b,
2570 const Range& p,
2571 const Range& r,
2572 const Range& c) {
2573 return Tensor7View(
2574 mdata, mlr, mvr, msr, mbr, mpr, mrr, mcr, l, v, s, b, p, r, c);
2575}
2576// |------
2578 const Range& v,
2579 const Range& s,
2580 const Range& b,
2581 const Range& p,
2582 const Range& r,
2583 const Range& c) {
2584 CHECK(l);
2585 return Tensor6View(
2586 mdata + OFFSET(l), mvr, msr, mbr, mpr, mrr, mcr, v, s, b, p, r, c);
2587}
2588
2589// ------|
2591 const Range& v,
2592 const Range& s,
2593 const Range& b,
2594 const Range& p,
2595 const Range& r,
2596 Index c) {
2597 CHECK(c);
2598 return Tensor6View(
2599 mdata + OFFSET(c), mlr, mvr, msr, mbr, mpr, mrr, l, v, s, b, p, r);
2600}
2601// |-----|
2603 const Range& v,
2604 const Range& s,
2605 const Range& b,
2606 const Range& p,
2607 const Range& r,
2608 Index c) {
2609 CHECK(l);
2610 CHECK(c);
2611 return Tensor5View(
2612 mdata + OFFSET(l) + OFFSET(c), mvr, msr, mbr, mpr, mrr, v, s, b, p, r);
2613}
2614
2615// -----|-
2617 const Range& v,
2618 const Range& s,
2619 const Range& b,
2620 const Range& p,
2621 Index r,
2622 const Range& c) {
2623 CHECK(r);
2624 return Tensor6View(
2625 mdata + OFFSET(r), mlr, mvr, msr, mbr, mpr, mcr, l, v, s, b, p, c);
2626}
2627// |----|-
2629 const Range& v,
2630 const Range& s,
2631 const Range& b,
2632 const Range& p,
2633 Index r,
2634 const Range& c) {
2635 CHECK(l);
2636 CHECK(r);
2637 return Tensor5View(
2638 mdata + OFFSET(l) + OFFSET(r), mvr, msr, mbr, mpr, mcr, v, s, b, p, c);
2639}
2640
2641// ----|--
2643 const Range& v,
2644 const Range& s,
2645 const Range& b,
2646 Index p,
2647 const Range& r,
2648 const Range& c) {
2649 CHECK(p);
2650 return Tensor6View(
2651 mdata + OFFSET(p), mlr, mvr, msr, mbr, mrr, mcr, l, v, s, b, r, c);
2652}
2653// |---|--
2655 const Range& v,
2656 const Range& s,
2657 const Range& b,
2658 Index p,
2659 const Range& r,
2660 const Range& c) {
2661 CHECK(l);
2662 CHECK(p);
2663 return Tensor5View(
2664 mdata + OFFSET(l) + OFFSET(p), mvr, msr, mbr, mrr, mcr, v, s, b, r, c);
2665}
2666
2667// ---|---
2669 const Range& v,
2670 const Range& s,
2671 Index b,
2672 const Range& p,
2673 const Range& r,
2674 const Range& c) {
2675 CHECK(b);
2676 return Tensor6View(
2677 mdata + OFFSET(b), mlr, mvr, msr, mpr, mrr, mcr, l, v, s, p, r, c);
2678}
2679// |--|---
2681 const Range& v,
2682 const Range& s,
2683 Index b,
2684 const Range& p,
2685 const Range& r,
2686 const Range& c) {
2687 CHECK(l);
2688 CHECK(b);
2689 return Tensor5View(
2690 mdata + OFFSET(l) + OFFSET(b), mvr, msr, mpr, mrr, mcr, v, s, p, r, c);
2691}
2692
2693// --|----
2695 const Range& v,
2696 Index s,
2697 const Range& b,
2698 const Range& p,
2699 const Range& r,
2700 const Range& c) {
2701 CHECK(s);
2702 return Tensor6View(
2703 mdata + OFFSET(s), mlr, mvr, mbr, mpr, mrr, mcr, l, v, b, p, r, c);
2704}
2705// |-|----
2707 const Range& v,
2708 Index s,
2709 const Range& b,
2710 const Range& p,
2711 const Range& r,
2712 const Range& c) {
2713 CHECK(l);
2714 CHECK(s);
2715 return Tensor5View(
2716 mdata + OFFSET(l) + OFFSET(s), mvr, mbr, mpr, mrr, mcr, v, b, p, r, c);
2717}
2718
2719// -|-----
2721 Index v,
2722 const Range& s,
2723 const Range& b,
2724 const Range& p,
2725 const Range& r,
2726 const Range& c) {
2727 CHECK(v);
2728 return Tensor6View(
2729 mdata + OFFSET(v), mlr, msr, mbr, mpr, mrr, mcr, l, s, b, p, r, c);
2730}
2731// ||-----
2733 Index v,
2734 const Range& s,
2735 const Range& b,
2736 const Range& p,
2737 const Range& r,
2738 const Range& c) {
2739 CHECK(l);
2740 CHECK(v);
2741 return Tensor5View(
2742 mdata + OFFSET(l) + OFFSET(v), msr, mbr, mpr, mrr, mcr, s, b, p, r, c);
2743}
2744
2745// -----||
2747 const Range& v,
2748 const Range& s,
2749 const Range& b,
2750 const Range& p,
2751 Index r,
2752 Index c) {
2753 CHECK(r);
2754 CHECK(c);
2755 return Tensor5View(
2756 mdata + OFFSET(r) + OFFSET(c), mlr, mvr, msr, mbr, mpr, l, v, s, b, p);
2757}
2758// |----||
2760 const Range& v,
2761 const Range& s,
2762 const Range& b,
2763 const Range& p,
2764 Index r,
2765 Index c) {
2766 CHECK(l);
2767 CHECK(r);
2768 CHECK(c);
2769 return Tensor4View(mdata + OFFSET(l) + OFFSET(r) + OFFSET(c),
2770 mvr,
2771 msr,
2772 mbr,
2773 mpr,
2774 v,
2775 s,
2776 b,
2777 p);
2778}
2779
2780// ----|-|
2782 const Range& v,
2783 const Range& s,
2784 const Range& b,
2785 Index p,
2786 const Range& r,
2787 Index c) {
2788 CHECK(p);
2789 CHECK(c);
2790 return Tensor5View(
2791 mdata + OFFSET(p) + OFFSET(c), mlr, mvr, msr, mbr, mrr, l, v, s, b, r);
2792}
2793// |---|-|
2795 const Range& v,
2796 const Range& s,
2797 const Range& b,
2798 Index p,
2799 const Range& r,
2800 Index c) {
2801 CHECK(l);
2802 CHECK(p);
2803 CHECK(c);
2804 return Tensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(c),
2805 mvr,
2806 msr,
2807 mbr,
2808 mrr,
2809 v,
2810 s,
2811 b,
2812 r);
2813}
2814
2815// ---|--|
2817 const Range& v,
2818 const Range& s,
2819 Index b,
2820 const Range& p,
2821 const Range& r,
2822 Index c) {
2823 CHECK(b);
2824 CHECK(c);
2825 return Tensor5View(
2826 mdata + OFFSET(b) + OFFSET(c), mlr, mvr, msr, mpr, mrr, l, v, s, p, r);
2827}
2828// |--|--|
2830 const Range& v,
2831 const Range& s,
2832 Index b,
2833 const Range& p,
2834 const Range& r,
2835 Index c) {
2836 CHECK(l);
2837 CHECK(b);
2838 CHECK(c);
2839 return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(c),
2840 mvr,
2841 msr,
2842 mpr,
2843 mrr,
2844 v,
2845 s,
2846 p,
2847 r);
2848}
2849
2850// --|---|
2852 const Range& v,
2853 Index s,
2854 const Range& b,
2855 const Range& p,
2856 const Range& r,
2857 Index c) {
2858 CHECK(s);
2859 CHECK(c);
2860 return Tensor5View(
2861 mdata + OFFSET(s) + OFFSET(c), mlr, mvr, mbr, mpr, mrr, l, v, b, p, r);
2862}
2863// |-|---|
2865 const Range& v,
2866 Index s,
2867 const Range& b,
2868 const Range& p,
2869 const Range& r,
2870 Index c) {
2871 CHECK(l);
2872 CHECK(s);
2873 CHECK(c);
2874 return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(c),
2875 mvr,
2876 mbr,
2877 mpr,
2878 mrr,
2879 v,
2880 b,
2881 p,
2882 r);
2883}
2884
2885// -|----|
2887 Index v,
2888 const Range& s,
2889 const Range& b,
2890 const Range& p,
2891 const Range& r,
2892 Index c) {
2893 CHECK(v);
2894 CHECK(c);
2895 return Tensor5View(
2896 mdata + OFFSET(v) + OFFSET(c), mlr, msr, mbr, mpr, mrr, l, s, b, p, r);
2897}
2898// ||----|
2900 Index v,
2901 const Range& s,
2902 const Range& b,
2903 const Range& p,
2904 const Range& r,
2905 Index c) {
2906 CHECK(l);
2907 CHECK(v);
2908 CHECK(c);
2909 return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(c),
2910 msr,
2911 mbr,
2912 mpr,
2913 mrr,
2914 s,
2915 b,
2916 p,
2917 r);
2918}
2919
2920// ----||-
2922 const Range& v,
2923 const Range& s,
2924 const Range& b,
2925 Index p,
2926 Index r,
2927 const Range& c) {
2928 CHECK(p);
2929 CHECK(r);
2930 return Tensor5View(
2931 mdata + OFFSET(p) + OFFSET(r), mlr, mvr, msr, mbr, mcr, l, v, s, b, c);
2932}
2933// |---||-
2935 const Range& v,
2936 const Range& s,
2937 const Range& b,
2938 Index p,
2939 Index r,
2940 const Range& c) {
2941 CHECK(l);
2942 CHECK(p);
2943 CHECK(r);
2944 return Tensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r),
2945 mvr,
2946 msr,
2947 mbr,
2948 mcr,
2949 v,
2950 s,
2951 b,
2952 c);
2953}
2954
2955// ---|-|-
2957 const Range& v,
2958 const Range& s,
2959 Index b,
2960 const Range& p,
2961 Index r,
2962 const Range& c) {
2963 CHECK(b);
2964 CHECK(r);
2965 return Tensor5View(
2966 mdata + OFFSET(b) + OFFSET(r), mlr, mvr, msr, mpr, mcr, l, v, s, p, c);
2967}
2968// |--|-|-
2970 const Range& v,
2971 const Range& s,
2972 Index b,
2973 const Range& p,
2974 Index r,
2975 const Range& c) {
2976 CHECK(l);
2977 CHECK(b);
2978 CHECK(r);
2979 return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r),
2980 mvr,
2981 msr,
2982 mpr,
2983 mcr,
2984 v,
2985 s,
2986 p,
2987 c);
2988}
2989
2990// --|--|-
2992 const Range& v,
2993 Index s,
2994 const Range& b,
2995 const Range& p,
2996 Index r,
2997 const Range& c) {
2998 CHECK(s);
2999 CHECK(r);
3000 return Tensor5View(
3001 mdata + OFFSET(s) + OFFSET(r), mlr, mvr, mbr, mpr, mcr, l, v, b, p, c);
3002}
3003// |-|--|-
3005 const Range& v,
3006 Index s,
3007 const Range& b,
3008 const Range& p,
3009 Index r,
3010 const Range& c) {
3011 CHECK(l);
3012 CHECK(s);
3013 CHECK(r);
3014 return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r),
3015 mvr,
3016 mbr,
3017 mpr,
3018 mcr,
3019 v,
3020 b,
3021 p,
3022 c);
3023}
3024
3025// -|---|-
3027 Index v,
3028 const Range& s,
3029 const Range& b,
3030 const Range& p,
3031 Index r,
3032 const Range& c) {
3033 CHECK(v);
3034 CHECK(r);
3035 return Tensor5View(
3036 mdata + OFFSET(v) + OFFSET(r), mlr, msr, mbr, mpr, mcr, l, s, b, p, c);
3037}
3038// ||---|-
3040 Index v,
3041 const Range& s,
3042 const Range& b,
3043 const Range& p,
3044 Index r,
3045 const Range& c) {
3046 CHECK(l);
3047 CHECK(v);
3048 CHECK(r);
3049 return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r),
3050 msr,
3051 mbr,
3052 mpr,
3053 mcr,
3054 s,
3055 b,
3056 p,
3057 c);
3058}
3059
3060// ---||--
3062 const Range& v,
3063 const Range& s,
3064 Index b,
3065 Index p,
3066 const Range& r,
3067 const Range& c) {
3068 CHECK(b);
3069 CHECK(p);
3070 return Tensor5View(
3071 mdata + OFFSET(b) + OFFSET(p), mlr, mvr, msr, mrr, mcr, l, v, s, r, c);
3072}
3073// |--||--
3075 const Range& v,
3076 const Range& s,
3077 Index b,
3078 Index p,
3079 const Range& r,
3080 const Range& c) {
3081 CHECK(l);
3082 CHECK(b);
3083 CHECK(p);
3084 return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p),
3085 mvr,
3086 msr,
3087 mrr,
3088 mcr,
3089 v,
3090 s,
3091 r,
3092 c);
3093}
3094
3095// --|-|--
3097 const Range& v,
3098 Index s,
3099 const Range& b,
3100 Index p,
3101 const Range& r,
3102 const Range& c) {
3103 CHECK(s);
3104 CHECK(p);
3105 return Tensor5View(
3106 mdata + OFFSET(s) + OFFSET(p), mlr, mvr, mbr, mrr, mcr, l, v, b, r, c);
3107}
3108// |-|-|--
3110 const Range& v,
3111 Index s,
3112 const Range& b,
3113 Index p,
3114 const Range& r,
3115 const Range& c) {
3116 CHECK(l);
3117 CHECK(s);
3118 CHECK(p);
3119 return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p),
3120 mvr,
3121 mbr,
3122 mrr,
3123 mcr,
3124 v,
3125 b,
3126 r,
3127 c);
3128}
3129
3130// -|--|--
3132 Index v,
3133 const Range& s,
3134 const Range& b,
3135 Index p,
3136 const Range& r,
3137 const Range& c) {
3138 CHECK(v);
3139 CHECK(p);
3140 return Tensor5View(
3141 mdata + OFFSET(v) + OFFSET(p), mlr, msr, mbr, mrr, mcr, l, s, b, r, c);
3142}
3143// ||--|--
3145 Index v,
3146 const Range& s,
3147 const Range& b,
3148 Index p,
3149 const Range& r,
3150 const Range& c) {
3151 CHECK(l);
3152 CHECK(v);
3153 CHECK(p);
3154 return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p),
3155 msr,
3156 mbr,
3157 mrr,
3158 mcr,
3159 s,
3160 b,
3161 r,
3162 c);
3163}
3164
3165// --||---
3167 const Range& v,
3168 Index s,
3169 Index b,
3170 const Range& p,
3171 const Range& r,
3172 const Range& c) {
3173 CHECK(s);
3174 CHECK(b);
3175 return Tensor5View(
3176 mdata + OFFSET(s) + OFFSET(b), mlr, mvr, mpr, mrr, mcr, l, v, p, r, c);
3177}
3178// |-||---
3180 const Range& v,
3181 Index s,
3182 Index b,
3183 const Range& p,
3184 const Range& r,
3185 const Range& c) {
3186 CHECK(l);
3187 CHECK(s);
3188 CHECK(b);
3189 return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b),
3190 mvr,
3191 mpr,
3192 mrr,
3193 mcr,
3194 v,
3195 p,
3196 r,
3197 c);
3198}
3199
3200// -|-|---
3202 Index v,
3203 const Range& s,
3204 Index b,
3205 const Range& p,
3206 const Range& r,
3207 const Range& c) {
3208 CHECK(v);
3209 CHECK(b);
3210 return Tensor5View(
3211 mdata + OFFSET(v) + OFFSET(b), mlr, msr, mpr, mrr, mcr, l, s, p, r, c);
3212}
3213// ||-|---
3215 Index v,
3216 const Range& s,
3217 Index b,
3218 const Range& p,
3219 const Range& r,
3220 const Range& c) {
3221 CHECK(l);
3222 CHECK(v);
3223 CHECK(b);
3224 return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b),
3225 msr,
3226 mpr,
3227 mrr,
3228 mcr,
3229 s,
3230 p,
3231 r,
3232 c);
3233}
3234
3235// -||----
3237 Index v,
3238 Index s,
3239 const Range& b,
3240 const Range& p,
3241 const Range& r,
3242 const Range& c) {
3243 CHECK(v);
3244 CHECK(s);
3245 return Tensor5View(
3246 mdata + OFFSET(v) + OFFSET(s), mlr, mbr, mpr, mrr, mcr, l, b, p, r, c);
3247}
3248// |||----
3250 Index v,
3251 Index s,
3252 const Range& b,
3253 const Range& p,
3254 const Range& r,
3255 const Range& c) {
3256 CHECK(l);
3257 CHECK(v);
3258 CHECK(s);
3259 return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s),
3260 mbr,
3261 mpr,
3262 mrr,
3263 mcr,
3264 b,
3265 p,
3266 r,
3267 c);
3268}
3269
3270// ----|||
3272 const Range& v,
3273 const Range& s,
3274 const Range& b,
3275 Index p,
3276 Index r,
3277 Index c) {
3278 CHECK(p);
3279 CHECK(r);
3280 CHECK(c);
3281 return Tensor4View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
3282 mlr,
3283 mvr,
3284 msr,
3285 mbr,
3286 l,
3287 v,
3288 s,
3289 b);
3290}
3291// |---|||
3293 const Range& v,
3294 const Range& s,
3295 const Range& b,
3296 Index p,
3297 Index r,
3298 Index c) {
3299 CHECK(l);
3300 CHECK(p);
3301 CHECK(r);
3302 CHECK(c);
3303 return Tensor3View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r) + OFFSET(c),
3304 mvr,
3305 msr,
3306 mbr,
3307 v,
3308 s,
3309 b);
3310}
3311
3312// ---|-||
3314 const Range& v,
3315 const Range& s,
3316 Index b,
3317 const Range& p,
3318 Index r,
3319 Index c) {
3320 CHECK(b);
3321 CHECK(r);
3322 CHECK(c);
3323 return Tensor4View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
3324 mlr,
3325 mvr,
3326 msr,
3327 mpr,
3328 l,
3329 v,
3330 s,
3331 p);
3332}
3333// |--|-||
3335 const Range& v,
3336 const Range& s,
3337 Index b,
3338 const Range& p,
3339 Index r,
3340 Index c) {
3341 CHECK(l);
3342 CHECK(b);
3343 CHECK(r);
3344 CHECK(c);
3345 return Tensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r) + OFFSET(c),
3346 mvr,
3347 msr,
3348 mpr,
3349 v,
3350 s,
3351 p);
3352}
3353
3354// --|--||
3356 const Range& v,
3357 Index s,
3358 const Range& b,
3359 const Range& p,
3360 Index r,
3361 Index c) {
3362 CHECK(s);
3363 CHECK(r);
3364 CHECK(c);
3365 return Tensor4View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
3366 mlr,
3367 mvr,
3368 mbr,
3369 mpr,
3370 l,
3371 v,
3372 b,
3373 p);
3374}
3375// |-|--||
3377 const Range& v,
3378 Index s,
3379 const Range& b,
3380 const Range& p,
3381 Index r,
3382 Index c) {
3383 CHECK(l);
3384 CHECK(s);
3385 CHECK(r);
3386 CHECK(c);
3387 return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r) + OFFSET(c),
3388 mvr,
3389 mbr,
3390 mpr,
3391 v,
3392 b,
3393 p);
3394}
3395
3396// -|---||
3398 Index v,
3399 const Range& s,
3400 const Range& b,
3401 const Range& p,
3402 Index r,
3403 Index c) {
3404 CHECK(v);
3405 CHECK(r);
3406 CHECK(c);
3407 return Tensor4View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
3408 mlr,
3409 msr,
3410 mbr,
3411 mpr,
3412 l,
3413 s,
3414 b,
3415 p);
3416}
3417// ||---||
3419 Index v,
3420 const Range& s,
3421 const Range& b,
3422 const Range& p,
3423 Index r,
3424 Index c) {
3425 CHECK(l);
3426 CHECK(v);
3427 CHECK(r);
3428 CHECK(c);
3429 return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r) + OFFSET(c),
3430 msr,
3431 mbr,
3432 mpr,
3433 s,
3434 b,
3435 p);
3436}
3437
3438// ---||-|
3440 const Range& v,
3441 const Range& s,
3442 Index b,
3443 Index p,
3444 const Range& r,
3445 Index c) {
3446 CHECK(b);
3447 CHECK(p);
3448 CHECK(c);
3449 return Tensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
3450 mlr,
3451 mvr,
3452 msr,
3453 mrr,
3454 l,
3455 v,
3456 s,
3457 r);
3458}
3459// |--||-|
3461 const Range& v,
3462 const Range& s,
3463 Index b,
3464 Index p,
3465 const Range& r,
3466 Index c) {
3467 CHECK(l);
3468 CHECK(b);
3469 CHECK(p);
3470 CHECK(c);
3471 return Tensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(c),
3472 mvr,
3473 msr,
3474 mrr,
3475 v,
3476 s,
3477 r);
3478}
3479
3480// --|-|-|
3482 const Range& v,
3483 Index s,
3484 const Range& b,
3485 Index p,
3486 const Range& r,
3487 Index c) {
3488 CHECK(s);
3489 CHECK(p);
3490 CHECK(c);
3491 return Tensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
3492 mlr,
3493 mvr,
3494 mbr,
3495 mrr,
3496 l,
3497 v,
3498 b,
3499 r);
3500}
3501// |-|-|-|
3503 const Range& v,
3504 Index s,
3505 const Range& b,
3506 Index p,
3507 const Range& r,
3508 Index c) {
3509 CHECK(l);
3510 CHECK(s);
3511 CHECK(p);
3512 CHECK(c);
3513 return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(c),
3514 mvr,
3515 mbr,
3516 mrr,
3517 v,
3518 b,
3519 r);
3520}
3521
3522// -|--|-|
3524 Index v,
3525 const Range& s,
3526 const Range& b,
3527 Index p,
3528 const Range& r,
3529 Index c) {
3530 CHECK(v);
3531 CHECK(p);
3532 CHECK(c);
3533 return Tensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
3534 mlr,
3535 msr,
3536 mbr,
3537 mrr,
3538 l,
3539 s,
3540 b,
3541 r);
3542}
3543// ||--|-|
3545 Index v,
3546 const Range& s,
3547 const Range& b,
3548 Index p,
3549 const Range& r,
3550 Index c) {
3551 CHECK(l);
3552 CHECK(v);
3553 CHECK(p);
3554 CHECK(c);
3555 return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(c),
3556 msr,
3557 mbr,
3558 mrr,
3559 s,
3560 b,
3561 r);
3562}
3563
3564// --||--|
3566 const Range& v,
3567 Index s,
3568 Index b,
3569 const Range& p,
3570 const Range& r,
3571 Index c) {
3572 CHECK(s);
3573 CHECK(b);
3574 CHECK(c);
3575 return Tensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
3576 mlr,
3577 mvr,
3578 mpr,
3579 mrr,
3580 l,
3581 v,
3582 p,
3583 r);
3584}
3585// |-||--|
3587 const Range& v,
3588 Index s,
3589 Index b,
3590 const Range& p,
3591 const Range& r,
3592 Index c) {
3593 CHECK(l);
3594 CHECK(s);
3595 CHECK(b);
3596 CHECK(c);
3597 return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(c),
3598 mvr,
3599 mpr,
3600 mrr,
3601 v,
3602 p,
3603 r);
3604}
3605
3606// -|-|--|
3608 Index v,
3609 const Range& s,
3610 Index b,
3611 const Range& p,
3612 const Range& r,
3613 Index c) {
3614 CHECK(v);
3615 CHECK(b);
3616 CHECK(c);
3617 return Tensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
3618 mlr,
3619 msr,
3620 mpr,
3621 mrr,
3622 l,
3623 s,
3624 p,
3625 r);
3626}
3627// ||-|--|
3629 Index v,
3630 const Range& s,
3631 Index b,
3632 const Range& p,
3633 const Range& r,
3634 Index c) {
3635 CHECK(l);
3636 CHECK(v);
3637 CHECK(b);
3638 CHECK(c);
3639 return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(c),
3640 msr,
3641 mpr,
3642 mrr,
3643 s,
3644 p,
3645 r);
3646}
3647
3648// -||---|
3650 Index v,
3651 Index s,
3652 const Range& b,
3653 const Range& p,
3654 const Range& r,
3655 Index c) {
3656 CHECK(v);
3657 CHECK(s);
3658 CHECK(c);
3659 return Tensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
3660 mlr,
3661 mbr,
3662 mpr,
3663 mrr,
3664 l,
3665 b,
3666 p,
3667 r);
3668}
3669// |||---|
3671 Index v,
3672 Index s,
3673 const Range& b,
3674 const Range& p,
3675 const Range& r,
3676 Index c) {
3677 CHECK(l);
3678 CHECK(v);
3679 CHECK(s);
3680 CHECK(c);
3681 return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(c),
3682 mbr,
3683 mpr,
3684 mrr,
3685 b,
3686 p,
3687 r);
3688}
3689
3690// ---|||-
3692 const Range& v,
3693 const Range& s,
3694 Index b,
3695 Index p,
3696 Ind