Skip to content

Commit 676f5f8

Browse files
committed
more details
1 parent 2806055 commit 676f5f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gallery/simd-vector-sum.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ double vectorSumSimd(NumericVector x) {
6161
*
6262
* Behind the scenes of `boost::simd::accumulate()`, `Boost.SIMD` will
6363
* apply your templated functor to 'packs' of values when appropriate,
64-
* and simple values when not. In other words, there are effectively
64+
* and scalar values when not. In other words, there are effectively
6565
* two kinds of template specializations being generated behind the scenes:
6666
* one with `T = double`, and one with `T = boost::simd::pack<double>`. The
6767
* use of the packed representation is what allows `Boost.SIMD` to ensure
68-
* vectorized instructions are used and generated.
68+
* vectorized instructions are used and generated. `Boost.SIMD` provides
69+
* a host of functions and operator overloads that ensure that optimized
70+
* instructions are used when possible over a packed object, while falling
71+
* back to 'default' operations for scalar values when not.
6972
*
7073
* Now, let's compare the performance of these two implementations.
7174
*/

0 commit comments

Comments
 (0)