mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
36 lines
975 B
C
36 lines
975 B
C
// Part of the Concrete Compiler Project, under the BSD3 License with Zama
|
|
// Exceptions. See
|
|
// https://github.com/zama-ai/concrete-compiler-internal/blob/main/LICENSE.txt
|
|
// for license information.
|
|
|
|
/// Define the API exposed to the compiler for code generation.
|
|
|
|
#ifndef CONCRETELANG_DFR_RUNTIME_API_H
|
|
#define CONCRETELANG_DFR_RUNTIME_API_H
|
|
#include <cstddef>
|
|
#include <cstdlib>
|
|
|
|
extern "C" {
|
|
|
|
typedef void (*wfnptr)(...);
|
|
|
|
void *_dfr_make_ready_future(void *, size_t);
|
|
void _dfr_create_async_task(wfnptr, size_t, size_t, ...);
|
|
void _dfr_register_work_function(wfnptr);
|
|
void *_dfr_await_future(void *);
|
|
|
|
/* Memory management:
|
|
_dfr_make_ready_future allocates the future, not the underlying storage.
|
|
_dfr_create_async_task allocates both future and storage for outputs. */
|
|
void _dfr_deallocate_future(void *);
|
|
void _dfr_deallocate_future_data(void *);
|
|
|
|
/* Initialisation & termination. */
|
|
void _dfr_start();
|
|
void _dfr_stop();
|
|
|
|
void _dfr_terminate();
|
|
}
|
|
|
|
#endif
|