![]() |
DPU Host API
2025.1.0
|
C API to create and manage DPU checkpoints. More...
Go to the source code of this file.
Macros | |
| #define | DPU_CHECKPOINT_ALL |
| Option for a DPU checkpoint to save the whole DPU state. | |
Typedefs | |
| typedef enum _dpu_checkpoint_flags_t | dpu_checkpoint_flags_t |
| Options for a DPU checkpoint. | |
Enumerations | |
| enum | _dpu_checkpoint_flags_t { DPU_CHECKPOINT_NONE = 0x0, DPU_CHECKPOINT_INTERNAL = 0x1, DPU_CHECKPOINT_IRAM = 0x2, DPU_CHECKPOINT_MRAM = 0x8, DPU_CHECKPOINT_WRAM = 0x10 } |
| Options for a DPU checkpoint. More... | |
Functions | |
| dpu_error_t | dpu_checkpoint_save (struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context) |
| Extracts the DPU state. More... | |
| dpu_error_t | dpu_checkpoint_restore (struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context) |
| Restores a DPU state. More... | |
| uint32_t | dpu_checkpoint_get_serialized_context_size (struct dpu_context_t *context) |
| Computes the size of the context once serialized. More... | |
| dpu_error_t | dpu_checkpoint_serialize (struct dpu_context_t *context, uint8_t **serialized_context, uint32_t *serialized_context_size) |
| Serializes a DPU state. More... | |
| dpu_error_t | dpu_checkpoint_deserialize (const uint8_t *serialized_context, uint32_t serialized_context_size, struct dpu_context_t *context) |
| Deserializes a DPU state. More... | |
| dpu_error_t | dpu_checkpoint_free (struct dpu_context_t *context) |
| Free a DPU context allocated by dpu_checkpoint. More... | |
C API to create and manage DPU checkpoints.
| dpu_error_t dpu_checkpoint_deserialize | ( | const uint8_t * | serialized_context, |
| uint32_t | serialized_context_size, | ||
| struct dpu_context_t * | context | ||
| ) |
Deserializes a DPU state.
| serialized_context | the serialized DPU state |
| serialized_context_size | the number of bytes of the serialized DPU state |
| context | storage for the DPU state |
| dpu_error_t dpu_checkpoint_free | ( | struct dpu_context_t * | context | ) |
Free a DPU context allocated by dpu_checkpoint.
| context | the DPU context to free |
| uint32_t dpu_checkpoint_get_serialized_context_size | ( | struct dpu_context_t * | context | ) |
Computes the size of the context once serialized.
| context | the DPU state to serialize |
| dpu_error_t dpu_checkpoint_restore | ( | struct dpu_set_t | set, |
| dpu_checkpoint_flags_t | flags, | ||
| struct dpu_context_t * | context | ||
| ) |
Restores a DPU state.
| set | the identifier of the DPU set (must be a single DPU) |
| flags | options on what to restore from the DPU state |
| context | the DPU state to restore |
| dpu_error_t dpu_checkpoint_save | ( | struct dpu_set_t | set, |
| dpu_checkpoint_flags_t | flags, | ||
| struct dpu_context_t * | context | ||
| ) |
Extracts the DPU state.
| set | the identifier of the DPU set (must be a single DPU) |
| flags | options on what to extract from the DPU state |
| context | storage for the DPU state |
| dpu_error_t dpu_checkpoint_serialize | ( | struct dpu_context_t * | context, |
| uint8_t ** | serialized_context, | ||
| uint32_t * | serialized_context_size | ||
| ) |
Serializes a DPU state.
| context | the DPU state to serialize |
| serialized_context | storage for the DPU state content |
| serialized_context_size | storage for the number of bytes of the DPU state content |