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).

System Requirements

For the most up-to-date system requirements, see the release notes.

Files
dot_product.cpp
Implementation of the dot product based on Parallel STL.
Makefile
Makefile for building the example.
Directories
msvs
Contains a Microsoft* Visual Studio* IDE workspace for building and running the example (Windows* OS systems only).
Build instructions

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).

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).

Usage
dot_product or dot_product.exe


Legal Information

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