We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 222175b commit a96aadfCopy full SHA for a96aadf
c10/core/Scalar.h
@@ -121,6 +121,9 @@ class C10_API Scalar {
121
return checked_convert<type, double>(v.d, #type); \
122
} else if (Tag::HAS_z == tag) { \
123
return checked_convert<type, c10::complex<double>>(v.z, #type); \
124
+ } else if (Tag::HAS_sd == tag) { \
125
+ return checked_convert<type, double>( \
126
+ toSymFloat().guard_float(__FILE__, __LINE__), #type); \
127
} \
128
if (Tag::HAS_b == tag) { \
129
return checked_convert<type, bool>(v.i, #type); \
@@ -131,9 +134,6 @@ class C10_API Scalar {
131
134
} else if (Tag::HAS_si == tag) { \
132
135
return checked_convert<type, int64_t>( \
133
136
toSymInt().guard_int(__FILE__, __LINE__), #type); \
- } else if (Tag::HAS_sd == tag) { \
- return checked_convert<type, int64_t>( \
- toSymFloat().guard_float(__FILE__, __LINE__), #type); \
137
} else if (Tag::HAS_sb == tag) { \
138
139
toSymBool().guard_bool(__FILE__, __LINE__), #type); \
0 commit comments