application exit error handing
This commit is contained in:
@@ -57,8 +57,10 @@ inline void vx_tmc(unsigned num_threads) {
|
||||
asm volatile (".insn s 0x6b, 0, x0, 0(%0)" :: "r"(num_threads));
|
||||
}
|
||||
|
||||
typedef void (*vx_wspawn_pfn)();
|
||||
|
||||
// Spawn warps
|
||||
inline void vx_wspawn(unsigned num_warps, void* func_ptr) {
|
||||
inline void vx_wspawn(unsigned num_warps, vx_wspawn_pfn func_ptr) {
|
||||
asm volatile (".insn s 0x6b, 1, %1, 0(%0)" :: "r"(num_warps), "r"(func_ptr));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,21 +18,23 @@ struct context_t {
|
||||
uint32_t work_dim;
|
||||
};
|
||||
|
||||
typedef void (*pfn_workgroup_func) (
|
||||
const void * /* args */,
|
||||
typedef void (*vx_spawn_kernel_cb) (
|
||||
const void * /* arg */,
|
||||
const struct context_t * /* context */,
|
||||
uint32_t /* group_x */,
|
||||
uint32_t /* group_y */,
|
||||
uint32_t /* group_z */
|
||||
);
|
||||
|
||||
typedef void (*pfn_callback)(int task_id, void *arg);
|
||||
typedef void (*vx_spawn_tasks_cb)(int task_id, void *arg);
|
||||
|
||||
void vx_spawn_kernel(struct context_t * ctx, pfn_workgroup_func wg_func, void * arg);
|
||||
typedef void (*vx_serial_cb)(int task_id, void *arg);
|
||||
|
||||
void vx_spawn_tasks(int num_tasks, pfn_callback callback, void * arg);
|
||||
void vx_spawn_kernel(struct context_t * ctx, vx_spawn_kernel_cb callback, void * arg);
|
||||
|
||||
void vx_serial(pfn_callback callback, void * arg);
|
||||
void vx_spawn_tasks(int num_tasks, vx_spawn_tasks_cb callback, void * arg);
|
||||
|
||||
void vx_serial(vx_serial_cb callback, void * arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user