#ifndef HALIDE_DEVICE_INTERFACE_H
#define HALIDE_DEVICE_INTERFACE_H
extern "C" {
struct halide_device_interface_t {
void (*use_module)();
void (*release_module)();
int (*device_malloc)(void *user_context, struct halide_buffer_t *buf);
int (*device_free)(void *user_context, struct halide_buffer_t *buf);
int (*device_sync)(void *user_context, struct halide_buffer_t *buf);
int (*device_release)(void *user_context);
int (*copy_to_host)(void *user_context, struct halide_buffer_t *buf);
int (*copy_to_device)(void *user_context, struct halide_buffer_t *buf);
int (*device_and_host_malloc)(void *user_context, struct halide_buffer_t *buf);
int (*device_and_host_free)(void *user_context, struct halide_buffer_t *buf);
};
extern WEAK int halide_default_device_and_host_malloc(void *user_context, struct halide_buffer_t *buf,
const struct halide_device_interface_t *device_interface);
extern WEAK int halide_default_device_and_host_free(void *user_context, struct halide_buffer_t *buf,
const struct halide_device_interface_t *device_interface);
}
#endif