- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdraw.cpp
More file actions
Latest commit
27 lines (20 loc) · 700 Bytes
/
Copy pathdraw.cpp
File metadata and controls
27 lines (20 loc) · 700 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
extern"C" {
#include<TH.h>
#include<luaT.h>
}
#include"genericpp/draw.cpp"
#definetorch_(NAME) TH_CONCAT_3(torch_, Real, NAME)
#definetorch_string_(NAME) TH_CONCAT_STRING_3(torch., Real, NAME)
#definelibdraw_(NAME) TH_CONCAT_3(libdraw_, Real, NAME)
staticconstvoid* torch_FloatTensor_id = NULL;
staticconstvoid* torch_DoubleTensor_id = NULL;
#include"generic/draw.cpp"
#include"THGenerateFloatTypes.h"
LUA_EXTERNCDLL_EXPORTintluaopen_libdraw(lua_State *L)
{
torch_FloatTensor_id = luaT_checktypename2id(L, "torch.FloatTensor");
torch_DoubleTensor_id = luaT_checktypename2id(L, "torch.DoubleTensor");
libdraw_FloatMain_init(L);
libdraw_DoubleMain_init(L);
return1;
}