C Configuration Space and Tuning Library (CCS)
Loading...
Searching...
No Matches
Data Fields
ccs_dynamic_tree_space_vector_s Struct Reference

A structure that define the callbacks the user must provide to create a dynamic tree space. More...

#include <tree_space.h>

Data Fields

ccs_result_t(* del )(ccs_tree_space_t tree_space)
 The deletion callback that will be called once the reference count of the tree space reaches 0.
 
ccs_result_t(* get_child )(ccs_tree_space_t tree_space, ccs_tree_t parent, size_t child_index, ccs_tree_t *child_ret)
 The callback that will be called when querying a missing children in a dynamic tree space.
 
ccs_result_t(* serialize_user_state )(ccs_tree_space_t tree_space, size_t state_size, void *state, size_t *state_size_ret)
 The tree space serialization interface, can be NULL.
 
ccs_result_t(* deserialize_state )(ccs_tree_t tree, ccs_feature_space_t feature_space, size_t state_size, const void *state, void **tree_space_data_ret)
 The tree space deserialization interface, can be NULL.
 

Detailed Description

A structure that define the callbacks the user must provide to create a dynamic tree space.

Field Documentation

◆ deserialize_state

ccs_result_t(* ccs_dynamic_tree_space_vector_s::deserialize_state) (ccs_tree_t tree, ccs_feature_space_t feature_space, size_t state_size, const void *state, void **tree_space_data_ret)

The tree space deserialization interface, can be NULL.

In this case, only the tree is deserialized. Must return the tree space data to use at initialization

◆ get_child

ccs_result_t(* ccs_dynamic_tree_space_vector_s::get_child) (ccs_tree_space_t tree_space, ccs_tree_t parent, size_t child_index, ccs_tree_t *child_ret)

The callback that will be called when querying a missing children in a dynamic tree space.

Parameters
[in]tree_spacethe dynamic tree space
[in]parentthe parent of the node being queried
[in]child_indexthe index of the child. This value is guaranteed to be less than the arity of the parent node.
[out]child_reta pointer to the variable that will contain the returned child node
Returns
CCS_RESULT_SUCCESS on success or an error code describing the error encountered

◆ serialize_user_state

ccs_result_t(* ccs_dynamic_tree_space_vector_s::serialize_user_state) (ccs_tree_space_t tree_space, size_t state_size, void *state, size_t *state_size_ret)

The tree space serialization interface, can be NULL.

The tree is always serialized irrespective of the definition of this callback.


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