| Technical Specification | ||||
| Filesystem library(filesystem TS) | ||||
| Library fundamentals(library fundamentals TS) | ||||
| Library fundamentals 2(library fundamentals TS v2) | ||||
| Library fundamentals 3(library fundamentals TS v3) | ||||
| Extensions for parallelism(parallelism TS) | ||||
| Extensions for parallelism 2(parallelism TS v2) | ||||
| Extensions for concurrency(concurrency TS) | ||||
| Extensions for concurrency 2(concurrency TS v2) | ||||
| Concepts(concepts TS) | ||||
| Ranges(ranges TS) | ||||
| Reflection(reflection TS) | ||||
| Mathematical special functions(special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Parallel exceptions | ||||
| Additional execution policies | ||||
| Algorithms | ||||
| Task blocks | ||||
| Data-parallel vectors | ||||
Defined in header <experimental/simd> | ||
template<class V,class T,class Abi> /*see below*/ simd_cast(const simd<T, Abi>& v)noexcept; | (1) | (parallelism TS v2) |
template<class V,class T,class Abi> /*see below*/ static_simd_cast(const simd<T, Abi>& v)noexcept; | (2) | (parallelism TS v2) |
Cast a simd object to another simd object. If V is T, returnssimd<T, Abi>; otherwise, if V is a scalar type, returnssimd<V, simd_abi::fixed_size<simd<T, Abi>::size()>>. Otherwise, V must be a simd type, and the function returns V.
Contents |
| v | - | the input simd object |
A simd object with the i-th element initialized tostatic_cast<To>(v[i]), where To is the output element type as specified.
The TS specification is missingsimd_cast andstatic_simd_cast overloads forsimd_mask. The libstdc++ implementation provides the missing overloads in thestd::experimental::__proposed namespace. If you already use the
namespace stdx= std::experimental;
shortcut, you might be interested to use
namespace stdx{usingnamespace std::experimental;usingnamespace std::experimental::__proposed;}
instead. Alternatively, libstdc++ implements a__cvt() member function insimd_mask, which allows implicit conversion of the mask. See also:https://github.com/VcDevel/std-simd/issues/41
| This section is incomplete Reason: no example |