Fix compiler error in swapBytes64 for rare architectures (#16418)
authorHelmut <helmut.buhler@inf.h-brs.de>
Mon, 28 Jan 2019 19:25:33 +0000 (11:25 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 28 Jan 2019 19:38:07 +0000 (11:38 -0800)
commitc7547dbd5eeed5fd24ec96dfc64d5ae98cdcb7c2
tree2aee4fe0bfaf9ccaba503688956d5024a23a4f69
parent17d781857894db9a268728990b91f11e3751ddb8
Fix compiler error in swapBytes64 for rare architectures (#16418)

Summary:
swapBytes64 used to use SwapByteOrder_32 and value, both of which dont exist. This commit rewrites that part from scratch.
This happened on Debugbuild on Microsoft compiler. For that case " && !defined(_DEBUG)" is also removed, because _byteswap_uint64 works fine in debug mode (if it is necessary it should me commented why).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16418

Differential Revision: D13843306

Pulled By: ezyang

fbshipit-source-id: dde1c7baeccec3aaa750d4b7200b3f4ccb4a00cb
torch/csrc/byte_order.cpp