dmlc / dmlc-core

A common bricks library for building scalable and portable distributed machine learning.
Apache License 2.0
864 stars 520 forks source link

missing parentheses in macro #620

Closed Light-of-Hers closed 4 years ago

Light-of-Hers commented 4 years ago

https://github.com/dmlc/dmlc-core/blob/ae98c553992eb9f8039fb6e1d17286c0698985de/include/dmlc/logging.h#L192 It may cause some problems that "x" and "y" are not enclosed in parentheses. For example, in tvm/src/runtime/ndarray.cc:58 CHECK_EQ(dtype.bits & (dtype.bits - 1), 0);

tqchen commented 4 years ago

Thanks @Light-of-Hers for reporting the issue, cc @junrushao1994 @okuvshynov

okuvshynov commented 4 years ago

I can fix it a little later today

tqchen commented 4 years ago

https://github.com/dmlc/dmlc-core/pull/621

tqchen commented 4 years ago

Thanks @Light-of-Hers @okuvshynov