1 #ifndef HALIDE_HALIDERUNTIME_H 2 #define HALIDE_HALIDERUNTIME_H 15 #define HALIDE_ALWAYS_INLINE __forceinline 16 #define HALIDE_NEVER_INLINE __declspec(noinline) 18 #define HALIDE_ALWAYS_INLINE __attribute__((always_inline)) inline 19 #define HALIDE_NEVER_INLINE __attribute__((noinline)) 69 #ifndef HALIDE_ATTRIBUTE_ALIGN 71 #define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x)) 73 #define HALIDE_ATTRIBUTE_ALIGN(x) __attribute__((aligned(x))) 84 #if __cplusplus >= 201103L 102 : code(code), bits(bits), lanes(lanes) {
111 return (code == other.code &&
112 bits == other.bits &&
113 lanes == other.lanes);
117 return !(*
this == other);
127 struct halide_device_interface_impl_t;
164 const struct halide_device_interface_impl_t *
impl;
179 return (
min == other.
min) &&
186 return !(*
this == other);
236 template<
typename T>
struct check_is_pointer;
237 template<
typename T>
struct check_is_pointer<T *> {};
245 check_is_pointer<T> check;
307 #endif // HALIDE_HALIDERUNTIME_H Definition: HalideRuntime.h:167
Definition: HalideRuntime.h:195
int(* device_and_host_malloc)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
Definition: HalideRuntime.h:153
struct halide_dimension_t halide_dimension_t
int(* detach_native)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:163
int(* wrap_native)(void *user_context, struct halide_buffer_t *buf, uint64_t handle, const struct halide_device_interface_t *device_interface)
Definition: HalideRuntime.h:161
struct halide_type_t type
Definition: HalideRuntime.h:219
int(* device_and_host_free)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:155
floating point numbers
Definition: HalideRuntime.h:63
int(* device_malloc)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
Definition: HalideRuntime.h:144
void(* device_release)(void *user_context, const struct halide_device_interface_t *device_interface)
Definition: HalideRuntime.h:148
int32_t extent
Definition: HalideRuntime.h:168
uint64_t flags
Definition: HalideRuntime.h:216
uint32_t flags
Definition: HalideRuntime.h:171
halide_dimension_t * dim
Definition: HalideRuntime.h:226
Definition: HalideRuntime.h:196
unsigned integers
Definition: HalideRuntime.h:62
int(* device_sync)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:147
int(* copy_to_device)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
Definition: HalideRuntime.h:151
int(* device_release_crop)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:160
struct halide_buffer_t halide_buffer_t
Definition: HalideRuntime.h:143
opaque pointer type (void *)
Definition: HalideRuntime.h:64
int32_t dimensions
Definition: HalideRuntime.h:222
int32_t stride
Definition: HalideRuntime.h:168
#define HALIDE_ALWAYS_INLINE
Definition: HalideRuntime.h:18
Definition: HalideRuntime.h:82
const struct halide_device_interface_t * device_interface
Definition: HalideRuntime.h:208
uint8_t * host
Definition: HalideRuntime.h:213
const struct halide_device_interface_impl_t * impl
Definition: HalideRuntime.h:164
int32_t min
Definition: HalideRuntime.h:168
void * padding
Definition: HalideRuntime.h:229
halide_type_code_t
Definition: HalideRuntime.h:59
int(* copy_to_host)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:150
uint64_t device
Definition: HalideRuntime.h:205
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)
Definition: HalideRuntime.h:156
Definition: HalideRuntime.h:203
HALIDE_ATTRIBUTE_ALIGN(1) uint8_t code
halide_buffer_flags
Definition: HalideRuntime.h:195
int(* device_crop)(void *user_context, const struct halide_buffer_t *src, struct halide_buffer_t *dst)
Definition: HalideRuntime.h:158
signed integers
Definition: HalideRuntime.h:61
int(* device_free)(void *user_context, struct halide_buffer_t *buf)
Definition: HalideRuntime.h:146