Skip to content

Commit

Permalink
Committing Parallel STL 20180329 open source release
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Mar 29, 2018
1 parent 08d28b5 commit a2cc78e
Show file tree
Hide file tree
Showing 42 changed files with 1,557 additions and 639 deletions.
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
------------------------------------------------------------------------
The list of most significant changes made over time in Parallel STL.

Parallel STL 20180329 release
PSTL_VERSION == 104

Features / APIs:

- More algorithms support parallel and vector execution policies:
find_first_of, is_heap, is_heap_until, replace, replace_if.
- More algorithms support vector execution policies:
remove, remove_if.
- More algorithms support parallel execution policies:
partial_sort.

------------------------------------------------------------------------
Parallel STL release within Intel(R) Parallel Studio XE 2018 Update 2
PSTL_VERSION == 103

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parallel STL
[![Stable release](https://img.shields.io/badge/version-20180322-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180322)
[![Stable release](https://img.shields.io/badge/version-20180329-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180329)
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)

Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies,
Expand Down
2 changes: 2 additions & 0 deletions build/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG)
ifeq ($(cfg), debug)
TBB_LIB_NAME = tbb_debug
BACKEND_MACRO += -DTBB_USE_DEBUG=1
DEBUG_MACRO += -DPSTL_USE_DEBUG
OPTIMIZATION_KEYS = $(OPTIMIZATION_DISABLED_FLAGS)
else
OPTIMIZATION_KEYS = $(OPTIMIZATION_ENABLED_FLAGS)
Expand All @@ -108,6 +109,7 @@ DYN_LDFLAGS += $(PSTL_ARCH)
CPLUS_FLAGS += $(TEST_MACRO)
CPLUS_FLAGS += $(INCLUDES)
CPLUS_FLAGS += $(BACKEND_MACRO)
CPLUS_FLAGS += $(DEBUG_MACRO)
CPLUS_FLAGS += $(CXXFLAGS)
CPLUS_FLAGS += $(OPTIMIZATION_KEYS)

Expand Down
6 changes: 3 additions & 3 deletions examples/gamma_correction/gamma_correction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void applyGamma(Rows& image, double g) {
typedef decltype(image[0][0]) Pixel;
const int w = image[1] - image[0];

//execution STL algorithms with execution policies - std::execution::par and std::execution::unseq
std::for_each(std::execution::par, image.begin(), image.end(), [g, w](Row& r) {
std::transform(std::execution::unseq, r, r+w, r, [g](Pixel& p) {
//execution STL algorithms with execution policies - pstl::execution::par and pstl::execution::unseq
std::for_each(pstl::execution::par, image.begin(), image.end(), [g, w](Row& r) {
std::transform(pstl::execution::unseq, r, r+w, r, [g](Pixel& p) {
double v = 0.3*p.bgra[2] + 0.59*p.bgra[1] + 0.11*p.bgra[0]; //RGB Luminance value
assert(v > 0);
double res = pow(v, g);
Expand Down
207 changes: 97 additions & 110 deletions include/pstl/algorithm

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions include/pstl/execution
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

*/

#ifndef __PSTL_execution_policy_H
#define __PSTL_execution_policy_H
#ifndef __PSTL_execution_policy
#define __PSTL_execution_policy

#include <type_traits>
#include "internal/pstl_config.h"
Expand Down Expand Up @@ -129,4 +129,4 @@ namespace std {
__PSTL_PRAGMA_MESSAGE_POLICIES("The <Parallel STL> execution policies are injected into the standard namespace std::execution")
#endif

#endif /* __PSTL_execution_policy_H */
#endif /* __PSTL_execution_policy */
213 changes: 111 additions & 102 deletions include/pstl/internal/algorithm_impl.h

Large diffs are not rendered by default.

Loading

0 comments on commit a2cc78e

Please sign in to comment.