Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Chanan <gchanan@fb.com>2017-02-22 22:54:14 +0300
committerGregory Chanan <gchanan@fb.com>2017-02-22 22:54:14 +0300
commit7301564fd4ec169804e195c335f66f4debc17027 (patch)
treecdfcf7ee402729fccc4ed2bfc78ee36c23f4451f /THNN.lua
parent5888bcd05b2f41deaa8ff2b2933c55e00cab505d (diff)
Remove accreal typedef because it is defined multiple times
when THCUNN is loaded.
Diffstat (limited to 'THNN.lua')
-rw-r--r--THNN.lua11
1 files changed, 2 insertions, 9 deletions
diff --git a/THNN.lua b/THNN.lua
index 60430f0..0848e9e 100644
--- a/THNN.lua
+++ b/THNN.lua
@@ -55,7 +55,7 @@ local replacements =
{
{
['TYPE'] = 'Double',
- ['real'] = 'double',
+ ['accreal'] = 'double',
['THTensor'] = 'THDoubleTensor',
['THIndexTensor'] = 'THLongTensor',
['THIntegerTensor'] = 'THIntTensor',
@@ -64,7 +64,7 @@ local replacements =
},
{
['TYPE'] = 'Float',
- ['real'] = 'float',
+ ['accreal'] = 'double',
['THTensor'] = 'THFloatTensor',
['THIndexTensor'] = 'THLongTensor',
['THIntegerTensor'] = 'THIntTensor',
@@ -73,13 +73,6 @@ local replacements =
}
}
--- gsub(s, 'real', 'float') changes accreal to accfloat.
--- typedef accfloat ahead of time.
-ffi.cdef("typedef double accfloat;")
--- gsub(s, 'real', 'double') changes accreal to accfloat.
--- typedef accdouble ahead of time
-ffi.cdef("typedef double accdouble;")
-
for i=1,#replacements do
local r = replacements[i]
local s = preprocessed