13#ifndef CIRCT_DIALECT_ARC_RUNTIME_ARCRUNTIME_H
14#define CIRCT_DIALECT_ARC_RUNTIME_ARCRUNTIME_H
21#ifndef ARC_RUNTIME_EXPORT
22#ifdef ARC_RUNTIME_ENABLE_EXPORT
25#define ARC_RUNTIME_EXPORT extern "C" __declspec(dllexport)
27#define ARC_RUNTIME_EXPORT extern "C" __attribute__((visibility("default")))
33#define ARC_RUNTIME_EXPORT extern "C" __declspec(dllimport)
35#define ARC_RUNTIME_EXPORT extern "C"
46static_assert(
sizeof(
void *) == 8,
"Unsupported architecture");
47static_assert(
sizeof(
struct ArcState) == 16,
"Unexpected ArcState size");
49 "Unexpected ArcRuntimeModelInfo size");
ARC_RUNTIME_EXPORT uint64_t arcRuntimeGetAPIVersion()
Return the API version of the runtime library.
ARC_RUNTIME_EXPORT struct ArcState * arcRuntimeGetStateFromModelState(uint8_t *modelState, uint64_t offset)
Project a pointer to the model state to its ArcState container.
ARC_RUNTIME_EXPORT void arcRuntimeDeleteInstance(struct ArcState *instance)
Destroy and deallocate the state of a model instance.
#define ARC_RUNTIME_EXPORT
ARC_RUNTIME_EXPORT struct ArcState * arcRuntimeAllocateInstance(const struct ArcRuntimeModelInfo *model, const char *args)
Allocate and initialize the state for a new instance of the given hardware model.
ARC_RUNTIME_EXPORT void arcRuntimeOnEval(struct ArcState *instance)
Pre-Eval hook. Must be called by the driver once before every eval step.
Static information for a compiled hardware model, generated by the MLIR lowering.
Combined runtime and model state for a hardware model instance.