Skip to content

Instantly share code, notes, and snippets.

@saschagrunert
Created May 13, 2018 12:17
Show Gist options
  • Save saschagrunert/a3eb227ae440f4bae74b8c6cd956e4b0 to your computer and use it in GitHub Desktop.
Save saschagrunert/a3eb227ae440f4bae74b8c6cd956e4b0 to your computer and use it in GitHub Desktop.
double average(const std::vector<int> & input){
return std::reduce(std::execution::par,
input.cbegin(),
input.cend(),
0) / (double)input.length();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment