std::experimental::simd_cast, std::experimental::static_simd_cast

From cppreference.com
< cpplrm; | experimentallrm; | simd
Technical specifications
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals 2 TS)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Concepts (concepts TS)
Ranges (ranges TS)
Special mathematical functions (special math TR)
Defined in header <experimental/simd>
template < class T, class Abi >

fixed_size_simd<T, simd_size_v<T, Abi>>

to_fixed_size( const simd<T, Abi>& v ) noexcept;
(1)
template < class T, class Abi >

fixed_size_simd_mask<T, simd_size_v<T, Abi>>

to_fixed_size( const simd_mask<T, Abi>& v ) noexcept;
(2)
template < class T, std::size_t N >

native_simd<T>

to_native( const fixed_size_simd<T, N>& v ) noexcept;
(3)
template < class T, std::size_t N >

native_simd_mask<T>

to_native( const fixed_size_simd_mask<T, N>>& v ) noexcept;
(4)
template < class T, std::size_t N >

simd<T>

to_compatible( const fixed_size_simd<T, N>& v ) noexcept;
(5)
template < class T, std::size_t N >

simd_mask<T>

to_compatible( const fixed_size_simd_mask<T, N>& v ) noexcept;
(6)

Returns an simd or simd_mask object with the same elements, but a different ABI.

3-6) these functions do not participate in overloading resolution unless N is the same as the size of the return type.

Parameters

v - the input simd or simd_mask object

Return value

The simd or simd_mask object with the specified ABI.

Example