CMS 3D CMS Logo

Macros
SoALayout.h File Reference
#include <cassert>
#include "FWCore/Reflection/interface/reflex.h"
#include "SoACommon.h"
#include "SoAView.h"

Go to the source code of this file.

Macros

#define _ACCUMULATE_SOA_ELEMENT(R, DATA, TYPE_NAME)   _ACCUMULATE_SOA_ELEMENT_IMPL TYPE_NAME
 
#define _ACCUMULATE_SOA_ELEMENT_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _ASSIGN_SOA_COLUMN_OR_SCALAR(R, DATA, TYPE_NAME)   _ASSIGN_SOA_COLUMN_OR_SCALAR_IMPL TYPE_NAME
 
#define _ASSIGN_SOA_COLUMN_OR_SCALAR_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_MEMBER_ASSIGNMENT(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_MEMBER_ASSIGNMENT_IMPL TYPE_NAME)
 
#define _DECLARE_MEMBER_ASSIGNMENT_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_MEMBER_COPY_CONSTRUCTION(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_MEMBER_COPY_CONSTRUCTION_IMPL TYPE_NAME)
 
#define _DECLARE_MEMBER_COPY_CONSTRUCTION_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL TYPE_NAME)
 
#define _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_SOA_ACCESSOR(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_SOA_ACCESSOR_IMPL TYPE_NAME)
 
#define _DECLARE_SOA_ACCESSOR_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_SOA_CONST_ACCESSOR(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_SOA_CONST_ACCESSOR_IMPL TYPE_NAME)
 
#define _DECLARE_SOA_CONST_ACCESSOR_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_SOA_DATA_MEMBER(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_SOA_DATA_MEMBER_IMPL TYPE_NAME)
 
#define _DECLARE_SOA_DATA_MEMBER_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DECLARE_SOA_STREAM_INFO(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_DECLARE_SOA_STREAM_INFO_IMPL TYPE_NAME)
 
#define _DECLARE_SOA_STREAM_INFO_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DEFINE_METADATA_MEMBERS(R, DATA, TYPE_NAME)   _DEFINE_METADATA_MEMBERS_IMPL TYPE_NAME
 
#define _DEFINE_METADATA_MEMBERS_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DEFINE_VALUE_ELEMENT_MEMBERS(R, DATA, TYPE_NAME)   _DEFINE_VALUE_ELEMENT_MEMBERS_IMPL TYPE_NAME
 
#define _DEFINE_VALUE_ELEMENT_MEMBERS_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _DO_RANGECHECK   false
 
#define _ROOT_FREE_SOA_COLUMN_OR_SCALAR(R, DATA, TYPE_NAME)   _ROOT_FREE_SOA_COLUMN_OR_SCALAR_IMPL TYPE_NAME
 
#define _ROOT_FREE_SOA_COLUMN_OR_SCALAR_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _STREAMER_READ_SOA_DATA_MEMBER(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_STREAMER_READ_SOA_DATA_MEMBER_IMPL TYPE_NAME)
 
#define _STREAMER_READ_SOA_DATA_MEMBER_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _VALUE_ELEMENT_CTOR_ARGS(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_VALUE_ELEMENT_CTOR_ARGS_IMPL TYPE_NAME)
 
#define _VALUE_ELEMENT_CTOR_ARGS_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define _VALUE_ELEMENT_INITIALIZERS(R, DATA, TYPE_NAME)   BOOST_PP_EXPAND(_VALUE_ELEMENT_INITIALIZERS_IMPL TYPE_NAME)
 
#define _VALUE_ELEMENT_INITIALIZERS_IMPL(VALUE_TYPE, CPP_TYPE, NAME)
 
#define GENERATE_SOA_LAYOUT(CLASS, ...)
 

Macro Definition Documentation

◆ _ACCUMULATE_SOA_ELEMENT

#define _ACCUMULATE_SOA_ELEMENT (   R,
  DATA,
  TYPE_NAME 
)    _ACCUMULATE_SOA_ELEMENT_IMPL TYPE_NAME

Definition at line 330 of file SoALayout.h.

◆ _ACCUMULATE_SOA_ELEMENT_IMPL

#define _ACCUMULATE_SOA_ELEMENT_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
ret += cms::soa::alignSize(sizeof(CPP_TYPE), alignment); \
, \
/* Column */ \
ret += cms::soa::alignSize(elements * sizeof(CPP_TYPE), alignment); \
, \
/* Eigen column */ \
ret += cms::soa::alignSize(elements * sizeof(CPP_TYPE::Scalar), alignment) * CPP_TYPE::RowsAtCompileTime \
* CPP_TYPE::ColsAtCompileTime; \
)
constexpr byte_size_type alignSize(byte_size_type size, byte_size_type alignment)
Definition: SoACommon.h:547
double Scalar
Definition: Definitions.h:25
ret
prodAgent to be discontinued
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Computation of the column or scalar size for SoA size computation

Definition at line 316 of file SoALayout.h.

◆ _ASSIGN_SOA_COLUMN_OR_SCALAR

#define _ASSIGN_SOA_COLUMN_OR_SCALAR (   R,
  DATA,
  TYPE_NAME 
)    _ASSIGN_SOA_COLUMN_OR_SCALAR_IMPL TYPE_NAME

Definition at line 310 of file SoALayout.h.

◆ _ASSIGN_SOA_COLUMN_OR_SCALAR_IMPL

#define _ASSIGN_SOA_COLUMN_OR_SCALAR_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
BOOST_PP_CAT(NAME, _) = reinterpret_cast<CPP_TYPE*>(curMem); \
curMem += cms::soa::alignSize(sizeof(CPP_TYPE), alignment); \
, \
/* Column */ \
BOOST_PP_CAT(NAME, _) = reinterpret_cast<CPP_TYPE*>(curMem); \
curMem += cms::soa::alignSize(elements_ * sizeof(CPP_TYPE), alignment); \
, \
/* Eigen column */ \
BOOST_PP_CAT(NAME, Stride_) = cms::soa::alignSize(elements_ * sizeof(CPP_TYPE::Scalar), alignment) \
/ sizeof(CPP_TYPE::Scalar); \
BOOST_PP_CAT(NAME, ElementsWithPadding_) = BOOST_PP_CAT(NAME, Stride_) \
* CPP_TYPE::RowsAtCompileTime * CPP_TYPE::ColsAtCompileTime; \
BOOST_PP_CAT(NAME, _) = reinterpret_cast<CPP_TYPE::Scalar*>(curMem); \
curMem += cms::soa::alignSize(elements_ * sizeof(CPP_TYPE::Scalar), alignment) * CPP_TYPE::RowsAtCompileTime \
* CPP_TYPE::ColsAtCompileTime; \
) \
if constexpr (alignmentEnforcement == AlignmentEnforcement::enforced) \
if (reinterpret_cast<intptr_t>(BOOST_PP_CAT(NAME, _)) % alignment) \
throw std::runtime_error("In layout constructor: misaligned column: " #NAME);
constexpr byte_size_type alignSize(byte_size_type size, byte_size_type alignment)
Definition: SoACommon.h:547
double Scalar
Definition: Definitions.h:25
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Computation of the column or scalar pointer location in the memory layout (at SoA construction time)

Definition at line 286 of file SoALayout.h.

◆ _DECLARE_MEMBER_ASSIGNMENT

#define _DECLARE_MEMBER_ASSIGNMENT (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_MEMBER_ASSIGNMENT_IMPL TYPE_NAME)

Definition at line 217 of file SoALayout.h.

◆ _DECLARE_MEMBER_ASSIGNMENT_IMPL

#define _DECLARE_MEMBER_ASSIGNMENT_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
BOOST_PP_CAT(NAME, _) = other.BOOST_PP_CAT(NAME, _);, \
/* Column */ \
BOOST_PP_CAT(NAME, _) = other.BOOST_PP_CAT(NAME, _);, \
/* Eigen column */ \
BOOST_PP_CAT(NAME, ElementsWithPadding_) = other.BOOST_PP_CAT(NAME, ElementsWithPadding_); \
BOOST_PP_CAT(NAME, _) = other.BOOST_PP_CAT(NAME, _); \
BOOST_PP_CAT(NAME, Stride_) = other.BOOST_PP_CAT(NAME, Stride_); \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Definition at line 204 of file SoALayout.h.

◆ _DECLARE_MEMBER_COPY_CONSTRUCTION

#define _DECLARE_MEMBER_COPY_CONSTRUCTION (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_MEMBER_COPY_CONSTRUCTION_IMPL TYPE_NAME)

Definition at line 200 of file SoALayout.h.

◆ _DECLARE_MEMBER_COPY_CONSTRUCTION_IMPL

#define _DECLARE_MEMBER_COPY_CONSTRUCTION_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
(BOOST_PP_CAT(NAME, _){other.BOOST_PP_CAT(NAME, _)}), \
/* Column */ \
(BOOST_PP_CAT(NAME, _){other.BOOST_PP_CAT(NAME, _)}), \
/* Eigen column */ \
(BOOST_PP_CAT(NAME, ElementsWithPadding_){other.BOOST_PP_CAT(NAME, ElementsWithPadding_)}) \
(BOOST_PP_CAT(NAME, _){other.BOOST_PP_CAT(NAME, _)}) \
(BOOST_PP_CAT(NAME, Stride_){other.BOOST_PP_CAT(NAME, Stride_)}) \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Definition at line 187 of file SoALayout.h.

◆ _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION

#define _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL TYPE_NAME)

Definition at line 183 of file SoALayout.h.

◆ _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL

#define _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
(BOOST_PP_CAT(NAME, _)(nullptr)), \
/* Column */ \
(BOOST_PP_CAT(NAME, _)(nullptr)), \
/* Eigen column */ \
(BOOST_PP_CAT(NAME, ElementsWithPadding_)(0)) \
(BOOST_PP_CAT(NAME, _)(nullptr)) \
(BOOST_PP_CAT(NAME, Stride_)(0)) \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Definition at line 170 of file SoALayout.h.

◆ _DECLARE_SOA_ACCESSOR

#define _DECLARE_SOA_ACCESSOR (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_SOA_ACCESSOR_IMPL TYPE_NAME)

Definition at line 351 of file SoALayout.h.

◆ _DECLARE_SOA_ACCESSOR_IMPL

#define _DECLARE_SOA_ACCESSOR_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE& NAME() { return *BOOST_PP_CAT(NAME, _); } \
, \
/* Column */ \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE* NAME() { return BOOST_PP_CAT(NAME, _); } \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE& NAME(size_type index) { return BOOST_PP_CAT(NAME, _)[index]; } \
, \
/* Eigen column */ \
/* TODO: implement*/ \
BOOST_PP_EMPTY() \
)
uint16_t size_type
#define SOA_INLINE
Definition: SoACommon.h:28
#define SOA_HOST_DEVICE
Definition: SoACommon.h:27
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Direct access to column pointer and indexed access

Definition at line 336 of file SoALayout.h.

◆ _DECLARE_SOA_CONST_ACCESSOR

#define _DECLARE_SOA_CONST_ACCESSOR (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_SOA_CONST_ACCESSOR_IMPL TYPE_NAME)

Definition at line 372 of file SoALayout.h.

◆ _DECLARE_SOA_CONST_ACCESSOR_IMPL

#define _DECLARE_SOA_CONST_ACCESSOR_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE NAME() const { return *(BOOST_PP_CAT(NAME, _)); } \
, \
/* Column */ \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE const* NAME() const { return BOOST_PP_CAT(NAME, _); } \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE NAME(size_type index) const { return *(BOOST_PP_CAT(NAME, _) + index); } \
, \
/* Eigen column */ \
SOA_HOST_DEVICE SOA_INLINE CPP_TYPE::Scalar const* NAME() const { return BOOST_PP_CAT(NAME, _); } \
SOA_HOST_DEVICE SOA_INLINE size_type BOOST_PP_CAT(NAME, Stride)() { return BOOST_PP_CAT(NAME, Stride_); } \
)
double Scalar
Definition: Definitions.h:25
uint16_t size_type
#define SOA_INLINE
Definition: SoACommon.h:28
#define SOA_HOST_DEVICE
Definition: SoACommon.h:27
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Direct access to column pointer (const) and indexed access.

Definition at line 357 of file SoALayout.h.

◆ _DECLARE_SOA_DATA_MEMBER

#define _DECLARE_SOA_DATA_MEMBER (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_SOA_DATA_MEMBER_IMPL TYPE_NAME)

Definition at line 414 of file SoALayout.h.

◆ _DECLARE_SOA_DATA_MEMBER_IMPL

#define _DECLARE_SOA_DATA_MEMBER_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
CPP_TYPE* BOOST_PP_CAT(NAME, _) EDM_REFLEX_SIZE(scalar_) = nullptr; \
, \
/* Column */ \
CPP_TYPE * BOOST_PP_CAT(NAME, _) EDM_REFLEX_SIZE(elements_) = nullptr; \
, \
/* Eigen column */ \
size_type BOOST_PP_CAT(NAME, ElementsWithPadding_) = 0; /* For ROOT serialization */ \
CPP_TYPE::Scalar * BOOST_PP_CAT(NAME, _) EDM_REFLEX_SIZE(BOOST_PP_CAT(NAME, ElementsWithPadding_)) = nullptr; \
byte_size_type BOOST_PP_CAT(NAME, Stride_) = 0; \
)
double Scalar
Definition: Definitions.h:25
#define EDM_REFLEX_SIZE(SIZE)
Definition: reflex.h:37
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

SoA class member declaration (column pointers).

Definition at line 399 of file SoALayout.h.

◆ _DECLARE_SOA_STREAM_INFO

#define _DECLARE_SOA_STREAM_INFO (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_DECLARE_SOA_STREAM_INFO_IMPL TYPE_NAME)

Definition at line 92 of file SoALayout.h.

◆ _DECLARE_SOA_STREAM_INFO_IMPL

#define _DECLARE_SOA_STREAM_INFO_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
VALUE_TYPE, \
/* Dump scalar */ \
os << " Scalar " BOOST_PP_STRINGIZE(NAME) " at offset " << offset << " has size " << sizeof(CPP_TYPE) \
<< " and padding " << ((sizeof(CPP_TYPE) - 1) / alignment + 1) * alignment - sizeof(CPP_TYPE) \
<< std::endl; \
offset += ((sizeof(CPP_TYPE) - 1) / alignment + 1) * alignment; \
, \
/* Dump column */ \
os << " Column " BOOST_PP_STRINGIZE(NAME) " at offset " << offset << " has size " \
<< sizeof(CPP_TYPE) * elements_ << " and padding " \
<< cms::soa::alignSize(elements_ * sizeof(CPP_TYPE), alignment) - (elements_ * sizeof(CPP_TYPE)) \
<< std::endl; \
offset += cms::soa::alignSize(elements_ * sizeof(CPP_TYPE), alignment); \
, \
/* Dump Eigen column */ \
os << " Eigen value " BOOST_PP_STRINGIZE(NAME) " at offset " << offset << " has dimension " \
<< "(" << CPP_TYPE::RowsAtCompileTime << " x " << CPP_TYPE::ColsAtCompileTime << ")" \
<< " and per column size " \
<< sizeof(CPP_TYPE::Scalar) * elements_ \
<< " and padding " \
<< cms::soa::alignSize(elements_ * sizeof(CPP_TYPE::Scalar), alignment) \
- (elements_ * sizeof(CPP_TYPE::Scalar)) \
<< std::endl; \
offset += cms::soa::alignSize(elements_ * sizeof(CPP_TYPE::Scalar), alignment) \
* CPP_TYPE::RowsAtCompileTime * CPP_TYPE::ColsAtCompileTime; \
)
constexpr byte_size_type alignSize(byte_size_type size, byte_size_type alignment)
Definition: SoACommon.h:547
double Scalar
Definition: Definitions.h:25
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Definition at line 62 of file SoALayout.h.

◆ _DEFINE_METADATA_MEMBERS

#define _DEFINE_METADATA_MEMBERS (   R,
  DATA,
  TYPE_NAME 
)    _DEFINE_METADATA_MEMBERS_IMPL TYPE_NAME

Definition at line 167 of file SoALayout.h.

◆ _DEFINE_METADATA_MEMBERS_IMPL

#define _DEFINE_METADATA_MEMBERS_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)

Metadata member computing column pitch

Definition at line 98 of file SoALayout.h.

◆ _DEFINE_VALUE_ELEMENT_MEMBERS

#define _DEFINE_VALUE_ELEMENT_MEMBERS (   R,
  DATA,
  TYPE_NAME 
)    _DEFINE_VALUE_ELEMENT_MEMBERS_IMPL TYPE_NAME

Definition at line 235 of file SoALayout.h.

◆ _DEFINE_VALUE_ELEMENT_MEMBERS_IMPL

#define _DEFINE_VALUE_ELEMENT_MEMBERS_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar (empty) */ \
, \
/* Column */ \
CPP_TYPE NAME; \
, \
/* Eigen column */ \
CPP_TYPE NAME; \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

Declare the value_element data members

Definition at line 223 of file SoALayout.h.

◆ _DO_RANGECHECK

#define _DO_RANGECHECK   false

Definition at line 419 of file SoALayout.h.

◆ _ROOT_FREE_SOA_COLUMN_OR_SCALAR

#define _ROOT_FREE_SOA_COLUMN_OR_SCALAR (   R,
  DATA,
  TYPE_NAME 
)    _ROOT_FREE_SOA_COLUMN_OR_SCALAR_IMPL TYPE_NAME

Definition at line 280 of file SoALayout.h.

◆ _ROOT_FREE_SOA_COLUMN_OR_SCALAR_IMPL

#define _ROOT_FREE_SOA_COLUMN_OR_SCALAR_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
delete[] BOOST_PP_CAT(NAME, _); \
BOOST_PP_CAT(NAME, _) = nullptr; \

Freeing of the ROOT-allocated column or scalar buffer

Definition at line 275 of file SoALayout.h.

◆ _STREAMER_READ_SOA_DATA_MEMBER

#define _STREAMER_READ_SOA_DATA_MEMBER (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_STREAMER_READ_SOA_DATA_MEMBER_IMPL TYPE_NAME)

Definition at line 392 of file SoALayout.h.

◆ _STREAMER_READ_SOA_DATA_MEMBER_IMPL

#define _STREAMER_READ_SOA_DATA_MEMBER_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar */ \
memcpy(BOOST_PP_CAT(NAME, _), onfile.BOOST_PP_CAT(NAME, _), sizeof(CPP_TYPE)); \
, \
/* Column */ \
memcpy(BOOST_PP_CAT(NAME, _), onfile.BOOST_PP_CAT(NAME, _), sizeof(CPP_TYPE) * onfile.elements_); \
, \
/* Eigen column */ \
memcpy(BOOST_PP_CAT(NAME, _), onfile.BOOST_PP_CAT(NAME, _), \
sizeof(CPP_TYPE::Scalar) * BOOST_PP_CAT(NAME, ElementsWithPadding_)); \
)
double Scalar
Definition: Definitions.h:25
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

SoA member ROOT streamer read (column pointers).

Definition at line 378 of file SoALayout.h.

◆ _VALUE_ELEMENT_CTOR_ARGS

#define _VALUE_ELEMENT_CTOR_ARGS (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_VALUE_ELEMENT_CTOR_ARGS_IMPL TYPE_NAME)

Definition at line 252 of file SoALayout.h.

◆ _VALUE_ELEMENT_CTOR_ARGS_IMPL

#define _VALUE_ELEMENT_CTOR_ARGS_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar (empty) */ \
, \
/* Column */ \
(CPP_TYPE NAME), \
/* Eigen column */ \
(CPP_TYPE NAME) \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

List of data members in the value_element constructor arguments

Definition at line 241 of file SoALayout.h.

◆ _VALUE_ELEMENT_INITIALIZERS

#define _VALUE_ELEMENT_INITIALIZERS (   R,
  DATA,
  TYPE_NAME 
)    BOOST_PP_EXPAND(_VALUE_ELEMENT_INITIALIZERS_IMPL TYPE_NAME)

Definition at line 269 of file SoALayout.h.

◆ _VALUE_ELEMENT_INITIALIZERS_IMPL

#define _VALUE_ELEMENT_INITIALIZERS_IMPL (   VALUE_TYPE,
  CPP_TYPE,
  NAME 
)
Value:
_SWITCH_ON_TYPE(VALUE_TYPE, \
/* Scalar (empty) */ \
, \
/* Column */ \
(NAME{NAME}), \
/* Eigen column */ \
(NAME{NAME}) \
)
#define _SWITCH_ON_TYPE(VALUE_TYPE, IF_SCALAR, IF_COLUMN, IF_EIGEN_COLUMN)
Definition: SoACommon.h:565

List-initalise the value_element data members

Definition at line 258 of file SoALayout.h.

◆ GENERATE_SOA_LAYOUT

#define GENERATE_SOA_LAYOUT (   CLASS,
  ... 
)

Definition at line 426 of file SoALayout.h.