mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 22:07:41 -04:00
38 lines
No EOL
874 B
C
38 lines
No EOL
874 B
C
#ifndef VX_API_H
|
|
#define VX_API_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void (*func_t)(void *);
|
|
|
|
void vx_spawn_warps(int num_warps, int num_threads, func_t func_ptr , void * args);
|
|
|
|
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;
|
|
};
|
|
|
|
/* The default work-group function prototype as generated by Workgroup.cc. */
|
|
typedef void (*vx_pocl_workgroup_func) (const void * /* args */,
|
|
const struct context_t * /* context */,
|
|
uint32_t /* group_x */,
|
|
uint32_t /* group_y */,
|
|
uint32_t /* group_z */);
|
|
|
|
void pocl_spawn(struct context_t * ctx, vx_pocl_workgroup_func pfn, const void * args);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |