#include <GrowableBuffer.h>
Public Member Functions | |
Panel (size_t reserved) | |
Creates a Panel by allocating a new panel, taking a reserved number of slots. | |
Panel (std::unique_ptr< PRIMITIVE[]> ptr, size_t length, size_t reserved) | |
Creates a Panel from a full set of parameters. | |
~Panel () | |
Deletes a Panel. | |
PRIMITIVE & | operator[] (size_t i) |
Overloads [] operator to access elements like an array. | |
Panel * | append_panel (size_t reserved) |
Creates a new panel with slots equal to reserved and appends it after the current panel. | |
void | fill_panel (PRIMITIVE datum) |
Inserts one datum into the panel. | |
std::unique_ptr< Panel > & | next () |
Pointer to the next panel. | |
size_t | current_length () |
Currently used number of elements in the panel. | |
size_t | reserved () |
Currently allocated number of elements in the panel. | |
std::unique_ptr< PRIMITIVE[]> & | data () |
Unique pointer to the panel data. | |
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 . | |
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 . | |
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 . | |
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>. | |
Public Attributes | |
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)>::typ | copy_as )(TO_PRIMITIVE *to_ptr, size_t offset) |
Fills (one panel) GrowableBuffer<TO_PRIMITIVE> with the elements of (possibly multi-panels) GrowableBuffer<PRIMITIVE>. | |
Creates a contiguous, one-dimensional panel.
|
inline |
|
inline |
Creates a Panel from a full set of parameters.
ptr | Unique reference to the panel data. |
length | Currently number used of elements in the panel. |
reserved | Currently allocated number of elements in the panel. |
|
inline |
Deletes a Panel.
Unchain the pointers to avoid a stack overflow when a recursive implicit destructor is invoked.
|
inlinenoexcept |
Copies the data from a panel to one contiguously allocated to_ptr
.
to_ptr | One contiguously allocated panel. |
offset | Distance between to_ptr and the pointer to the destination where the accumulated data is copied. |
from | Distance between ptr and pointer to the source of the data to be copied. |
length | Length of the data to be copied. |
|
inline |
Creates a new panel with slots equal to reserved and appends it after the current panel.
|
inlinenoexcept |
Copies and concatenates the accumulated data from multiple panels ptr_
to one contiguously allocated to_ptr
.
to_ptr | One contiguously allocated panel. |
offset | Distance between to_ptr and the pointer to the destination where the accumulated data is copied. |
|
inlinenoexcept |
Copies and concatenates the accumulated data from multiple panels ptr_
to one contiguously allocated to_ptr
.
to_ptr | One contiguously allocated panel. |
offset | Distance between to_ptr and the pointer to the destination where the accumulated data is copied. |
from | Distance between ptr and pointer to the source of the data to be copied. |
|
inline |
|
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
/
|
inline |
Currently used number of elements in the panel.
|
inline |
Unique pointer to the panel data.
|
inline |
Inserts one datum
into the panel.
|
inline |
Pointer to the next panel.
|
inline |
Overloads [] operator to access elements like an array.
|
inline |
Currently allocated number of elements in the panel.
|
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
/