MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
tlayout.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2020, 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"
17 #include "../general/cuda.hpp"
18 #include "../general/hip.hpp"
19 
20 namespace mfem
21 {
22 
23 // Layout classes
24 
25 template <int N1, int S1>
27 template <int N1, int S1, int N2, int S2>
29 
30 template <int N1, int S1>
32 {
33  static const int rank = 1;
34  static const int dim_1 = N1;
35  static const int size = N1;
36 
37  MFEM_HOST_DEVICE static inline int ind(int i1)
38  {
39  return S1*i1;
40  }
41 
42  template <int M1>
44  {
45  return OffsetStridedLayout1D<M1,S1>(S1*o1);
46  }
47 
48  // reshape methods
49 
50  template <int N1_1, int N1_2>
52  {
53  // S1*i1 == S1*(i1_1+N1_1*i1_2)
54  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
56  }
57 };
58 
59 template <int N1, int S1, int N2, int S2>
61 
62 template <int N1, int S1>
64 {
65  static const int rank = 1;
66  static const int dim_1 = N1;
67  static const int size = N1;
68 
69  int offset;
70 
72  OffsetStridedLayout1D(int offset_) : offset(offset_) { }
73  MFEM_HOST_DEVICE inline int ind(int i1) const
74  {
75  return offset+S1*i1;
76  }
77 
78  template <int M1>
80  {
82  }
83 
84  // reshape methods
85 
86  template <int N1_1, int N1_2>
88  {
89  // S1*i1 == S1*(i1_1+N1_1*i1_2)
90  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
92  }
93 };
94 
95 template <int N1, int S1, int N2, int S2, int N3, int S3>
97 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
99 
100 template <int N1, int S1, int N2, int S2>
101 struct StridedLayout2D
102 {
103  static const int rank = 2;
104  static const int dim_1 = N1;
105  static const int dim_2 = N2;
106  static const int size = N1*N2;
107 
108  MFEM_HOST_DEVICE static inline int ind(int i1, int i2)
109  {
110  return (S1*i1+S2*i2);
111  }
113  {
114  return OffsetStridedLayout1D<N2,S2>(S1*i1);
115  }
117  {
118  return OffsetStridedLayout1D<N1,S1>(S2*i2);
119  }
120 
121  template <int M1, int M2>
123  {
124  return OffsetStridedLayout2D<M1,S1,M2,S2>(S1*o1+S2*o2);
125  }
126 
127  // reshape methods
128 
129  template <int N1_1, int N1_2>
131  {
132  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
133  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
135  }
136  template <int N2_1, int N2_2>
138  {
139  // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
140  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
142  }
143  template <int N1_1, int N1_2, int N2_1, int N2_2>
145  {
146  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
147  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
148  "invalid dimensions");
150  }
152  {
153  // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
154  // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
155  // assuming: S2 == S1*N1 || S1 == S2*N2
156  MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
158  }
160  {
162  }
163 };
164 
165 template <int N1, int S1, int N2, int S2, int N3, int S3>
167 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
169 
170 template <int N1, int S1, int N2, int S2>
172 {
173  static const int rank = 2;
174  static const int dim_1 = N1;
175  static const int dim_2 = N2;
176  static const int size = N1*N2;
177 
178  int offset;
179 
181  OffsetStridedLayout2D(int offset_) : offset(offset_) { }
182  MFEM_HOST_DEVICE inline int ind(int i1, int i2) const
183  {
184  return offset+S1*i1+S2*i2;
185  }
187  {
188  return OffsetStridedLayout1D<N2,S2>(offset+S1*i1);
189  }
191  {
192  return OffsetStridedLayout1D<N1,S1>(offset+S2*i2);
193  }
194 
195  template <int M1, int M2>
197  {
198  return OffsetStridedLayout2D<M1,S1,M2,S2>(offset+S1*o1+S2*o2);
199  }
200 
201  // reshape methods
202 
203  template <int N1_1, int N1_2>
205  {
206  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
207  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
209  }
210  template <int N2_1, int N2_2>
212  {
213  // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
214  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
216  }
217  template <int N1_1, int N1_2, int N2_1, int N2_2>
219  split_12() const
220  {
221  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
222  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
223  "invalid dimensions");
224  return OffsetStridedLayout4D<
225  N1_1,S1,N1_2,S1*N1_1,N2_1,S2,N2_2,S2*N2_1>(offset);
226  }
228  {
229  // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
230  // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
231  // assuming: S2 == S1*N1 || S1 == S2*N2
232  MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
234  }
236  {
238  }
239 };
240 
241 template <int N1, int S1, int N2, int S2, int N3, int S3>
242 struct StridedLayout3D
243 {
244  static const int rank = 3;
245  static const int dim_1 = N1;
246  static const int dim_2 = N2;
247  static const int dim_3 = N3;
248  static const int size = N1*N2*N3;
249 
250  static inline int ind(int i1, int i2, int i3)
251  {
252  return S1*i1+S2*i2+S3*i3;
253  }
255  {
257  }
259  {
261  }
263  {
265  }
266 
267  // reshape methods
268 
270  {
271  // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
272  // assuming: S2 == S1*N1
273  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
275  // alternative:
276  // use: (S1*i1+S2*i2+S3*i3) == (S2*(S1/S2*i1+i2)+S3*i3)
277  // assuming: S1 == S2*N2
278  // result is: StridedLayout2D<N1*N2,S2,N3,S3>
279  }
281  {
282  // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
283  // assuming: S3 == S2*N2
284  MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
286  }
287 
288  template <int N1_1, int N1_2>
290  {
291  // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
292  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
294  }
295  template <int N2_1, int N2_2>
297  {
298  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
299  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
301  }
302  template <int N3_1, int N3_2>
304  {
305  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*i2+S3*(i3_1+N3_1*i3_2)
306  MFEM_STATIC_ASSERT(N3_1*N3_2 == N3, "invalid dimensions");
308  }
309 
311  {
313  }
315  {
317  }
319  {
321  }
322 };
323 
324 template <int N1, int S1, int N2, int S2, int N3, int S3>
325 struct OffsetStridedLayout3D
326 {
327  static const int rank = 3;
328  static const int dim_1 = N1;
329  static const int dim_2 = N2;
330  static const int dim_3 = N3;
331  static const int size = N1*N2*N3;
332 
333  int offset;
334 
336  OffsetStridedLayout3D(int offset_) : offset(offset_) { }
337  inline int ind(int i1, int i2, int i3) const
338  {
339  return offset+S1*i1+S2*i2+S3*i3;
340  }
342  {
344  }
346  {
348  }
350  {
352  }
353 
354  // reshape methods
355 
357  {
358  // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
359  // assuming: S2 == S1*N1
360  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
362  }
364  {
365  // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
366  // assuming: S3 == S2*N2
367  MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
369  }
370 
371  template <int N1_1, int N1_2>
373  {
374  // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
375  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
377  }
378  template <int N2_1, int N2_2>
380  {
381  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
382  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
384  }
385 };
386 
387 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
388 struct StridedLayout4D
389 {
390  static const int rank = 4;
391  static const int dim_1 = N1;
392  static const int dim_2 = N2;
393  static const int dim_3 = N3;
394  static const int dim_4 = N4;
395  static const int size = N1*N2*N3*N4;
396 
397  static inline int ind(int i1, int i2, int i3, int i4)
398  {
399  return S1*i1+S2*i2+S3*i3+S4*i4;
400  }
402  {
403  return OffsetStridedLayout2D<N1,S1,N4,S4>(S2*i2+S3*i3);
404  }
406  {
407  return OffsetStridedLayout2D<N2,S2,N3,S3>(S1*i1+S4*i4);
408  }
410  {
412  }
413 
415  {
416  // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*(i1+S2/S1*i2)+S3*i3+S4*i4)
417  // assuming S2 == S1*N1
418  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
420  }
422  {
423  // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*i1+S2*i2+S3*(i3+S4/S3*i4))
424  // assuming S4 == S3*N3
425  MFEM_STATIC_ASSERT(S4 == S3*N3, "invalid reshape");
427  }
428 };
429 
430 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
431 struct OffsetStridedLayout4D
432 {
433  static const int rank = 4;
434  static const int dim_1 = N1;
435  static const int dim_2 = N2;
436  static const int dim_3 = N3;
437  static const int dim_4 = N4;
438  static const int size = N1*N2*N3*N4;
439 
440  int offset;
441 
443  OffsetStridedLayout4D(int offset_) : offset(offset_) { }
444  inline int ind(int i1, int i2, int i3, int i4) const
445  {
446  return offset+S1*i1+S2*i2+S3*i3+S4*i4;
447  }
448 };
449 
450 template <int N1, int N2>
452  : public StridedLayout2D<N1,1,N2,N1> { };
453 
454 template <int N1, int N2, int N3>
456  : public StridedLayout3D<N1,1,N2,N1,N3,N1*N2> { };
457 
458 template <int N1, int N2, int N3, int N4>
460  : public StridedLayout4D<N1,1,N2,N1,N3,N1*N2,N4,N1*N2*N3> { };
461 
462 
463 // Vector layout classes
464 
466 {
467 public:
468  static const int vec_dim = 0; // 0 - dynamic
469 
470 protected:
473 
474  void Init(Ordering::Type ordering, int scalar_size, int num_comp)
475  {
476  num_components = num_comp;
477  if (ordering == Ordering::byNODES)
478  {
479  scal_stride = 1;
480  comp_stride = scalar_size;
481  }
482  else
483  {
484  scal_stride = num_comp;
485  comp_stride = 1;
486  }
487  }
488 
489 public:
490  DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
491  {
492  Init(ordering, scalar_size, num_comp);
493  }
495  {
496  Init(fes.GetOrdering(), fes.GetNDofs(), fes.GetVDim());
497  }
498  // default copy constructor
499 
500  int NumComponents() const { return num_components; }
501 
502  int ind(int scalar_idx, int comp_idx) const
503  {
504  return scal_stride * scalar_idx + comp_stride * comp_idx;
505  }
506 
507  static bool Matches(const FiniteElementSpace &fes)
508  {
509  return true;
510  }
511 };
512 
513 // The default value (NumComp = 0) indicates that the number of components is
514 // dynamic, i.e. it will be specified at run-time.
515 template <Ordering::Type Ord, int NumComp = 0>
517 {
518 public:
519  static const int vec_dim = NumComp;
520 
521 protected:
523 
524 public:
525  VectorLayout(int scalar_size_, int num_comp_ = NumComp)
526  : num_components(num_comp_),
527  scalar_size(scalar_size_)
528  {
529  MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
530  "invalid number of components");
531  }
532 
534  : num_components(fes.GetVDim()),
535  scalar_size(fes.GetNDofs())
536  {
537  MFEM_ASSERT(fes.GetOrdering() == Ord, "ordering mismatch");
538  MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
539  "invalid number of components");
540  }
541  // default copy constructor
542 
543  int NumComponents() const { return (NumComp ? NumComp : num_components); }
544 
545  int ind(int scalar_idx, int comp_idx) const
546  {
547  if (Ord == Ordering::byNODES)
548  {
549  return scalar_idx + comp_idx * scalar_size;
550  }
551  else
552  {
553  return comp_idx + (NumComp ? NumComp : num_components) * scalar_idx;
554  }
555  }
556 
557  static bool Matches(const FiniteElementSpace &fes)
558  {
559  return (Ord == fes.GetOrdering() &&
560  (NumComp == 0 || NumComp == fes.GetVDim()));
561  }
562 };
563 
565 {
566 public:
567  static const int vec_dim = 1;
568 
570 
572  {
573  MFEM_ASSERT(fes.GetVDim() == 1, "invalid number of components");
574  }
575 
576  int NumComponents() const { return 1; }
577 
578  int ind(int scalar_idx, int comp_idx) const { return scalar_idx; }
579 
580  static bool Matches(const FiniteElementSpace &fes)
581  {
582  return (fes.GetVDim() == 1);
583  }
584 };
585 
586 } // namespace mfem
587 
588 #endif // MFEM_TEMPLATE_LAYOUT
static const int size
Definition: tlayout.hpp:176
static const int size
Definition: tlayout.hpp:438
OffsetStridedLayout1D< N1, S1 > ind2(int i2) const
Definition: tlayout.hpp:190
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:578
static const int dim_2
Definition: tlayout.hpp:175
Ordering::Type GetOrdering() const
Return the ordering method.
Definition: fespace.hpp:393
static const int size
Definition: tlayout.hpp:395
static const int dim_1
Definition: tlayout.hpp:434
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12() const
Definition: tlayout.hpp:219
int GetNDofs() const
Returns number of degrees of freedom.
Definition: fespace.hpp:378
int NumComponents() const
Definition: tlayout.hpp:500
OffsetStridedLayout2D< N1 *N2, S1, N3, S3 > merge_12() const
Definition: tlayout.hpp:356
MFEM_HOST_DEVICE int ind(int i1) const
Definition: tlayout.hpp:73
static const int dim_1
Definition: tlayout.hpp:66
static MFEM_HOST_DEVICE int ind(int i1)
Definition: tlayout.hpp:37
static StridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1()
Definition: tlayout.hpp:51
static StridedLayout4D< N1, S1, N2, S2, N3_1, S3, N3_2, S3 *N3_1 > split_3()
Definition: tlayout.hpp:303
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1)
Definition: tlayout.hpp:254
static StridedLayout3D< N1, S1, N3, S3, N2, S2 > transpose_23()
Definition: tlayout.hpp:318
static const int dim_1
Definition: tlayout.hpp:328
static const int dim_3
Definition: tlayout.hpp:330
static const int dim_4
Definition: tlayout.hpp:437
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:580
static StridedLayout2D< N1, S1, N2 *N3, S2 > merge_23()
Definition: tlayout.hpp:280
OffsetStridedLayout4D(int offset_)
Definition: tlayout.hpp:443
static StridedLayout2D< N2, S2, N1, S1 > transpose_12()
Definition: tlayout.hpp:159
int NumComponents() const
Definition: tlayout.hpp:576
OffsetStridedLayout1D< M1, S1 > sub(int o1) const
Definition: tlayout.hpp:79
static const int dim_2
Definition: tlayout.hpp:435
OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3) const
Definition: tlayout.hpp:349
OffsetStridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1() const
Definition: tlayout.hpp:204
VectorLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:533
OffsetStridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12() const
Definition: tlayout.hpp:227
static const int size
Definition: tlayout.hpp:35
ScalarLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:571
OffsetStridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1() const
Definition: tlayout.hpp:87
static OffsetStridedLayout1D< M1, S1 > sub(int o1)
Definition: tlayout.hpp:43
static const int size
Definition: tlayout.hpp:67
int ind(int i1, int i2, int i3, int i4) const
Definition: tlayout.hpp:444
static OffsetStridedLayout3D< N1, S1, N2, S2, N3, S3 > ind4(int i4)
Definition: tlayout.hpp:409
static const int size
Definition: tlayout.hpp:331
static const int dim_2
Definition: tlayout.hpp:105
static const int rank
Definition: tlayout.hpp:65
OffsetStridedLayout2D< N1, S1, N2 *N3, S2 > merge_23() const
Definition: tlayout.hpp:363
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind14(int i1, int i4)
Definition: tlayout.hpp:405
OffsetStridedLayout3D(int offset_)
Definition: tlayout.hpp:336
static StridedLayout3D< N1, S1, N2, S2, N3 *N4, S3 > merge_34()
Definition: tlayout.hpp:421
OffsetStridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2() const
Definition: tlayout.hpp:379
static int ind(int i1, int i2, int i3, int i4)
Definition: tlayout.hpp:397
static const int rank
Definition: tlayout.hpp:390
VectorLayout(int scalar_size_, int num_comp_=NumComp)
Definition: tlayout.hpp:525
static const int rank
Definition: tlayout.hpp:173
Type
Ordering methods:
Definition: fespace.hpp:32
static OffsetStridedLayout2D< N1, S1, N4, S4 > ind23(int i2, int i3)
Definition: tlayout.hpp:401
static OffsetStridedLayout1D< N2, S2 > ind1(int i1)
Definition: tlayout.hpp:112
static StridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2()
Definition: tlayout.hpp:296
OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2) const
Definition: tlayout.hpp:196
OffsetStridedLayout2D< N2, S2, N1, S1 > transpose_12() const
Definition: tlayout.hpp:235
OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1) const
Definition: tlayout.hpp:341
static StridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2()
Definition: tlayout.hpp:137
static const int dim_2
Definition: tlayout.hpp:392
int GetVDim() const
Returns vector dimension.
Definition: fespace.hpp:370
static const int dim_2
Definition: tlayout.hpp:329
static const int dim_4
Definition: tlayout.hpp:394
void Init(Ordering::Type ordering, int scalar_size, int num_comp)
Definition: tlayout.hpp:474
static const int dim_3
Definition: tlayout.hpp:393
DynamicVectorLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:494
static OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3)
Definition: tlayout.hpp:262
static int ind(int i1, int i2, int i3)
Definition: tlayout.hpp:250
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:502
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:557
static StridedLayout3D< N2, S2, N1, S1, N3, S3 > transpose_12()
Definition: tlayout.hpp:310
static OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2)
Definition: tlayout.hpp:122
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition: fespace.hpp:87
static StridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12()
Definition: tlayout.hpp:151
int ind(int i1, int i2, int i3) const
Definition: tlayout.hpp:337
OffsetStridedLayout2D(int offset_)
Definition: tlayout.hpp:181
static const int dim_1
Definition: tlayout.hpp:34
static StridedLayout2D< N1 *N2, S1, N3, S3 > merge_12()
Definition: tlayout.hpp:269
static OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2)
Definition: tlayout.hpp:258
static StridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1()
Definition: tlayout.hpp:130
static const int size
Definition: tlayout.hpp:248
static StridedLayout3D< N1 *N2, S1, N3, S3, N4, S4 > merge_12()
Definition: tlayout.hpp:414
OffsetStridedLayout1D(int offset_)
Definition: tlayout.hpp:72
static const int rank
Definition: tlayout.hpp:327
int NumComponents() const
Definition: tlayout.hpp:543
static const int dim_1
Definition: tlayout.hpp:104
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:545
static const int dim_1
Definition: tlayout.hpp:174
static const int vec_dim
Definition: tlayout.hpp:519
static const int vec_dim
Definition: tlayout.hpp:468
static const int rank
Definition: tlayout.hpp:103
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1()
Definition: tlayout.hpp:289
static const int rank
Definition: tlayout.hpp:244
static const int size
Definition: tlayout.hpp:106
static const int rank
Definition: tlayout.hpp:33
static OffsetStridedLayout1D< N1, S1 > ind2(int i2)
Definition: tlayout.hpp:116
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1() const
Definition: tlayout.hpp:372
OffsetStridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2() const
Definition: tlayout.hpp:211
static const int dim_3
Definition: tlayout.hpp:247
MFEM_HOST_DEVICE int ind(int i1, int i2) const
Definition: tlayout.hpp:182
static const int dim_1
Definition: tlayout.hpp:245
static const int rank
Definition: tlayout.hpp:433
static MFEM_HOST_DEVICE int ind(int i1, int i2)
Definition: tlayout.hpp:108
static const int dim_3
Definition: tlayout.hpp:436
static StridedLayout3D< N3, S3, N2, S2, N1, S1 > transpose_13()
Definition: tlayout.hpp:314
OffsetStridedLayout1D< N2, S2 > ind1(int i1) const
Definition: tlayout.hpp:186
static const int vec_dim
Definition: tlayout.hpp:567
DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
Definition: tlayout.hpp:490
OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2) const
Definition: tlayout.hpp:345
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12()
Definition: tlayout.hpp:144
static const int dim_1
Definition: tlayout.hpp:391
static const int dim_2
Definition: tlayout.hpp:246
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:507