Builds a RegularArray that describes lists that have the same length, a single integer size. Its underlying content is a flattened view of the data; that is, each list is not stored separately in memory, but is inferred as a subinterval of the underlying data.
More...
#include <LayoutBuilder.h>
|
| | Regular () |
| | Creates a new Regular layout builder.
|
| |
| BUILDER & | content () noexcept |
| | Returns the reference to the builder content.
|
| |
| BUILDER & | begin_list () noexcept |
| | Begins a list and returns the reference to the content of the builder.
|
| |
| void | end_list () noexcept |
| | Ends a list and increments the number of lists.
|
| |
| 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 |
| | Clears the builder content.
|
| |
| size_t | length () const noexcept |
| | Current number of lists of length SIZE.
|
| |
| 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 names and sizes (in bytes) of the buffers used in the builder and its contents.
|
| |
| void | to_buffers (std::map< std::string, void * > &buffers) const noexcept |
| | Copies and concatenates all the accumulated data in each of the buffers of the builder and its contents to user-defined pointers.
|
| |
| 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 noexcept |
| | Generates a unique description of the builder and its contents in the form of a JSON-like string.
|
| |
template<unsigned SIZE, typename BUILDER>
class awkward::LayoutBuilder::Regular< SIZE, BUILDER >
Builds a RegularArray that describes lists that have the same length, a single integer size. Its underlying content is a flattened view of the data; that is, each list is not stored separately in memory, but is inferred as a subinterval of the underlying data.
A multidimensional NumpyArray is equivalent to a one-dimensional NumpyArray nested within several RegularArrays, one for each dimension. However, RegularArrays can be used to make lists of any other type.
- Template Parameters
-
| SIZE | |
| BUILDER | The type of builder content. |
◆ Regular()
Creates a new Regular layout builder.
◆ begin_list()
Begins a list and returns the reference to the content of the builder.
◆ buffer_nbytes()
| void buffer_nbytes |
( |
std::map< std::string, size_t > & |
names_nbytes | ) |
const |
|
inlinenoexcept |
Retrieves the names and sizes (in bytes) of the buffers used in the builder and its contents.
◆ clear()
Clears the builder content.
◆ content()
Returns the reference to the builder content.
◆ end_list()
Ends a list and increments the number of lists.
◆ form()
| std::string form |
( |
| ) |
const |
|
inlinenoexcept |
Generates a unique description of the builder and its contents in the form of a JSON-like string.
◆ is_valid()
| bool is_valid |
( |
std::string & |
error | ) |
const |
|
inlinenoexcept |
Checks for validity and consistency.
◆ length()
Current number of lists of length SIZE.
◆ parameters()
| const std::string & parameters |
( |
| ) |
const |
|
inlinenoexcept |
Parameters for the builder form.
◆ set_id()
| void set_id |
( |
size_t & |
id | ) |
|
|
inlinenoexcept |
Assigns a unique ID to each node.
◆ set_parameters()
| void set_parameters |
( |
std::string |
parameter | ) |
|
|
inlinenoexcept |
Sets the form parameters.
◆ to_buffers()
| void to_buffers |
( |
std::map< std::string, void * > & |
buffers | ) |
const |
|
inlinenoexcept |
Copies and concatenates all the accumulated data in each of the buffers of the builder and its contents to user-defined pointers.
Used to fill the buffers map by allocating it with user-defined pointers using the same names and sizes (in bytes) obtained from buffer_nbytes.
◆ to_char_buffers()
| void to_char_buffers |
( |
std::map< std::string, uint8_t * > & |
buffers | ) |
const |
|
inlinenoexcept |
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
The documentation for this class was generated from the following file: