CMS 3D CMS Logo

Classes | Functions
edm::soahelper Namespace Reference

Classes

struct  Aligned
 
struct  AlignmentHelper
 
struct  AlignmentHelper< Aligned< T, ALIGNMENT > >
 
struct  arg_puller
 
struct  arg_puller< I, I, Ret, F, Args... >
 
struct  arg_puller< I, J, Ret, F, Args... >
 
struct  SoATupleHelper
 
struct  SoATupleHelper< 0, Args... >
 

Functions

constexpr unsigned int padding_needed (size_t iSizeSoFar, unsigned int iBoundary)
 

Function Documentation

◆ padding_needed()

constexpr unsigned int edm::soahelper::padding_needed ( size_t  iSizeSoFar,
unsigned int  iBoundary 
)

Given a leading memory size, iSizeSoFar, and an alignment boundary requirement of iBoundary, returns how much additional memory padding is needed. This function assumes that when iSizeSoFar==0 that we are already properly aligned.

Definition at line 33 of file SoATupleHelper.h.

Referenced by edm::soahelper::SoATupleHelper< I, Args >::copyToNew(), edm::soahelper::SoATupleHelper< I, Args >::moveToNew(), and edm::soahelper::SoATupleHelper< I, Args >::spaceNeededFor().

33  {
34  return (iBoundary - iSizeSoFar % iBoundary) % iBoundary;
35  }