2022-01-12 00:01:42 +08:00
|
|
|
#ifndef C_API_H
|
|
|
|
#define C_API_H
|
|
|
|
|
|
|
|
#include "structures.h"
|
|
|
|
|
2022-05-04 20:59:38 +08:00
|
|
|
cu_kernel *create_kernel(const void *func, dim3 gridDim, dim3 blockDim,
|
|
|
|
void **args, size_t sharedMem, cudaStream_t stream);
|
2022-01-12 00:01:42 +08:00
|
|
|
int create_KernelQueue(kernel_queue **q);
|
|
|
|
|
|
|
|
int scheduler_init(cu_device device);
|
|
|
|
void scheduler_uninit();
|
|
|
|
void cuSynchronizeBarrier();
|
|
|
|
|
|
|
|
int set_kernel_arguments(cu_kernel **k, unsigned int arg_num, void **arg_value);
|
|
|
|
|
|
|
|
int setKernelDimensions(cu_kernel *k, struct argument **arg,
|
|
|
|
void **totalBlockSize, void *blockId);
|
|
|
|
|
2022-05-04 20:59:38 +08:00
|
|
|
int init_device();
|
|
|
|
int cuLaunchKernel(cu_kernel **k);
|
|
|
|
|
2022-01-12 00:01:42 +08:00
|
|
|
#endif
|