mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
This reverts commit 3bb16a0842.
Reverted https://github.com/pytorch/pytorch/pull/95963 on behalf of https://github.com/izaitsevfb due to Breaks internal android builds: unused function c10_compute_alignment [-Werror,-Wunused-function]
18 lines
331 B
C++
18 lines
331 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
namespace c10 {
|
|
|
|
#ifdef C10_MOBILE
|
|
// Use 16-byte alignment on mobile
|
|
// - ARM NEON AArch32 and AArch64
|
|
// - x86[-64] < AVX
|
|
constexpr size_t gAlignment = 16;
|
|
#else
|
|
// Use 64-byte alignment should be enough for computation up to AVX512.
|
|
constexpr size_t gAlignment = 64;
|
|
#endif
|
|
|
|
} // namespace c10
|