wasm-micro-runtime/wamr-wasi-extensions/samples/nn-cli/map.h
YAMAMOTO Takashi b3ce192e1a
add nn-cli example (#4373)
an example application with flexible cli options which
aims to allow us to perform any wasi-nn operations.

eg.
```
--load-graph=file=fixture/model.xml,file=fixture/model.bin,id=graph
--init-execution-context=graph-id=graph,id=ctx
--set-input=file=fixture/tensor.bgr,context-id=ctx,dim=1,dim=3,dim=224,dim=224
--compute=context-id=ctx
--get-output=context-id=ctx,file=output.bin
```
2025-06-17 17:39:34 +08:00

20 lines
379 B
C

/*
* Copyright (C) 2025 Midokura Japan KK. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#include <stdint.h>
struct map {
struct map_entry {
const char *k;
uintmax_t v;
} * entries;
size_t nentries;
};
void
map_set(struct map *m, const char *k, uintmax_t v);
uintmax_t
map_get(struct map *m, const char *k);