@@ -127,25 +127,6 @@ namespace xsimd
127127 return vdupq_n_f64 (val);
128128 }
129129
130- /* ******
131- * set *
132- *******/
133-
134- template <class A >
135- XSIMD_INLINE batch<double , A> set (batch<double , A> const &, requires_arch<neon64>, double d0, double d1) noexcept
136- {
137- return float64x2_t { d0, d1 };
138- }
139-
140- template <class A >
141- XSIMD_INLINE batch_bool<double , A> set (batch_bool<double , A> const &, requires_arch<neon64>, bool b0, bool b1) noexcept
142- {
143- using register_type = typename batch_bool<double , A>::register_type;
144- using unsigned_type = as_unsigned_integer_t <double >;
145- return register_type { static_cast <unsigned_type>(b0 ? -1LL : 0LL ),
146- static_cast <unsigned_type>(b1 ? -1LL : 0LL ) };
147- }
148-
149130 /* ************
150131 * from_bool *
151132 *************/
@@ -328,6 +309,28 @@ namespace xsimd
328309 store_complex_aligned (dst, src, A {});
329310 }
330311
312+ /* ******
313+ * set *
314+ *******/
315+
316+ template <class A >
317+ XSIMD_INLINE batch<double , A> set (batch<double , A> const &, requires_arch<neon64> req, double d0, double d1) noexcept
318+ {
319+ alignas (A::alignment ()) double data[] = { d0, d1 };
320+ return load_aligned<A>(data, {}, req);
321+ }
322+
323+ template <class A >
324+ XSIMD_INLINE batch_bool<double , A> set (batch_bool<double , A> const &, requires_arch<neon64>, bool b0, bool b1) noexcept
325+ {
326+ using unsigned_type = as_unsigned_integer_t <double >;
327+ auto const out = batch<unsigned_type, A> {
328+ static_cast <unsigned_type>(b0 ? -1LL : 0LL ),
329+ static_cast <unsigned_type>(b1 ? -1LL : 0LL )
330+ };
331+ return { out.data };
332+ }
333+
331334 /* ******
332335 * neg *
333336 *******/
0 commit comments