|
char * | item_name (int idx) |
|
int | index (pChar name) |
|
void | dimensions (Dimensions &dims) |
|
int | new_kind (int num_items, int num_bytes, AttributeMap *att=nullptr) |
|
bool | add_item (int idx, char const *p_name, int *p_dim, int cell_type, AttributeMap *p_dims) |
|
int | audit () |
| Audit a Kind.
|
|
void | set_dimensions (int *p_dim) |
|
void | get_dimensions (int *p_dim) |
|
bool | validate_index (int *p_idx) |
|
int | validate_offset (int offset) |
|
int | get_offset (int *p_idx) |
|
void | get_index (int offset, int *p_idx) |
|
char * | get_string (int *p_idx) |
|
char * | get_string (int offset) |
|
void | set_string (int *p_idx, const char *p_str) |
|
void | set_string (int offset, const char *p_str) |
|
char * | get_attribute (int attribute_id) |
|
void | set_attributes (AttributeMap *all_att) |
|
void | get_attributes (AttributeMap *all_att) |
|
void | init_string_buffer () |
|
bool | find_NAs_in_tensor () |
|
int * | align64bit (uintptr_t ipt) |
| Align a pointer (as uintptr_t) to the next 8 byte boundary assuming the block is aligned.
|
|
int * | p_attribute_keys () |
|
pStringBuffer | p_string_buffer () |
|
int | get_string_offset (pStringBuffer psb, const char *p_str) |
|
bool | is_a_filter () |
| Check (in depth) the validity of a filter.
|
|
bool | can_filter (pBlock p_block) |
|
void | close_block (int set_has_NA=SET_HAS_NA_FALSE, bool set_hash=true, bool set_time=true) |
|
bool | check_hash () |
|
Kind: A type definition for Jazz Blocks and Tuples.
Kind objects contain the metadata only. A Tuple is a data object of a Kind. Kinds define more complex types than (raw) Blocks, even if they are blocks. E.g., A Block can store a video of a fixed shape (image only or soundtrack only). A Kind can store both and have dimensions** defining things like: image_width, image_height, number_of_frames and, possibly, a subtitle track as another vector of strings.
It is a block with special attributes to store an array of Tensor. A Kind is a single Block! A kind has dimensions which are integer variables that are used to define variable shapes.
Technically, a Kind is a Block of type CELL_TYPE_KIND_ITEM. Each item contains the Tensor metadata.
Since kinds keep only metadata, the space, unlike in Tuples, is uninterrupted as in a normal block: (header, vector of CELL_TYPE_KIND_ITEM, attribute keys, StringBuffer).
The StringBuffer contains the item names and dimension names.
Creating Kinds
More advanced Kind functionalities (including creating kinds) can be done by Containers. This object, has a minimum of functionality to build by parts: new_kind(), add_item() to do the basic building. It also has function to check the content and validate a Kind.
Also, kinds should define, these attributes, but that is left to the Container:
- BLOCK_ATTRIB_BLOCKTYPE as the const "Kind"
- BLOCK_ATTRIB_SOURCE as the location where the definition of the Kind can be found. Kind names are global.