Skip to content

Commit 32786e8

Browse files
cyyevermeta-codesync[bot]
authored andcommitted
Don't use 'not defined' in C++ preprocessing (#5025)
Summary: X-link: https://github.com/facebookresearch/FBGEMM/pull/2086 While not is a valid C++ keyword, MSVC issues the following warnings ``` C:\actions-runner\_work\pytorch\pytorch\third_party\fbgemm\include\fbgemm\./FloatConversion.h(292): warning C4067: unexpected tokens following preprocessor directive - expected a newline ``` Pull Request resolved: #5025 Reviewed By: spcyppt Differential Revision: D86135907 Pulled By: q10 fbshipit-source-id: 3d55410aa1f6f4f1a4511d2881d1b0ba05ea5c5a
1 parent d1d26ac commit 32786e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/fbgemm/FloatConversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ inline float cpu_half2float_ref(const float16 h) {
289289
// Same as the previous function, but use the built-in fp16 to fp32
290290
// conversion provided by the compiler
291291
inline float cpu_half2float(const float16 h) {
292-
#if defined(HAS_NATIVE_FP16_TYPE) && not defined(MISSING_GNU_F2H_IEEE)
292+
#if defined(HAS_NATIVE_FP16_TYPE) && !defined(MISSING_GNU_F2H_IEEE)
293293
__fp16 h_fp16 = NAN;
294294
std::memcpy(&h_fp16, &h, sizeof(__fp16));
295295
return h_fp16;
@@ -299,7 +299,7 @@ inline float cpu_half2float(const float16 h) {
299299
}
300300

301301
inline float16 cpu_float2half(const float f) {
302-
#if defined(HAS_NATIVE_FP16_TYPE) && not defined(MISSING_GNU_F2H_IEEE)
302+
#if defined(HAS_NATIVE_FP16_TYPE) && !defined(MISSING_GNU_F2H_IEEE)
303303
__fp16 h = f;
304304
float16 res = 0;
305305
std::memcpy(&res, &h, sizeof(__fp16));

0 commit comments

Comments
 (0)