@@ -193,6 +193,8 @@ namespace xsimd
193193
194194 XSIMD_INLINE T first () const noexcept ;
195195
196+ XSIMD_INLINE register_type raw () const noexcept ;
197+
196198 // comparison operators. Defined as friend to enable automatic
197199 // conversion of parameters from scalar to batch, at the cost of using a
198200 // proxy implementation from details::.
@@ -355,6 +357,8 @@ namespace xsimd
355357
356358 XSIMD_INLINE bool first () const noexcept ;
357359
360+ XSIMD_INLINE register_type raw () const noexcept ;
361+
358362 // mask operations
359363 XSIMD_INLINE uint64_t mask () const noexcept ;
360364 XSIMD_INLINE static batch_bool from_mask (uint64_t mask) noexcept ;
@@ -836,6 +840,15 @@ namespace xsimd
836840 return kernel::first (*this , A {});
837841 }
838842
843+ /* *
844+ * Cast to the underlying native intrinsic register type.
845+ */
846+ template <class T , class A >
847+ XSIMD_INLINE auto batch<T, A>::raw() const noexcept -> register_type
848+ {
849+ return static_cast <register_type>(*this );
850+ }
851+
839852 /* *****************************
840853 * batch comparison operators *
841854 ******************************/
@@ -1167,6 +1180,15 @@ namespace xsimd
11671180 return kernel::first (*this , A {});
11681181 }
11691182
1183+ /* *
1184+ * Cast to the underlying native intrinsic register type.
1185+ */
1186+ template <class T , class A >
1187+ XSIMD_INLINE auto batch_bool<T, A>::raw() const noexcept -> register_type
1188+ {
1189+ return static_cast <register_type>(*this );
1190+ }
1191+
11701192 /* **********************************
11711193 * batch_bool comparison operators *
11721194 ***********************************/
0 commit comments