MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
tlayout.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#ifndef MFEM_TEMPLATE_LAYOUT
13#define MFEM_TEMPLATE_LAYOUT
14
15#include "../config/tconfig.hpp"
16#include "../fem/fespace.hpp"
18
19namespace mfem
20{
21
22// Layout classes
23
24template <int N1, int S1>
25struct OffsetStridedLayout1D;
26template <int N1, int S1, int N2, int S2>
27struct StridedLayout2D;
28
29template <int N1, int S1>
31{
32 static const int rank = 1;
33 static const int dim_1 = N1;
34 static const int size = N1;
35
36 MFEM_HOST_DEVICE static inline int ind(int i1)
37 {
38 return S1*i1;
39 }
40
41 template <int M1>
43 {
44 return OffsetStridedLayout1D<M1,S1>(S1*o1);
45 }
46
47 // reshape methods
48
49 template <int N1_1, int N1_2>
51 {
52 // S1*i1 == S1*(i1_1+N1_1*i1_2)
53 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
55 }
56};
57
58template <int N1, int S1, int N2, int S2>
59struct OffsetStridedLayout2D;
60
61template <int N1, int S1>
63{
64 static const int rank = 1;
65 static const int dim_1 = N1;
66 static const int size = N1;
67
68 int offset;
69
71 OffsetStridedLayout1D(int offset_) : offset(offset_) { }
72 MFEM_HOST_DEVICE inline int ind(int i1) const
73 {
74 return offset+S1*i1;
75 }
76
77 template <int M1>
79 {
81 }
82
83 // reshape methods
84
85 template <int N1_1, int N1_2>
87 {
88 // S1*i1 == S1*(i1_1+N1_1*i1_2)
89 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
91 }
92};
93
94template <int N1, int S1, int N2, int S2, int N3, int S3>
95struct StridedLayout3D;
96template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
97struct StridedLayout4D;
98
99template <int N1, int S1, int N2, int S2>
101{
102 static const int rank = 2;
103 static const int dim_1 = N1;
104 static const int dim_2 = N2;
105 static const int size = N1*N2;
106
107 MFEM_HOST_DEVICE static inline int ind(int i1, int i2)
108 {
109 return (S1*i1+S2*i2);
110 }
112 {
113 return OffsetStridedLayout1D<N2,S2>(S1*i1);
114 }
116 {
117 return OffsetStridedLayout1D<N1,S1>(S2*i2);
118 }
119
120 template <int M1, int M2>
122 {
123 return OffsetStridedLayout2D<M1,S1,M2,S2>(S1*o1+S2*o2);
124 }
125
126 // reshape methods
127
128 template <int N1_1, int N1_2>
130 {
131 // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
132 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
134 }
135 template <int N2_1, int N2_2>
137 {
138 // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
139 MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
141 }
142 template <int N1_1, int N1_2, int N2_1, int N2_2>
144 {
145 // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
146 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
147 "invalid dimensions");
149 }
150 static StridedLayout1D<N1*N2,(S1<S2)?S1:S2> merge_12()
151 {
152 // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
153 // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
154 // assuming: S2 == S1*N1 || S1 == S2*N2
155 MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
157 }
162};
163
164template <int N1, int S1, int N2, int S2, int N3, int S3>
165struct OffsetStridedLayout3D;
166template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
167struct OffsetStridedLayout4D;
168
169template <int N1, int S1, int N2, int S2>
171{
172 static const int rank = 2;
173 static const int dim_1 = N1;
174 static const int dim_2 = N2;
175 static const int size = N1*N2;
176
178
180 OffsetStridedLayout2D(int offset_) : offset(offset_) { }
181 MFEM_HOST_DEVICE inline int ind(int i1, int i2) const
182 {
183 return offset+S1*i1+S2*i2;
184 }
186 {
188 }
190 {
192 }
193
194 template <int M1, int M2>
196 {
197 return OffsetStridedLayout2D<M1,S1,M2,S2>(offset+S1*o1+S2*o2);
198 }
199
200 // reshape methods
201
202 template <int N1_1, int N1_2>
204 {
205 // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
206 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
208 }
209 template <int N2_1, int N2_2>
211 {
212 // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
213 MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
215 }
216 template <int N1_1, int N1_2, int N2_1, int N2_2>
218 split_12() const
219 {
220 // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
221 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
222 "invalid dimensions");
224 N1_1,S1,N1_2,S1*N1_1,N2_1,S2,N2_2,S2*N2_1>(offset);
225 }
226 OffsetStridedLayout1D<N1*N2,(S1<S2)?S1:S2> merge_12() const
227 {
228 // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
229 // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
230 // assuming: S2 == S1*N1 || S1 == S2*N2
231 MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
233 }
238};
239
240template <int N1, int S1, int N2, int S2, int N3, int S3>
242{
243 static const int rank = 3;
244 static const int dim_1 = N1;
245 static const int dim_2 = N2;
246 static const int dim_3 = N3;
247 static const int size = N1*N2*N3;
248
249 static inline int ind(int i1, int i2, int i3)
250 {
251 return S1*i1+S2*i2+S3*i3;
252 }
265
266 // reshape methods
267
269 {
270 // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
271 // assuming: S2 == S1*N1
272 MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
274 // alternative:
275 // use: (S1*i1+S2*i2+S3*i3) == (S2*(S1/S2*i1+i2)+S3*i3)
276 // assuming: S1 == S2*N2
277 // result is: StridedLayout2D<N1*N2,S2,N3,S3>
278 }
280 {
281 // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
282 // assuming: S3 == S2*N2
283 MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
285 }
286
287 template <int N1_1, int N1_2>
289 {
290 // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
291 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
293 }
294 template <int N2_1, int N2_2>
296 {
297 // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
298 MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
300 }
301 template <int N3_1, int N3_2>
303 {
304 // S1*i1+S2*i2+S3*i3 == S1*i1+S2*i2+S3*(i3_1+N3_1*i3_2)
305 MFEM_STATIC_ASSERT(N3_1*N3_2 == N3, "invalid dimensions");
307 }
308
321};
322
323template <int N1, int S1, int N2, int S2, int N3, int S3>
325{
326 static const int rank = 3;
327 static const int dim_1 = N1;
328 static const int dim_2 = N2;
329 static const int dim_3 = N3;
330 static const int size = N1*N2*N3;
331
333
335 OffsetStridedLayout3D(int offset_) : offset(offset_) { }
336 inline int ind(int i1, int i2, int i3) const
337 {
338 return offset+S1*i1+S2*i2+S3*i3;
339 }
352
353 // reshape methods
354
356 {
357 // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
358 // assuming: S2 == S1*N1
359 MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
361 }
363 {
364 // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
365 // assuming: S3 == S2*N2
366 MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
368 }
369
370 template <int N1_1, int N1_2>
372 {
373 // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
374 MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
376 }
377 template <int N2_1, int N2_2>
379 {
380 // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
381 MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
383 }
384};
385
386template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
388{
389 static const int rank = 4;
390 static const int dim_1 = N1;
391 static const int dim_2 = N2;
392 static const int dim_3 = N3;
393 static const int dim_4 = N4;
394 static const int size = N1*N2*N3*N4;
395
396 static inline int ind(int i1, int i2, int i3, int i4)
397 {
398 return S1*i1+S2*i2+S3*i3+S4*i4;
399 }
401 {
402 return OffsetStridedLayout2D<N1,S1,N4,S4>(S2*i2+S3*i3);
403 }
405 {
406 return OffsetStridedLayout2D<N2,S2,N3,S3>(S1*i1+S4*i4);
407 }
412
414 {
415 // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*(i1+S2/S1*i2)+S3*i3+S4*i4)
416 // assuming S2 == S1*N1
417 MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
419 }
421 {
422 // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*i1+S2*i2+S3*(i3+S4/S3*i4))
423 // assuming S4 == S3*N3
424 MFEM_STATIC_ASSERT(S4 == S3*N3, "invalid reshape");
426 }
427};
428
429template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
431{
432 static const int rank = 4;
433 static const int dim_1 = N1;
434 static const int dim_2 = N2;
435 static const int dim_3 = N3;
436 static const int dim_4 = N4;
437 static const int size = N1*N2*N3*N4;
438
440
442 OffsetStridedLayout4D(int offset_) : offset(offset_) { }
443 inline int ind(int i1, int i2, int i3, int i4) const
444 {
445 return offset+S1*i1+S2*i2+S3*i3+S4*i4;
446 }
447};
448
449template <int N1, int N2>
451 : public StridedLayout2D<N1,1,N2,N1> { };
452
453template <int N1, int N2, int N3>
455 : public StridedLayout3D<N1,1,N2,N1,N3,N1*N2> { };
456
457template <int N1, int N2, int N3, int N4>
459 : public StridedLayout4D<N1,1,N2,N1,N3,N1*N2,N4,N1*N2*N3> { };
460
461
462// Vector layout classes
463
465{
466public:
467 static const int vec_dim = 0; // 0 - dynamic
468
469protected:
472
473 void Init(Ordering::Type ordering, int scalar_size, int num_comp)
474 {
475 num_components = num_comp;
476 if (ordering == Ordering::byNODES)
477 {
478 scal_stride = 1;
479 comp_stride = scalar_size;
480 }
481 else
482 {
483 scal_stride = num_comp;
484 comp_stride = 1;
485 }
486 }
487
488public:
489 DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
490 {
491 Init(ordering, scalar_size, num_comp);
492 }
494 {
495 Init(fes.GetOrdering(), fes.GetNDofs(), fes.GetVDim());
496 }
497 // default copy constructor
498
499 int NumComponents() const { return num_components; }
500
501 int ind(int scalar_idx, int comp_idx) const
502 {
503 return scal_stride * scalar_idx + comp_stride * comp_idx;
504 }
505
506 static bool Matches(const FiniteElementSpace &fes)
507 {
508 return true;
509 }
510};
511
512// The default value (NumComp = 0) indicates that the number of components is
513// dynamic, i.e. it will be specified at run-time.
514template <Ordering::Type Ord, int NumComp = 0>
516{
517public:
518 static const int vec_dim = NumComp;
519
520protected:
522
523public:
524 VectorLayout(int scalar_size_, int num_comp_ = NumComp)
525 : num_components(num_comp_),
526 scalar_size(scalar_size_)
527 {
528 MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
529 "invalid number of components");
530 }
531
533 : num_components(fes.GetVDim()),
534 scalar_size(fes.GetNDofs())
535 {
536 MFEM_ASSERT(fes.GetOrdering() == Ord, "ordering mismatch");
537 MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
538 "invalid number of components");
539 }
540 // default copy constructor
541
542 int NumComponents() const { return (NumComp ? NumComp : num_components); }
543
544 int ind(int scalar_idx, int comp_idx) const
545 {
546 if (Ord == Ordering::byNODES)
547 {
548 return scalar_idx + comp_idx * scalar_size;
549 }
550 else
551 {
552 return comp_idx + (NumComp ? NumComp : num_components) * scalar_idx;
553 }
554 }
555
556 static bool Matches(const FiniteElementSpace &fes)
557 {
558 return (Ord == fes.GetOrdering() &&
559 (NumComp == 0 || NumComp == fes.GetVDim()));
560 }
561};
562
564{
565public:
566 static const int vec_dim = 1;
567
569
571 {
572 MFEM_ASSERT(fes.GetVDim() == 1, "invalid number of components");
573 }
574
575 int NumComponents() const { return 1; }
576
577 int ind(int scalar_idx, int comp_idx) const { return scalar_idx; }
578
579 static bool Matches(const FiniteElementSpace &fes)
580 {
581 return (fes.GetVDim() == 1);
582 }
583};
584
585} // namespace mfem
586
587#endif // MFEM_TEMPLATE_LAYOUT
DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
Definition tlayout.hpp:489
static bool Matches(const FiniteElementSpace &fes)
Definition tlayout.hpp:506
static const int vec_dim
Definition tlayout.hpp:467
int ind(int scalar_idx, int comp_idx) const
Definition tlayout.hpp:501
DynamicVectorLayout(const FiniteElementSpace &fes)
Definition tlayout.hpp:493
void Init(Ordering::Type ordering, int scalar_size, int num_comp)
Definition tlayout.hpp:473
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition fespace.hpp:220
int GetNDofs() const
Returns number of degrees of freedom. This is the number of Local Degrees of Freedom.
Definition fespace.hpp:710
Ordering::Type GetOrdering() const
Return the ordering method.
Definition fespace.hpp:725
int GetVDim() const
Returns vector dimension.
Definition fespace.hpp:706
Type
Ordering methods:
Definition fespace.hpp:34
ScalarLayout(const FiniteElementSpace &fes)
Definition tlayout.hpp:570
int NumComponents() const
Definition tlayout.hpp:575
static bool Matches(const FiniteElementSpace &fes)
Definition tlayout.hpp:579
static const int vec_dim
Definition tlayout.hpp:566
int ind(int scalar_idx, int comp_idx) const
Definition tlayout.hpp:577
static const int vec_dim
Definition tlayout.hpp:518
static bool Matches(const FiniteElementSpace &fes)
Definition tlayout.hpp:556
VectorLayout(int scalar_size_, int num_comp_=NumComp)
Definition tlayout.hpp:524
int NumComponents() const
Definition tlayout.hpp:542
int ind(int scalar_idx, int comp_idx) const
Definition tlayout.hpp:544
VectorLayout(const FiniteElementSpace &fes)
Definition tlayout.hpp:532
OffsetStridedLayout1D< M1, S1 > sub(int o1) const
Definition tlayout.hpp:78
static const int rank
Definition tlayout.hpp:64
OffsetStridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1() const
Definition tlayout.hpp:86
static const int size
Definition tlayout.hpp:66
static const int dim_1
Definition tlayout.hpp:65
MFEM_HOST_DEVICE int ind(int i1) const
Definition tlayout.hpp:72
OffsetStridedLayout1D(int offset_)
Definition tlayout.hpp:71
OffsetStridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1() const
Definition tlayout.hpp:203
OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2) const
Definition tlayout.hpp:195
OffsetStridedLayout2D(int offset_)
Definition tlayout.hpp:180
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12() const
Definition tlayout.hpp:218
static const int dim_2
Definition tlayout.hpp:174
OffsetStridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12() const
Definition tlayout.hpp:226
MFEM_HOST_DEVICE int ind(int i1, int i2) const
Definition tlayout.hpp:181
OffsetStridedLayout2D< N2, S2, N1, S1 > transpose_12() const
Definition tlayout.hpp:234
static const int size
Definition tlayout.hpp:175
OffsetStridedLayout1D< N1, S1 > ind2(int i2) const
Definition tlayout.hpp:189
OffsetStridedLayout1D< N2, S2 > ind1(int i1) const
Definition tlayout.hpp:185
static const int rank
Definition tlayout.hpp:172
OffsetStridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2() const
Definition tlayout.hpp:210
static const int dim_1
Definition tlayout.hpp:173
OffsetStridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2() const
Definition tlayout.hpp:378
static const int dim_3
Definition tlayout.hpp:329
OffsetStridedLayout2D< N1 *N2, S1, N3, S3 > merge_12() const
Definition tlayout.hpp:355
static const int rank
Definition tlayout.hpp:326
int ind(int i1, int i2, int i3) const
Definition tlayout.hpp:336
static const int size
Definition tlayout.hpp:330
OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3) const
Definition tlayout.hpp:348
static const int dim_2
Definition tlayout.hpp:328
OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1) const
Definition tlayout.hpp:340
OffsetStridedLayout3D(int offset_)
Definition tlayout.hpp:335
static const int dim_1
Definition tlayout.hpp:327
OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2) const
Definition tlayout.hpp:344
OffsetStridedLayout2D< N1, S1, N2 *N3, S2 > merge_23() const
Definition tlayout.hpp:362
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1() const
Definition tlayout.hpp:371
static const int size
Definition tlayout.hpp:437
static const int dim_1
Definition tlayout.hpp:433
static const int dim_2
Definition tlayout.hpp:434
static const int dim_3
Definition tlayout.hpp:435
static const int rank
Definition tlayout.hpp:432
int ind(int i1, int i2, int i3, int i4) const
Definition tlayout.hpp:443
static const int dim_4
Definition tlayout.hpp:436
OffsetStridedLayout4D(int offset_)
Definition tlayout.hpp:442
static const int size
Definition tlayout.hpp:34
static MFEM_HOST_DEVICE int ind(int i1)
Definition tlayout.hpp:36
static const int rank
Definition tlayout.hpp:32
static StridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1()
Definition tlayout.hpp:50
static OffsetStridedLayout1D< M1, S1 > sub(int o1)
Definition tlayout.hpp:42
static const int dim_1
Definition tlayout.hpp:33
static OffsetStridedLayout1D< N1, S1 > ind2(int i2)
Definition tlayout.hpp:115
static StridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12()
Definition tlayout.hpp:150
static MFEM_HOST_DEVICE int ind(int i1, int i2)
Definition tlayout.hpp:107
static StridedLayout2D< N2, S2, N1, S1 > transpose_12()
Definition tlayout.hpp:158
static OffsetStridedLayout1D< N2, S2 > ind1(int i1)
Definition tlayout.hpp:111
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12()
Definition tlayout.hpp:143
static const int dim_1
Definition tlayout.hpp:103
static const int rank
Definition tlayout.hpp:102
static StridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1()
Definition tlayout.hpp:129
static OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2)
Definition tlayout.hpp:121
static const int size
Definition tlayout.hpp:105
static StridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2()
Definition tlayout.hpp:136
static const int dim_2
Definition tlayout.hpp:104
static StridedLayout3D< N3, S3, N2, S2, N1, S1 > transpose_13()
Definition tlayout.hpp:313
static StridedLayout3D< N2, S2, N1, S1, N3, S3 > transpose_12()
Definition tlayout.hpp:309
static OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3)
Definition tlayout.hpp:261
static StridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2()
Definition tlayout.hpp:295
static const int rank
Definition tlayout.hpp:243
static const int dim_1
Definition tlayout.hpp:244
static StridedLayout2D< N1, S1, N2 *N3, S2 > merge_23()
Definition tlayout.hpp:279
static const int size
Definition tlayout.hpp:247
static StridedLayout2D< N1 *N2, S1, N3, S3 > merge_12()
Definition tlayout.hpp:268
static const int dim_3
Definition tlayout.hpp:246
static const int dim_2
Definition tlayout.hpp:245
static int ind(int i1, int i2, int i3)
Definition tlayout.hpp:249
static StridedLayout4D< N1, S1, N2, S2, N3_1, S3, N3_2, S3 *N3_1 > split_3()
Definition tlayout.hpp:302
static StridedLayout3D< N1, S1, N3, S3, N2, S2 > transpose_23()
Definition tlayout.hpp:317
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1()
Definition tlayout.hpp:288
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1)
Definition tlayout.hpp:253
static OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2)
Definition tlayout.hpp:257
static const int dim_2
Definition tlayout.hpp:391
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind14(int i1, int i4)
Definition tlayout.hpp:404
static int ind(int i1, int i2, int i3, int i4)
Definition tlayout.hpp:396
static StridedLayout3D< N1, S1, N2, S2, N3 *N4, S3 > merge_34()
Definition tlayout.hpp:420
static const int dim_1
Definition tlayout.hpp:390
static OffsetStridedLayout2D< N1, S1, N4, S4 > ind23(int i2, int i3)
Definition tlayout.hpp:400
static const int rank
Definition tlayout.hpp:389
static const int dim_3
Definition tlayout.hpp:392
static const int dim_4
Definition tlayout.hpp:393
static OffsetStridedLayout3D< N1, S1, N2, S2, N3, S3 > ind4(int i4)
Definition tlayout.hpp:408
static const int size
Definition tlayout.hpp:394
static StridedLayout3D< N1 *N2, S1, N3, S3, N4, S4 > merge_12()
Definition tlayout.hpp:413