-
Notifications
You must be signed in to change notification settings - Fork 50
/
init.c
77 lines (60 loc) · 2.01 KB
/
init.c
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "TH.h"
#include "luaT.h"
#ifdef _OPENMP
#include "omp.h"
#endif
#define torch_(NAME) TH_CONCAT_3(torch_, Real, NAME)
#define torch_Tensor TH_CONCAT_STRING_3(torch., Real, Tensor)
#define nn_(NAME) TH_CONCAT_3(nn_, Real, NAME)
#include "generic/SpatialReSamplingEx.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialLinear.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialUpSampling.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialDownSampling.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialReSampling.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialMaxSampling.c"
#include "THGenerateFloatTypes.h"
#include "generic/DistMarginCriterion.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialGraph.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialMatching.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialRadialMatching.c"
#include "THGenerateFloatTypes.h"
#include "generic/DataSetLabelMe.c"
#include "THGenerateFloatTypes.h"
#include "generic/SoftMaxTree.c"
#include "THGenerateFloatTypes.h"
DLL_EXPORT int luaopen_libnnx(lua_State *L)
{
nn_FloatSpatialLinear_init(L);
nn_FloatSpatialReSamplingEx_init(L);
nn_FloatSpatialUpSampling_init(L);
nn_FloatSpatialDownSampling_init(L);
nn_FloatSpatialReSampling_init(L);
nn_FloatSpatialMaxSampling_init(L);
nn_FloatDistMarginCriterion_init(L);
nn_FloatSpatialGraph_init(L);
nn_FloatSpatialMatching_init(L);
nn_FloatSpatialRadialMatching_init(L);
nn_FloatDataSetLabelMe_init(L);
nn_FloatSoftMaxTree_init(L);
nn_DoubleSpatialLinear_init(L);
nn_DoubleSpatialReSamplingEx_init(L);
nn_DoubleSpatialUpSampling_init(L);
nn_DoubleSpatialDownSampling_init(L);
nn_DoubleSpatialReSampling_init(L);
nn_DoubleSpatialMaxSampling_init(L);
nn_DoubleDistMarginCriterion_init(L);
nn_DoubleSpatialGraph_init(L);
nn_DoubleSpatialMatching_init(L);
nn_DoubleSpatialRadialMatching_init(L);
nn_DoubleDataSetLabelMe_init(L);
nn_DoubleSoftMaxTree_init(L);
return 1;
}