1#ifndef HALIDE_RUNTIME_DEVICE_INTERFACE_H
2#define HALIDE_RUNTIME_DEVICE_INTERFACE_H
31 int slice_dim,
int slice_pos,
This file declares the routines used by Halide internally in its runtime.
WEAK int halide_default_device_and_host_malloc(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
WEAK int halide_default_device_and_host_free(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
WEAK int halide_default_device_wrap_native(void *user_context, struct halide_buffer_t *buf, uint64_t handle)
WEAK int halide_default_device_detach_native(void *user_context, struct halide_buffer_t *buf)
WEAK int halide_default_device_crop(void *user_context, const struct halide_buffer_t *src, struct halide_buffer_t *dst)
WEAK int halide_default_buffer_copy(void *user_context, struct halide_buffer_t *src, const struct halide_device_interface_t *dst_device_interface, struct halide_buffer_t *dst)
WEAK int halide_default_device_release_crop(void *user_context, struct halide_buffer_t *buf)
WEAK int halide_default_device_slice(void *user_context, const struct halide_buffer_t *src, int slice_dim, int slice_pos, struct halide_buffer_t *dst)
unsigned __INT64_TYPE__ uint64_t
The raw representation of an image passed around by generated Halide code.
const struct halide_device_interface_t * device_interface
The interface used to interpret the above handle.
int(* wrap_native)(void *user_context, struct halide_buffer_t *buf, uint64_t handle)
int(* device_slice)(void *user_context, const struct halide_buffer_t *src, int slice_dim, int slice_pos, struct halide_buffer_t *dst)
int(* device_free)(void *user_context, struct halide_buffer_t *buf)
int(* device_release_crop)(void *user_context, struct halide_buffer_t *buf)
int(* device_crop)(void *user_context, const struct halide_buffer_t *src, struct halide_buffer_t *dst)
int(* detach_native)(void *user_context, struct halide_buffer_t *buf)
int(* device_and_host_malloc)(void *user_context, struct halide_buffer_t *buf)
int(* buffer_copy)(void *user_context, struct halide_buffer_t *src, const struct halide_device_interface_t *dst_device_interface, struct halide_buffer_t *dst)
int(* copy_to_host)(void *user_context, struct halide_buffer_t *buf)
int(* device_sync)(void *user_context, struct halide_buffer_t *buf)
int(* copy_to_device)(void *user_context, struct halide_buffer_t *buf)
int(* device_release)(void *user_context)
int(* device_malloc)(void *user_context, struct halide_buffer_t *buf)
int(* device_and_host_free)(void *user_context, struct halide_buffer_t *buf)
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...