File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,15 @@ double vectorSumSimd(NumericVector x) {
5858
5959/* *
6060 * As you can see, it's quite simple to take advantage of `Boost.SIMD`.
61+ *
62+ * Behind the scenes of `boost::simd::accumulate()`, `Boost.SIMD` will
63+ * apply your templated functor to 'packs' of values when appropriate,
64+ * and simple values when not. In other words, there are effectively
65+ * two kinds of template specializations being generated behind the scenes:
66+ * one with `T = double`, and one with `T = boost::simd::pack<double>`. The
67+ * use of the packed representation is what allows `Boost.SIMD` to ensure
68+ * vectorized instructions are used and generated.
69+ *
6170 * Now, let's compare the performance of these two implementations.
6271 */
6372
You can’t perform that action at this time.
0 commit comments