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 331 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 */ \
_soa_impl_ret += cms::soa::alignSize(sizeof(CPP_TYPE), alignment); \
, \
/* Column */ \
_soa_impl_ret += cms::soa::alignSize(elements * sizeof(CPP_TYPE), alignment); \
, \
/* Eigen column */ \
_soa_impl_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
#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 317 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 311 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*>(_soa_impl_curMem); \
_soa_impl_curMem += cms::soa::alignSize(sizeof(CPP_TYPE), alignment); \
, \
/* Column */ \
BOOST_PP_CAT(NAME, _) = reinterpret_cast<CPP_TYPE*>(_soa_impl_curMem); \
_soa_impl_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*>(_soa_impl_curMem); \
_soa_impl_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 287 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 218 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, _) = _soa_impl_other.BOOST_PP_CAT(NAME, _);, \
/* Column */ \
BOOST_PP_CAT(NAME, _) = _soa_impl_other.BOOST_PP_CAT(NAME, _);, \
/* Eigen column */ \
BOOST_PP_CAT(NAME, ElementsWithPadding_) = _soa_impl_other.BOOST_PP_CAT(NAME, ElementsWithPadding_); \
BOOST_PP_CAT(NAME, _) = _soa_impl_other.BOOST_PP_CAT(NAME, _); \
BOOST_PP_CAT(NAME, Stride_) = _soa_impl_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 205 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 201 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, _){_soa_impl_other.BOOST_PP_CAT(NAME, _)}), \
/* Column */ \
(BOOST_PP_CAT(NAME, _){_soa_impl_other.BOOST_PP_CAT(NAME, _)}), \
/* Eigen column */ \
(BOOST_PP_CAT(NAME, ElementsWithPadding_){_soa_impl_other.BOOST_PP_CAT(NAME, ElementsWithPadding_)}) \
(BOOST_PP_CAT(NAME, _){_soa_impl_other.BOOST_PP_CAT(NAME, _)}) \
(BOOST_PP_CAT(NAME, Stride_){_soa_impl_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 188 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 184 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 171 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 354 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 _soa_impl_index) { \
return BOOST_PP_CAT(NAME, _)[_soa_impl_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 337 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 377 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 _soa_impl_index) const { \
return *(BOOST_PP_CAT(NAME, _) + _soa_impl_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 360 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 419 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 404 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 93 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 */ \
_soa_impl_os << " Scalar " BOOST_PP_STRINGIZE(NAME) " at offset " << _soa_impl_offset \
<< " has size " << sizeof(CPP_TYPE) \
<< " and padding " << ((sizeof(CPP_TYPE) - 1) / alignment + 1) * alignment - sizeof(CPP_TYPE) \
<< std::endl; \
_soa_impl_offset += ((sizeof(CPP_TYPE) - 1) / alignment + 1) * alignment; \
, \
/* Dump column */ \
_soa_impl_os << " Column " BOOST_PP_STRINGIZE(NAME) " at offset " << _soa_impl_offset << " has size " \
<< sizeof(CPP_TYPE) * elements_ << " and padding " \
<< cms::soa::alignSize(elements_ * sizeof(CPP_TYPE), alignment) - (elements_ * sizeof(CPP_TYPE)) \
<< std::endl; \
_soa_impl_offset += cms::soa::alignSize(elements_ * sizeof(CPP_TYPE), alignment); \
, \
/* Dump Eigen column */ \
_soa_impl_os << " Eigen value " BOOST_PP_STRINGIZE(NAME) " at offset " << _soa_impl_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; \
_soa_impl_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 168 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 99 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 236 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 224 of file SoALayout.h.

◆ _DO_RANGECHECK

#define _DO_RANGECHECK   false

Definition at line 424 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 281 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 276 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 397 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 383 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 253 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 242 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 270 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 259 of file SoALayout.h.

◆ GENERATE_SOA_LAYOUT

#define GENERATE_SOA_LAYOUT (   CLASS,
  ... 
)

Definition at line 431 of file SoALayout.h.