Coverage Report

Created: 2022-08-03 23:52

/home/liu/buildslave/linux-x64-runtests/build/lib/nnc/ccv_nnc_dynamic_graph_alloc.c
Line
Count
Source (jump to first uncovered line)
1
#include "ccv_nnc.h"
2
#include "ccv_nnc_easy.h"
3
#include "ccv_nnc_internal.h"
4
#include "ccv_nnc_easy.h"
5
#include "ccv_internal.h"
6
#include "_ccv_nnc_dynamic_graph.h"
7
8
void ccv_nnc_dynamic_graph_gc(ccv_nnc_dynamic_graph_t* const graph)
9
0
{
10
0
  ccv_nnc_xpu_gc(&graph->xpu_alloc);
11
0
}
12
13
ccv_nnc_compilation_artifact_t* ccv_nnc_compilation_artifact_new(ccv_nnc_graph_t* const graph, ccv_nnc_tensor_arena_t* const tensor_arena, ccv_nnc_graph_exec_arena_t* const exec_arena)
14
204
{
15
204
  ccv_nnc_compilation_artifact_t* const artifact = (ccv_nnc_compilation_artifact_t*)ccmalloc(sizeof(ccv_nnc_compilation_artifact_t));
16
204
  artifact->graph = graph;
17
204
  artifact->tensor_arena = tensor_arena;
18
204
  artifact->exec_arena = exec_arena;
19
204
  return artifact;
20
204
}
21
22
void ccv_nnc_compilation_artifact_free(ccv_nnc_compilation_artifact_t* const artifact)
23
204
{
24
204
  ccv_nnc_graph_free(artifact->graph);
25
204
  ccv_nnc_tensor_arena_free(artifact->tensor_arena);
26
204
  ccv_nnc_graph_exec_arena_free(artifact->exec_arena);
27
204
  ccfree(artifact);
28
204
}