Replace Vec256<T>::size with constexpr method (#15406)
authorEdward Yang <ezyang@fb.com>
Thu, 20 Dec 2018 04:31:09 +0000 (20:31 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 20 Dec 2018 04:33:45 +0000 (20:33 -0800)
commit1071e92335d8a69107f4694f56bebbb9655371aa
tree6aa78b428d3b39efabcb0fe37e86a94112a2eccd
parent9abd755a7637277ca9e355531b7199d661887b25
Replace Vec256<T>::size with constexpr method (#15406)

Summary:
Stack:
&nbsp;&nbsp;&nbsp;&nbsp;:black_circle:&nbsp; **#15406 Replace Vec256<T>::size with constexpr method**&nbsp;&nbsp;[:yellow_heart:](https://our.intern.facebook.com/intern/diff/D13519902/)

See Note [constexpr static function to avoid odr-usage compiler bug]
for detailed justification.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15406

Differential Revision: D13523774

Pulled By: ezyang

fbshipit-source-id: c0ab44298bb2ef3d68a66d026fc6bc156a909a6b
12 files changed:
aten/src/ATen/cpu/vec256/functional.h
aten/src/ATen/cpu/vec256/vec256.h
aten/src/ATen/cpu/vec256/vec256_base.h
aten/src/ATen/cpu/vec256/vec256_double.h
aten/src/ATen/cpu/vec256/vec256_float.h
aten/src/ATen/cpu/vec256/vec256_int.h
aten/src/ATen/native/cpu/DistanceOpsKernel.cpp
aten/src/ATen/native/cpu/GridSamplerKernel.cpp
aten/src/ATen/native/cpu/Loops.h
aten/src/ATen/native/cpu/ReduceOpsKernel.cpp
aten/src/ATen/native/cpu/SoftMaxKernel.cpp
aten/src/ATen/native/cpu/UnaryOpsKernel.cpp