CMS 3D CMS Logo

TestSoA.h
Go to the documentation of this file.
1 #ifndef DataFormats_PortableTestObjects_interface_TestSoA_h
2 #define DataFormats_PortableTestObjects_interface_TestSoA_h
3 
4 #include <Eigen/Core>
5 #include <Eigen/Dense>
6 
10 
11 namespace portabletest {
12 
13  using Matrix = Eigen::Matrix<double, 3, 6>;
14  // SoA layout with x, y, z, id fields
16  // columns: one value per element
17  SOA_COLUMN(double, x),
18  SOA_COLUMN(double, y),
19  SOA_COLUMN(double, z),
20  SOA_COLUMN(int32_t, id),
21  // scalars: one value for the whole structure
22  SOA_SCALAR(double, r),
23  // Eigen columns
24  // the typedef is needed because commas confuse macros
26 
27  using TestSoA = TestSoALayout<>;
28 
29 } // namespace portabletest
30 
31 #endif // DataFormats_PortableTestObjects_interface_TestSoA_h
Eigen::Matrix< double, 3, 6 > Matrix
Definition: TestSoA.h:13
#define GENERATE_SOA_LAYOUT(CLASS,...)
Definition: SoALayout.h:413
#define SOA_SCALAR(TYPE, NAME)
Definition: SoACommon.h:547
#define SOA_EIGEN_COLUMN(TYPE, NAME)
Definition: SoACommon.h:549
#define SOA_COLUMN(TYPE, NAME)
Definition: SoACommon.h:548