-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathInterface.cpp
More file actions
52 lines (41 loc) · 807 Bytes
/
Interface.cpp
File metadata and controls
52 lines (41 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <arrayfire.h>
#ifdef WANT_CUDA
#include <../cuda.h>
#endif
#ifdef WANT_OPENCL
#include <../opencl.h>
#endif
// ^^^ TODO: probably not right!
#include "../funcs.h"
static const struct luaL_Reg interface_funcs[] = {
#if AF_API_VERSION >= 32
#if WANT_OPENCL
{
// af_err afcl_get_context (cl_context * ctx, const bool retain);
}, {
// af_err afcl_get_device_id (cl_device_id * id);
},
#endif
#if WANT_CUDA
{
// af_err afcu_get_native_id (int * nativeid, int id);
},
#endif
#if WANT_OPENCL
{
// af_err afcl_get_queue (cl_command_queue * queue, const bool retain);
},
#endif
#if WANT_CUDA
{
// af_err afcu_get_stream (cudaStream_t * stream, int id);
},
#endif
#endif
{ NULL, NULL }
};
int Interface (lua_State * L)
{
luaL_register(L, NULL, interface_funcs);
return 0;
}