KMR
Public Attributes | List of all members
kmr_kvs_oncore Struct Reference

Key-Value Stream. More...

#include <kmr.h>

Public Attributes

_Bool _uniformly_sized_: 1
 
struct kmr_kvs_entryadding_point
 
long block_count
 
size_t block_size
 
long ckpt_consumed_op
 
long ckpt_generated_op
 
long ckpt_kvs_id
 
struct kmr_kvs_blockcurrent_block
 
long element_count
 
size_t element_size_limit
 
struct kmr_kvs_blockfirst_block
 
struct kmr_code_line info_line0
 
enum kmr_kv_field key_data
 
struct kmr_kvs_list link
 
enum kmr_kvs_magic magic
 
KMRmr
 
struct kmr_map_ms_statems
 
_Bool nogrow: 1
 
_Bool oncore: 1
 
_Bool shuffled_in_pushoff: 1
 
_Bool sorted: 1
 
size_t storage_netsize
 
_Bool stowed: 1
 
void * temporary_data
 
_Bool under_threaded_operation
 
enum kmr_kv_field value_data
 

Detailed Description

Key-Value Stream.

MAGIC and MR holds the relevant data. LINK is used to list all allocated key-value streams in the context to detect unfreed ones. KEY_DATA is a datatype of a key field. VALUE_DATA is a datatype of a value field. INFO_LINE0 records the location of its allocation in a program. ELEMENT_COUNT is the local count of the number of elements.

STOWED is set when adding key-value is finished. ONCORE is always true (currently ignored). NOGROW is set when the buffer is preallocated by an enough size. SORTED indicates the key-value stream is locally sorted. SHUFFLED_IN_PUSHOFF is true when its contents are already shuffled. (UNIFORMLY_SIZED is set when all key-values are of the same size. (currently ignored)). (SHUFFLE_TO_SINGLE is set when the shuffling target is a single rank, which only checked locally at each rank. (currently ignored)).

Fields start from CKPT_ are used only when checkpoint/restart is enabled. CKPT_KVS_ID stores a sequence number starts from 0 which is assigned to Key-Value Stream and used to distinguish each other. CKPT_GENERATED_OP and CKPT_CONSUMED_OP store sequence numbers of operations performed to this Key-Value Stream. When this Key-Value Stream is used as an output, the sequence number of the operation is set to CKPT_GENERATED_OP. When this Key-Value Stream is used as an input, the sequence number of the operation is set to CKPT_CONSUMED_OP.

BLOCK_SIZE is an unit of memory allocation invoked at adding a key-value pair. It is PRESET_BLOCK_SIZE in the KMR-context by default. ELEMENT_SIZE_LIMIT restricts the size of one key-value pair (for error detection), and it is set to the 1/4 of BLOCK_SIZE by default.

STORAGE_NETSIZE is the local total size used to hold key-value pairs. The size is the sum of kmr_kvs_entry_netsize() corresponding to opaque fields, and is much larger than actually occupied when the data fields are pointers. FIRST_BLOCK points to the chain of blocks of data.

MS field holds a state during master-slave mapping.

A pair of transient fields CURRENT_BLOCK and ADDING_POINT points to the current insertion point.

Definition at line 458 of file kmr.h.


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