Skip to content

Commit 8bbbbe7

Browse files
committed
Committing Parallel STL 20190321 open source release
1 parent d720644 commit 8bbbbe7

22 files changed

+1250
-747
lines changed

CHANGES

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
------------------------------------------------------------------------
22
The list of most significant changes made over time in Parallel STL.
33

4+
Parallel STL 20190321 release
5+
PSTL_VERSION == 205
6+
7+
Features / APIs:
8+
9+
- Improved performance in stable_sort and sort algorithms.
10+
11+
------------------------------------------------------------------------
412
Parallel STL release within Intel(R) Parallel Studio XE 2019 Update 3
513
PSTL_VERSION == 204
614

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 3.1)
1717
set(PARALLELSTL_VERSION_FILE "include/pstl/internal/pstl_config.h")
1818
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define PSTL_VERSION .*$")
1919
string(REGEX MATCH "#define PSTL_VERSION (.*)$" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}")
20-
math(EXPR VERSION_MAJOR "${PARALLELSTL_VERSION_SOURCE} / 100")
21-
math(EXPR VERSION_MINOR "${PARALLELSTL_VERSION_SOURCE} % 100")
20+
math(EXPR VERSION_MAJOR "${CMAKE_MATCH_1} / 100")
21+
math(EXPR VERSION_MINOR "${CMAKE_MATCH_1} % 100")
2222

2323
project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR} LANGUAGES CXX)
2424

@@ -54,12 +54,12 @@ if (PARALLELSTL_USE_PARALLEL_POLICIES)
5454
endif()
5555
endif()
5656
else()
57-
target_add_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
57+
target_compile_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
5858
endif()
5959

6060
target_include_directories(ParallelSTL
6161
INTERFACE
62-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
62+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
6363
$<INSTALL_INTERFACE:include>)
6464

6565
write_basic_package_version_file(

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Parallel STL
2-
[![Stable release](https://img.shields.io/badge/version-20190305-green.svg)](https://github.com/intel/parallelstl/releases/tag/20190305)
2+
[![Stable release](https://img.shields.io/badge/version-20190321-green.svg)](https://github.com/intel/parallelstl/releases/tag/20190321)
33

44
Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies,
55
as specified in ISO/IEC 14882:2017 standard, commonly called C++17.

build/clang.inc

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
override compiler:=clang++
1616

17-
ifneq ($(target),android)
18-
PSTL_ARCH += $(KEY)march=native
19-
endif
20-
2117
# XHOST_FLAG = -fno-vectorize
2218
CPLUS_FLAGS += $(FQKEY)std=$(stdver)
2319
# XHOST_FLAG = $(KEY)mavx2 #-fno-vectorize
@@ -29,4 +25,7 @@ CPLUS_FLAGS += $(FQKEY)std=$(stdver)
2925
# version x.y.z" which does not correspond upstream LLVM version.
3026
ifneq (,$(shell clang --version | egrep "clang version [6-9]\.[0-9]\.[0-9]"))
3127
CPLUS_FLAGS += -fopenmp-simd #supported at least since 6.0 version
28+
ifneq ($(target),android)
29+
PSTL_ARCH += $(KEY)march=native
30+
endif
3231
endif

examples/convex_hull/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
3737
#
3838
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
3939
# depending on what compiler and Operating System are being used
40-
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
40+
set (CONFIGS_TO_SIMD_FLAGS_MAP
4141
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
42-
"Intel-Windows:/Qopenmp-simd"
43-
"Intel-ANY:-qopenmp-simd"
44-
"GNU-Linux:-fopenmp-simd"
45-
"AppleClang-Darwin:-openmp-simd"
46-
"ANY-ANY:"
42+
"Intel-Windows:/Qopenmp-simd
43+
Intel-ANY:-qopenmp-simd
44+
GNU-Linux:-fopenmp-simd
45+
AppleClang-Darwin:-openmp-simd
46+
ANY-ANY:"
4747
)
4848

4949
set (MY_CONFIG_REGEX "(${CMAKE_CXX_COMPILER_ID}|ANY)-(${CMAKE_SYSTEM_NAME}|ANY):([^\n]*)")

examples/convex_hull/convex_hull.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,16 @@ void quickhull(const pointVec_t &points, pointVec_t &hull) {
104104
return;
105105
}
106106
//Find left and right most points, they will be in the convex hull
107+
#if __INTEL_COMPILER == 1900 && PSTL_VERSION >= 200 && PSTL_VERSION <= 204
108+
// A workaround for incorrectly working minmax_element
109+
point_t p1 = *std::min_element(pstl::execution::par_unseq, points.cbegin(), points.cend());
110+
point_t p2 = *std::max_element(pstl::execution::par_unseq, points.cbegin(), points.cend());
111+
#else
107112
auto minmaxx = std::minmax_element(pstl::execution::par_unseq, points.cbegin(), points.cend());
108-
109-
pointVec_t H;
110113
point_t p1 = *minmaxx.first;
111114
point_t p2 = *minmaxx.second;
115+
#endif
116+
112117
//Divide the set of points into two subsets, which will be processed recursively
113118
divide_and_conquer(pstl::execution::par_unseq, points.cbegin(), points.cend(), hull, p1, p2, p1);
114119
}

examples/convex_hull/readme.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
padding: 0 0.2em 0.2em;
243243
text-align: center;
244244
}
245-
.specs td tr:last-child td,
245+
.specs td tr:last-child td,
246246
.specs td tr:last-child th {
247247
padding: 0 0.2em;
248248
}
@@ -378,7 +378,7 @@ <h1 class="title">Parallel STL.<br>convex_hull sample</h1>
378378
<dd>Outputs the result convex hull <tt>ConvexHull.csv</tt>
379379
</dl>
380380
</div>
381-
<p><sup>(1)</sup> The delivered <a href="Makefile">Makefile</a> is provided for Intel&reg; C++ Compiler for illustration purpose only.</p>
381+
<p><sup>(1)</sup> The delivered <a href="Makefile">Makefile</a> is provided for illustration purpose and supports Intel&reg; C++ Compiler only.</p>
382382
</div>
383383

384384
<br>
@@ -390,7 +390,7 @@ <h1 class="title">Parallel STL.<br>convex_hull sample</h1>
390390
<div class="show-hide">
391391
<p>
392392
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
393-
<br>* Other names and brands may be claimed as the property of others.
393+
<br>* Other names and brands may be claimed as the property of others.
394394
<br>&copy; 2017-2019, Intel Corporation
395395
</p>
396396
</div>

examples/dot_product/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
3737
#
3838
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
3939
# depending on what compiler and Operating System are being used
40-
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
40+
set (CONFIGS_TO_SIMD_FLAGS_MAP
4141
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
42-
"Intel-Windows:/Qopenmp-simd"
43-
"Intel-ANY:-qopenmp-simd"
44-
"GNU-Linux:-fopenmp-simd"
45-
"AppleClang-Darwin:-openmp-simd"
46-
"ANY-ANY:"
42+
"Intel-Windows:/Qopenmp-simd
43+
Intel-ANY:-qopenmp-simd
44+
GNU-Linux:-fopenmp-simd
45+
AppleClang-Darwin:-openmp-simd
46+
ANY-ANY:"
4747
)
4848

4949
set (MY_CONFIG_REGEX "(${CMAKE_CXX_COMPILER_ID}|ANY)-(${CMAKE_SYSTEM_NAME}|ANY):([^\n]*)")

examples/gamma_correction/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
3737
#
3838
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
3939
# depending on what compiler and Operating System are being used
40-
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
40+
set (CONFIGS_TO_SIMD_FLAGS_MAP
4141
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
42-
"Intel-Windows:/Qopenmp-simd"
43-
"Intel-ANY:-qopenmp-simd"
44-
"GNU-Linux:-fopenmp-simd"
45-
"AppleClang-Darwin:-openmp-simd"
46-
"ANY-ANY:"
42+
"Intel-Windows:/Qopenmp-simd
43+
Intel-ANY:-qopenmp-simd
44+
GNU-Linux:-fopenmp-simd
45+
AppleClang-Darwin:-openmp-simd
46+
ANY-ANY:"
4747
)
4848

4949
set (MY_CONFIG_REGEX "(${CMAKE_CXX_COMPILER_ID}|ANY)-(${CMAKE_SYSTEM_NAME}|ANY):([^\n]*)")

0 commit comments

Comments
 (0)