This example demonstrates computing the dot product of two vectors.
See Dot_product for more information.
The example computes a dot product (std::transform_reduce
) of a couple of vectors filled randomly by floating numbers (std::generate
).
The output of the example is the dot product of the couple of vectors.
For the most up-to-date system requirements, see the release notes.
To use Parallel STL, set up the environment by calling the pstlvars
script (if you use a command line) or set the %PSTLROOT%
environment variable pointing to the <pstl_installdir>
folder (in Microsoft* Visual Studio* IDE on Windows* OS)
and add the <pstl_installdir>/pstl/include
folder to the compiler include paths.
Use the Makefile to build the example on the command line.
Use the msvs/dot_product.sln project file to build the example in the Microsoft* Visual Studio* IDE (Windows* systems only).
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
* Other names and brands may be claimed as the property of others.
© 2017, Intel Corporation