Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
i-evi committed Oct 18, 2020
1 parent 385ba75 commit 20e2ed4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/cc_tsrmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ cc_tensor_t *cc_tsrmgr_get(const char *name)

#define BUFLEN 128
#define BUFLIM 100
static void _print_tensor_property(cc_tensor_t *tensor)
static void _print_property(cc_tensor_t *tensor)
{
char buf[BUFLEN];
char *bptr = buf;
Expand All @@ -190,14 +190,11 @@ static void _print_tensor_property(cc_tensor_t *tensor)
cc_dtype_to_string(*tensor->dtype), buf);
}

#define FMTLEN 32
static void _print_pair(struct pair *pair)
{
char fmt[FMTLEN];
sprintf(fmt, "<0x%%0%dlx>: \"%%s\", ", (int)(sizeof(void*) << 1));
fprintf((FILE*)utlog_get_ostream(), fmt, pair->dat,
((cc_tensor_t*)pair->dat)->name);
_print_tensor_property((cc_tensor_t*)pair->dat);
fprintf((FILE*)utlog_get_ostream(), "<%p>: \"%s\", ",
pair->dat, ((cc_tensor_t*)pair->dat)->name);
_print_property((cc_tensor_t*)pair->dat);
}

static void _cc_tsrmgr_list(struct rbt_node *n)
Expand Down

0 comments on commit 20e2ed4

Please sign in to comment.