runtime instrinsics refactoring using RISC-V custom instruction assmebly directives
This commit is contained in:
@@ -8,9 +8,29 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*pfn_callback)(int task_id, void *arg);
|
||||
struct context_t {
|
||||
uint32_t num_groups[3];
|
||||
uint32_t global_offset[3];
|
||||
uint32_t local_size[3];
|
||||
char * printf_buffer;
|
||||
uint32_t *printf_buffer_position;
|
||||
uint32_t printf_buffer_capacity;
|
||||
uint32_t work_dim;
|
||||
};
|
||||
|
||||
void vx_spawn_tasks(int num_tasks, pfn_callback callback , void * args);
|
||||
typedef void (*pfn_workgroup_func) (
|
||||
const void * /* args */,
|
||||
const struct context_t * /* context */,
|
||||
uint32_t /* group_x */,
|
||||
uint32_t /* group_y */,
|
||||
uint32_t /* group_z */
|
||||
);
|
||||
|
||||
typedef void (*pfn_callback)(int task_id, const void *arg);
|
||||
|
||||
void vx_spawn_kernel(struct context_t * ctx, pfn_workgroup_func wg_func, const void * args);
|
||||
|
||||
void vx_spawn_tasks(int num_tasks, pfn_callback callback, const void * args);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user