-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkinect.cpp
More file actions
28 lines (20 loc) · 690 Bytes
/
Copy pathkinect.cpp
File metadata and controls
28 lines (20 loc) · 690 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
#include "TH.h"
#include "luaT.h"
#include <libfreenect.h>
#define torch_(NAME) TH_CONCAT_3(torch_, Real, NAME)
#define torch_string_(NAME) TH_CONCAT_STRING_3(torch., Real, NAME)
#define kinect_(NAME) TH_CONCAT_3(kinect_, Real, NAME)
static const void* torch_FloatTensor_id = NULL;
static const void* torch_DoubleTensor_id = NULL;
#include "generic/kinect.cpp"
#include "THGenerateFloatTypes.h"
extern "C" {
DLL_EXPORT int luaopen_libkinect(lua_State *L)
{
torch_FloatTensor_id = luaT_checktypename2id(L, "torch.FloatTensor");
torch_DoubleTensor_id = luaT_checktypename2id(L, "torch.DoubleTensor");
kinect_FloatInit(L);
kinect_DoubleInit(L);
return 1;
}
}