Skip to content

Commit 331219c

Browse files
Martin Raisonsoumith
authored andcommitted
define abs for short too
1 parent 4336e9e commit 331219c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

generic/THTensorMath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,7 @@ TENSOR_IMPLEMENT_LOGICAL(ne,!=)
26972697
LAB_IMPLEMENT_BASIC_FUNCTION(abs,labs)
26982698
#endif /* long only part */
26992699

2700-
#if defined(TH_REAL_IS_INT)
2700+
#if defined(TH_REAL_IS_SHORT) || defined(TH_REAL_IS_INT)
27012701
LAB_IMPLEMENT_BASIC_FUNCTION(abs,abs)
27022702
#endif /* int only part */
27032703

generic/THTensorMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ TH_API void THTensor_(geTensorT)(THTensor *r_, THTensor *ta, THTensor *tb);
132132
TH_API void THTensor_(neTensorT)(THTensor *r_, THTensor *ta, THTensor *tb);
133133
TH_API void THTensor_(eqTensorT)(THTensor *r_, THTensor *ta, THTensor *tb);
134134

135-
#if defined(TH_REAL_IS_INT) || defined(TH_REAL_IS_LONG)
135+
#if defined(TH_REAL_IS_SHORT) || defined(TH_REAL_IS_INT) || defined(TH_REAL_IS_LONG)
136136
TH_API void THTensor_(abs)(THTensor *r_, THTensor *t);
137137
#endif
138138

0 commit comments

Comments
 (0)