Halide
|
#include "HalideRuntime.h"
Go to the source code of this file.
Macros | |
#define | HALIDE_RUNTIME_OPENGLCOMPUTE |
Functions | |
const struct halide_device_interface_t * | halide_openglcompute_device_interface () |
int | halide_openglcompute_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 Glsl runtime. More... | |
int | halide_openglcompute_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, struct halide_type_t arg_types[], void *args[], int8_t is_buffer[]) |
This function triggers execution of OpenGL program built around compute shader. More... | |
void | halide_openglcompute_finalize_kernels (void *user_context, void *state_ptr) |
void * | halide_opengl_get_proc_address (void *user_context, const char *name) |
This function retrieves pointers to OpenGL API functions. More... | |
int | halide_opengl_create_context (void *user_context) |
This function creates an OpenGL context for use by the OpenGL backend. More... | |
Routines specific to the Halide OpenGL Compute runtime.
Definition in file HalideRuntimeOpenGLCompute.h.
#define HALIDE_RUNTIME_OPENGLCOMPUTE |
Definition at line 19 of file HalideRuntimeOpenGLCompute.h.
const struct halide_device_interface_t* halide_openglcompute_device_interface | ( | ) |
int halide_openglcompute_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 Glsl runtime.
Do not call them. This function sets up OpenGL context, loads relevant GL functions, then compiles src OpenGL compute shader into OpenGL program and stores it for future use.
int halide_openglcompute_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, | ||
struct halide_type_t | arg_types[], | ||
void * | args[], | ||
int8_t | is_buffer[] | ||
) |
This function triggers execution of OpenGL program built around compute shader.
Execution of the shader is parallelized into given number of blocks and threads.
This function doesn't wait for the completion of the shader, but it sets memory barrier which forces successive retrieval of output data to wait until shader is done.
void halide_openglcompute_finalize_kernels | ( | void * | user_context, |
void * | state_ptr | ||
) |
void* halide_opengl_get_proc_address | ( | void * | user_context, |
const char * | name | ||
) |
This function retrieves pointers to OpenGL API functions.
You may have to implement this yourself. Halide only provides implementations for some platforms."
int halide_opengl_create_context | ( | void * | user_context | ) |
This function creates an OpenGL context for use by the OpenGL backend.
You may have to implement this yourself as well. Halide only provides implementations for some platforms."