Skip to content

Vc 1.4.0

Compare
Choose a tag to compare
@mattkretz mattkretz released this 01 Oct 12:38
· 153 commits to 1.4 since this release

portable SIMD zero-overhead language license
GCC Support Clang Support ICC Support MSVC Support

DOI

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
API break 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.
API break 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.
API break Fixed conversions from Vc::Vector<T> to Vc::SimdArray<U, Vc::Vector<T>::size()> to be implicit (as the documentation always said).
API break API addition 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).
API addition 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 structs of Vc vectors. This is currently only optimized for structures T where all data members have equal sizeof.
API addition 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.
API break API addition 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.
behavior change bug fixed 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.
CMake feature Modernize CMake to simplify usage of Vc in external projects via exported target.
behavior change bug fixed 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.

Developer Changelog