1 #ifndef FWCore_Utilities_SoATuple_h 2 #define FWCore_Utilities_SoATuple_h 103 template <
typename T>
106 template <
typename... Args>
145 delete[]
static_cast<AlignedType*
>(
m_values[0]);
153 template <
unsigned int I>
155 unsigned int iIndex)
const {
158 return *(
static_cast<ReturnType const*
>(
m_values[
I]) + iIndex);
162 template <
unsigned int I>
167 #if GCC_PREREQUISITE(4, 7, 0) 168 return static_cast<ReturnType const*
>(__builtin_assume_aligned(
m_values[I], Helper::kAlignment));
170 return static_cast<ReturnType const*
>(
m_values[
I]);
174 template <
unsigned int I>
207 template <
typename... FArgs>
218 template <
unsigned int I>
220 unsigned int iIndex) {
223 return *(
static_cast<ReturnType*
>(
m_values[
I]) + iIndex);
227 template <
unsigned int I>
231 #if GCC_PREREQUISITE(4, 7, 0) 232 return static_cast<ReturnType*
>(__builtin_assume_aligned(
m_values[I], Helper::kAlignment));
234 return static_cast<ReturnType*
>(
m_values[
I]);
238 template <
unsigned int I>
248 for (
unsigned int i = 0;
i <
sizeof...(Args); ++
i) {
255 assert(
m_size <= iToSize);
271 const size_t itemsNeeded = (memoryNeededInBytes + max_alignment - 1) /
sizeof(AlignedType);
272 char* newMemory =
static_cast<char*
>(
static_cast<void*
>(
new AlignedType[itemsNeeded]));
276 delete[]
static_cast<AlignedType*
>(oldMemory);
soahelper::AlignmentHelper< typename std::tuple_element< I, std::tuple< Args... > >::type >::Type const * begin() const
void swap(SoATuple< Args... > &iOther)
void changeSize(unsigned int iToSize)
std::tuple< Args... > element
void emplace_back(FArgs &&...values)
SoATuple(SoATuple< Args... > &&iOther)
void push_back(element const &values)
std::map< DetId, double > ReturnType
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const std::complex< double > I
soahelper::AlignmentHelper< typename std::tuple_element< I, std::tuple< Args... > >::type >::Type * begin()
const SoATuple< Args... > & operator=(const SoATuple< Args... > &iRHS)
soahelper::AlignmentHelper< typename std::tuple_element< I, std::tuple< Args... > >::type >::Type const * end() const
soahelper::AlignmentHelper< typename std::tuple_element< I, std::tuple< Args... > >::type >::Type * end()
void reserve(unsigned int iToSize)
SoATuple(const SoATuple< Args... > &iOther)
void * m_values[sizeof...(Args)]