using Base = internal::SimdArrayRef<const SimdFloat>;
using Base::Base;
};
-template<>
-class ArrayRef<SimdFInt32> : public internal::SimdArrayRef<SimdFInt32>
-{
- using Base = internal::SimdArrayRef<SimdFInt32>;
- using Base::Base;
-};
-template<>
-class ArrayRef<const SimdFInt32> : public internal::SimdArrayRef<const SimdFInt32>
-{
- using Base = internal::SimdArrayRef<const SimdFInt32>;
- using Base::Base;
-};
#endif
#if GMX_SIMD_HAVE_DOUBLE
template<>
using Base = internal::SimdArrayRef<const SimdDouble>;
using Base::Base;
};
-template<>
-class ArrayRef<SimdDInt32> : public internal::SimdArrayRef<SimdDInt32>
-{
- using Base = internal::SimdArrayRef<SimdDInt32>;
- using Base::Base;
-};
-template<>
-class ArrayRef<const SimdDInt32> : public internal::SimdArrayRef<const SimdDInt32>
-{
- using Base = internal::SimdArrayRef<const SimdDInt32>;
- using Base::Base;
-};
#endif
} // namespace gmx
namespace gmx
{
-namespace
+#if GMX_SIMD_HAVE_REAL
+
+/* SimdInt32 is a strange type which would never belong in an interface,
+ * because its properties are peculiar to int-to-float conversions within
+ * SIMD types, so there is no need to support it as a specialization of
+ * SimdArrayRef. But it is useful here for better test coverage of
+ * SimdArrayRef. */
+
+template<>
+class ArrayRef<SimdInt32> : public internal::SimdArrayRef<SimdInt32>
{
+ using Base = internal::SimdArrayRef<SimdInt32>;
+ using Base::Base;
+};
+template<>
+class ArrayRef<const SimdInt32> : public internal::SimdArrayRef<const SimdInt32>
+{
+ using Base = internal::SimdArrayRef<const SimdInt32>;
+ using Base::Base;
+};
-#if GMX_SIMD_HAVE_REAL
+namespace
+{
TEST(EmptyArrayRefTest, IsEmpty)
{
#endif // GTEST_HAS_TYPED_TEST
-#endif // GMX_HAVE_SIMD_REAL
-
} // namespace
-} // namespace
+#endif // GMX_HAVE_SIMD_REAL
+
+} // namespace gmx