Vc is an open source library to ease explicit vectorization of C++ code. It has an intuitive API and provides portability between different compilers and compiler versions as well as portability between different vector instruction sets.
Vc 1.4.0 is a minor feature release with subtle changes in the interface and the start of an upgrade path to std::experimental::simd
.
User Changelog
|
description |
|
Dropped all Intel MIC code. This was not AVX512, but the old KNC implementation. ICC 18 dropped support for the -mmic compile flag. Consequently, I removed the maintenance burden. |
|
Vc::simdize<T, N> (with arithmetic T and suitable N ) can now be an alias for Vc::Vector<T, Sse> , while AVX(2) is available. In Vc 1.3, this would use Vc::SimdArray<T, N> instead. |
|
Fixed conversions from Vc::Vector<T> to Vc::SimdArray<U, Vc::Vector<T>::size()> to be implicit (as the documentation always said). |
|
Added Vc::simd<T, Abi> alias that resolves to the corresponding Vc::Vector or Vc::SimdArray type. Most importantly Vc::simd<T, Vc::simd_abi::fixed_size<N>> (alias: Vc::fixed_size_simd<T, N> ) will give you (almost) Vc::SimdArray<T, N> . Note that this simd type does not implement the exact same interface as defined in the Parallelism TS v2. Most SimdArray operations return fixed_size_simd now, thus potentially breaking existing code (e.g. by breaking template argument deduction). |
|
Added load_interleaved and store_interleaved to be used with Vc::simdize<T> objects. This enables optimized loads from / stores to an AoS (array of structure) layout into/from struct s of Vc vectors. This is currently only optimized for structures T where all data members have equal sizeof . |
|
Added a new constructor to simdized types: Vc::simdize<T>([](size_t n) { ... }) expects the lambda to return objects of type T , which will be placed at the corresponding index n in the resulting object. |
|
Vc::simd_for_each and Vc::simd_for_each_n will now vectorize any value_type via Vc::simdize . In Vc 1.3, only arithmetic types were vectorized, everything else used a fall-back to std::for_each . This fallback is removed in Vc 1.4. Consequently, the value_type must work with Vc::simdize . |
|
The sin , cos , and sincos functions now have increased precision at the cost of lower performance (with AVX2, you still get a speedup of ~8 over std::sin and std::cos ). There's an option to use libmvec for Vc::sin and Vc::cos , which gives even higher performance for SSE4 and AVX2, but less performance for targets without SSE4 or just AVX. |
|
Modernize CMake to simplify usage of Vc in external projects via exported target. |
|
Binary operators are now stricter in the implicit conversions they allow. E.g. simd<int>(0) == 0l is now ill-formed. Because it would require a silent (potentially) narrowing conversion of the right hand side. |