Builds a NumpyArray which describes multi-dimensional data of PRIMITIVE
type.
More...
#include <LayoutBuilder.h>
Public Member Functions | |
Numpy () | |
Creates a new Numpy layout builder by allocating a new buffer, using default_options for initializing the buffer. | |
Numpy (const awkward::BuilderOptions &options) | |
Creates a new Numpy layout builder by allocating a new buffer, taking options from BuilderOptions for initializing the buffer. | |
void | append (PRIMITIVE x) noexcept |
Inserts a PRIMITIVE type data. | |
void | extend (PRIMITIVE *ptr, size_t size) noexcept |
Inserts an entire array of PRIMITIVE type data. | |
const std::string & | parameters () const noexcept |
Parameters for the builder form. | |
void | set_parameters (std::string parameter) noexcept |
Sets the form parameters. | |
void | set_id (size_t &id) noexcept |
Assigns a unique ID to each node. | |
void | clear () noexcept |
Discards the accumulated data in the builder. | |
size_t | length () const noexcept |
Current length of the data. | |
bool | is_valid (std::string &error) const noexcept |
Checks for validity and consistency. | |
void | buffer_nbytes (std::map< std::string, size_t > &names_nbytes) const noexcept |
Retrieves the name and size (in bytes) of the buffer. | |
void | to_buffers (std::map< std::string, void * > &buffers) const noexcept |
Copies and concatenates all the accumulated data in the builder to a user-defined pointer. | |
void | to_char_buffers (std::map< std::string, uint8_t * > &buffers) const noexcept |
Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers. | |
std::string | form () const |
Generates a unique description of the builder and its contents in the form of a JSON-like string. | |
Builds a NumpyArray which describes multi-dimensional data of PRIMITIVE
type.
PRIMITIVE | The type of data in NumpyArray. |
Creates a new Numpy layout builder by allocating a new buffer, using default_options
for initializing the buffer.
|
inline |
Creates a new Numpy layout builder by allocating a new buffer, taking options
from BuilderOptions
for initializing the buffer.
options | Initial size configuration of a buffer. |
Inserts a PRIMITIVE
type data.
Retrieves the name and size (in bytes) of the buffer.
Discards the accumulated data in the builder.
Inserts an entire array of PRIMITIVE
type data.
Just an interface; not actually faster than calling append many times.
Generates a unique description of the builder and its contents in the form of a JSON-like string.
Checks for validity and consistency.
Parameters for the builder form.
Assigns a unique ID to each node.
Sets the form parameters.
Copies and concatenates all the accumulated data in the builder to a user-defined pointer.
Used to fill the buffers map by allocating it with user-defined pointers using the same name and size (in bytes) obtained from buffer_nbytes.
Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers.
The map keys and the buffer sizes are obtained from buffer_nbytes