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