mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 23:39:02 +08:00
16 lines
744 B
Diff
16 lines
744 B
Diff
|
diff --git a/aten/src/ATen/cpu/vec/vec_base.h b/aten/src/ATen/cpu/vec/vec_base.h
|
||
|
index 635ec8c82e5d..1974d55943b3 100644
|
||
|
--- a/aten/src/ATen/cpu/vec/vec_base.h
|
||
|
+++ b/aten/src/ATen/cpu/vec/vec_base.h
|
||
|
@@ -132,8 +132,9 @@ struct Vectorized {
|
||
|
// versions GCC/Clang have buggy determinations on whether or not an
|
||
|
// identifier is odr-used or not, and in any case it's hard to tell if
|
||
|
// a variable is odr-used or not. So best to just cut the problem at the root.
|
||
|
+ static constexpr size_type size_T = sizeof(T); // Workaround to compile with VS2022.
|
||
|
static constexpr size_type size() {
|
||
|
- return VECTOR_WIDTH / sizeof(T);
|
||
|
+ return VECTOR_WIDTH / size_T;
|
||
|
}
|
||
|
Vectorized() : values{static_cast<T>(0)} {}
|
||
|
Vectorized(T val) {
|