diff options
-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 |