diff options
author | Gregory Chanan <gchanan@fb.com> | 2017-02-22 22:54:14 +0300 |
---|---|---|
committer | Gregory Chanan <gchanan@fb.com> | 2017-02-22 22:54:14 +0300 |
commit | 7301564fd4ec169804e195c335f66f4debc17027 (patch) | |
tree | cdfcf7ee402729fccc4ed2bfc78ee36c23f4451f /THNN.lua | |
parent | 5888bcd05b2f41deaa8ff2b2933c55e00cab505d (diff) |
Remove accreal typedef because it is defined multiple times
when THCUNN is loaded.
Diffstat (limited to 'THNN.lua')
-rw-r--r-- | THNN.lua | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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 |