#pragma once
#include <stddef.h>
#include <stdint.h>
#include "xnnpack.h"
#include "xnnpack/allocator.h"
#include "xnnpack/common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct xnn_usage_record { … };
struct xnn_value_allocation_tracker { … };
XNN_INTERNAL void xnn_init_value_allocation_tracker(struct xnn_value_allocation_tracker* tracker,
const struct xnn_runtime* runtime);
inline static void xnn_release_value_allocation_tracker(struct xnn_value_allocation_tracker* tracker) { … }
XNN_INTERNAL void xnn_add_value_allocation_tracker(struct xnn_value_allocation_tracker* tracker,
uint32_t value_id, size_t tensor_size);
XNN_INTERNAL void xnn_add_operator_workspace_allocation_tracker(
struct xnn_value_allocation_tracker* tracker,
uint32_t operator_workspace_value_id,
size_t tensor_size,
uint32_t opdata_id);
XNN_INTERNAL void xnn_mark_tensor_as_reuse(
struct xnn_value_allocation_tracker* tracker,
uint32_t value_id,
uint32_t reuse_value_id,
uint32_t new_last_node);
XNN_INTERNAL void xnn_plan_value_allocation_tracker(struct xnn_value_allocation_tracker* tracker);
#ifdef __cplusplus
}
#endif