Skip to content

Commit

Permalink
]: replace some usings with inheritance (facebook#2311)
Browse files Browse the repository at this point in the history
Summary:

The name get's a little long in error messages, inheritance will help with that

Reviewed By: yfeldblum

Differential Revision: D64177693
  • Loading branch information
DenisYaroshevskiy authored and facebook-github-bot committed Oct 14, 2024
1 parent ed20271 commit b1659a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions folly/algorithm/simd/detail/SimdPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ struct SimdSse42PlatformSpecific {
#define FOLLY_DETAIL_HAS_SIMD_PLATFORM 1

template <typename T>
using SimdSse42Platform = SimdPlatformCommon<SimdSse42PlatformSpecific<T>>;
struct SimdSse42Platform : SimdPlatformCommon<SimdSse42PlatformSpecific<T>> {};

#if defined(__AVX2__)

Expand Down Expand Up @@ -371,15 +371,15 @@ struct SimdAvx2PlatformSpecific {
};

template <typename T>
using SimdAvx2Platform = SimdPlatformCommon<SimdAvx2PlatformSpecific<T>>;
struct SimdAvx2Platform : SimdPlatformCommon<SimdAvx2PlatformSpecific<T>> {};

template <typename T>
using SimdPlatform = SimdAvx2Platform<T>;

#else

template <typename T>
using SimdPlatform = SimdPlatformCommon<SimdSse42PlatformSpecific<T>>;
using SimdPlatform = SimdSse42Platform<T>;

#endif

Expand Down Expand Up @@ -497,7 +497,8 @@ struct SimdAarch64PlatformSpecific {
#define FOLLY_DETAIL_HAS_SIMD_PLATFORM 1

template <typename T>
using SimdAarch64Platform = SimdPlatformCommon<SimdAarch64PlatformSpecific<T>>;
struct SimdAarch64Platform
: SimdPlatformCommon<SimdAarch64PlatformSpecific<T>> {};

template <typename T>
using SimdPlatform = SimdAarch64Platform<T>;
Expand Down

0 comments on commit b1659a0

Please sign in to comment.