Halide 22.0.0 Halide compiler and libraries

HalideRuntimeWebGPU.h
Go to the documentation of this file.
1#ifndef HALIDE_HALIDERUNTIMEWEBGPU_H
2#define HALIDE_HALIDERUNTIMEWEBGPU_H
3
4// Don't include HalideRuntime.h if the contents of it were already pasted into a generated header above this one
5#ifndef HALIDE_HALIDERUNTIME_H
6
7#include "HalideRuntime.h"
8
9#endif
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/** \file
16 * Routines specific to the Halide WebGPU runtime.
17 */
18
19#define HALIDE_RUNTIME_WEBGPU
20
21 extern const struct halide_device_interface_t *halide_webgpu_device_interface();
22
23/** These are forward declared here to allow clients to override the
24 * Halide WebGPU runtime. Do not call them. */
25// @{
26 extern int halide_webgpu_initialize_kernels(void *user_context, void **state_ptr,
27 const char *src, int size);
28 extern int halide_webgpu_run(void *user_context,
29 void *state_ptr,
30 const char *entry_name,
31 int blocksX, int blocksY, int blocksZ,
32 int threadsX, int threadsY, int threadsZ,
33 int shared_mem_bytes,
34 halide_type_t arg_types[],
35 void *args[],
36 int8_t arg_is_buffer[]);
37 extern void halide_webgpu_finalize_kernels(void *user_context, void *state_ptr);
38// @}
39
40#ifdef __cplusplus
41} // End extern "C"
42#endif
43
44#endif // HALIDE_HALIDERUNTIMEWEBGPU_H
HalideRuntime.h
This file declares the routines used by Halide internally in its runtime.
halide_webgpu_finalize_kernels
void halide_webgpu_finalize_kernels(void *user_context, void *state_ptr)
halide_webgpu_device_interface
const struct halide_device_interface_t * halide_webgpu_device_interface()
halide_webgpu_run
int halide_webgpu_run(void *user_context, void *state_ptr, const char *entry_name, int blocksX, int blocksY, int blocksZ, int threadsX, int threadsY, int threadsZ, int shared_mem_bytes, halide_type_t arg_types[], void *args[], int8_t arg_is_buffer[])
halide_webgpu_initialize_kernels
int halide_webgpu_initialize_kernels(void *user_context, void **state_ptr, const char *src, int size)
These are forward declared here to allow clients to override the Halide WebGPU runtime.
int8_t
signed __INT8_TYPE__ int8_t
Definition: runtime_internal.h:28
halide_device_interface_t
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...
Definition: HalideRuntime.h:797
halide_type_t
A runtime tag for a type in the halide type system.
Definition: HalideRuntime.h:503
user_context
void * user_context
Definition: vulkan_resources.h:178