All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Panel< PRIMITIVE > Class Template Reference

#include <GrowableBuffer.h>

Public Member Functions

 Panel (size_t reserved)
 Creates a Panel by allocating a new panel, taking a reserved number of slots. More...
 
 Panel (std::unique_ptr< PRIMITIVE[]> ptr, size_t length, size_t reserved)
 Creates a Panel from a full set of parameters. More...
 
PRIMITIVE & operator[] (size_t i)
 Overloads [] operator to access elements like an array. More...
 
Panelappend_panel (size_t reserved)
 Creates a new panel with slots equal to reserved and appends it after the current panel. More...
 
void fill_panel (PRIMITIVE datum)
 Inserts one datum into the panel. More...
 
std::unique_ptr< Panel > & next ()
 Pointer to the next panel. More...
 
size_t current_length ()
 Currently used number of elements in the panel. More...
 
size_t reserved ()
 Currently allocated number of elements in the panel. More...
 
void append (PRIMITIVE *to_ptr, size_t offset, size_t from, int64_t length) const noexcept
 Copies the data from a panel to one contiguously allocated to_ptr. More...
 
void concatenate_to_from (PRIMITIVE *to_ptr, size_t offset, size_t from) const noexcept
 Copies and concatenates the accumulated data from multiple panels ptr_ to one contiguously allocated to_ptr. More...
 
void concatenate_to (PRIMITIVE *to_ptr, size_t offset) const noexcept
 Copies and concatenates the accumulated data from multiple panels ptr_ to one contiguously allocated to_ptr. More...
 
template<typename TO_PRIMITIVE >
std::enable_if<(!awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&!awkward::is_tt< std::complex, PRIMITIVE >::value)||(awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&awkward::is_tt< std::complex, PRIMITIVE >::value)>::type copy_as (TO_PRIMITIVE *to_ptr, size_t offset)
 Fills (one panel) GrowableBuffer<TO_PRIMITIVE> with the elements of (possibly multi-panels) GrowableBuffer<PRIMITIVE>. More...
 
template<typename TO_PRIMITIVE >
std::enable_if<!awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&awkward::is_tt< std::complex, PRIMITIVE >::value >::type copy_as (TO_PRIMITIVE *to_ptr, size_t offset)
 
template<typename TO_PRIMITIVE >
std::enable_if< awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&!awkward::is_tt< std::complex, PRIMITIVE >::value >::type copy_as (TO_PRIMITIVE *to_ptr, size_t offset)
 'copy_as' specialization of a 'std::complex' template type. Fills (one panel) GrowableBuffer<std::complex> with the elements of (possibly multi-panels) GrowableBuffer<PRIMITIVE>. More...
 

Detailed Description

template<typename PRIMITIVE>
class awkward::Panel< PRIMITIVE >

Creates a contiguous, one-dimensional panel.

Constructor & Destructor Documentation

◆ Panel() [1/2]

Panel ( size_t  reserved)
inline

Creates a Panel by allocating a new panel, taking a reserved number of slots.

Parameters
reservedCurrently allocated number of elements in the panel.

◆ Panel() [2/2]

Panel ( std::unique_ptr< PRIMITIVE[]>  ptr,
size_t  length,
size_t  reserved 
)
inline

Creates a Panel from a full set of parameters.

Parameters
ptrUnique reference to the panel data.
lengthCurrently number used of elements in the panel.
reservedCurrently allocated number of elements in the panel.

Member Function Documentation

◆ append()

void append ( PRIMITIVE *  to_ptr,
size_t  offset,
size_t  from,
int64_t  length 
) const
inlinenoexcept

Copies the data from a panel to one contiguously allocated to_ptr.

Parameters
to_ptrOne contiguously allocated panel.
offsetDistance between to_ptr and the pointer to the destination where the accumulated data is copied.
fromDistance between ptr and pointer to the source of the data to be copied.
lengthLength of the data to be copied.

◆ append_panel()

Panel * append_panel ( size_t  reserved)
inline

Creates a new panel with slots equal to reserved and appends it after the current panel.

◆ concatenate_to()

void concatenate_to ( PRIMITIVE *  to_ptr,
size_t  offset 
) const
inlinenoexcept

Copies and concatenates the accumulated data from multiple panels ptr_ to one contiguously allocated to_ptr.

Parameters
to_ptrOne contiguously allocated panel.
offsetDistance between to_ptr and the pointer to the destination where the accumulated data is copied.

◆ concatenate_to_from()

void concatenate_to_from ( PRIMITIVE *  to_ptr,
size_t  offset,
size_t  from 
) const
inlinenoexcept

Copies and concatenates the accumulated data from multiple panels ptr_ to one contiguously allocated to_ptr.

Parameters
to_ptrOne contiguously allocated panel.
offsetDistance between to_ptr and the pointer to the destination where the accumulated data is copied.
fromDistance between ptr and pointer to the source of the data to be copied.

◆ copy_as() [1/3]

std::enable_if<(!awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&!awkward::is_tt< std::complex, PRIMITIVE >::value)||(awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&awkward::is_tt< std::complex, PRIMITIVE >::value)>::type copy_as ( TO_PRIMITIVE *  to_ptr,
size_t  offset 
)
inline

Fills (one panel) GrowableBuffer<TO_PRIMITIVE> with the elements of (possibly multi-panels) GrowableBuffer<PRIMITIVE>.

Changes the data type from PRIMITIVE to TO_PRIMITIVE/

◆ copy_as() [2/3]

std::enable_if<!awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&awkward::is_tt< std::complex, PRIMITIVE >::value >::type copy_as ( TO_PRIMITIVE *  to_ptr,
size_t  offset 
)
inline

◆ copy_as() [3/3]

std::enable_if< awkward::is_tt< std::complex, TO_PRIMITIVE >::value &&!awkward::is_tt< std::complex, PRIMITIVE >::value >::type copy_as ( TO_PRIMITIVE *  to_ptr,
size_t  offset 
)
inline

'copy_as' specialization of a 'std::complex' template type. Fills (one panel) GrowableBuffer<std::complex> with the elements of (possibly multi-panels) GrowableBuffer<PRIMITIVE>.

Changes the data type from PRIMITIVE to std::complex/

◆ current_length()

size_t current_length ( )
inline

Currently used number of elements in the panel.

◆ fill_panel()

void fill_panel ( PRIMITIVE  datum)
inline

Inserts one datum into the panel.

◆ next()

std::unique_ptr< Panel > & next ( )
inline

Pointer to the next panel.

◆ operator[]()

PRIMITIVE & operator[] ( size_t  i)
inline

Overloads [] operator to access elements like an array.

◆ reserved()

size_t reserved ( )
inline

Currently allocated number of elements in the panel.


The documentation for this class was generated from the following file: