Skip to content

Commit

Permalink
Committing Parallel STL 20190321 open source release
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Mar 21, 2019
1 parent d720644 commit 8bbbbe7
Show file tree
Hide file tree
Showing 22 changed files with 1,250 additions and 747 deletions.
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
------------------------------------------------------------------------
The list of most significant changes made over time in Parallel STL.

Parallel STL 20190321 release
PSTL_VERSION == 205

Features / APIs:

- Improved performance in stable_sort and sort algorithms.

------------------------------------------------------------------------
Parallel STL release within Intel(R) Parallel Studio XE 2019 Update 3
PSTL_VERSION == 204

Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 3.1)
set(PARALLELSTL_VERSION_FILE "include/pstl/internal/pstl_config.h")
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define PSTL_VERSION .*$")
string(REGEX MATCH "#define PSTL_VERSION (.*)$" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}")
math(EXPR VERSION_MAJOR "${PARALLELSTL_VERSION_SOURCE} / 100")
math(EXPR VERSION_MINOR "${PARALLELSTL_VERSION_SOURCE} % 100")
math(EXPR VERSION_MAJOR "${CMAKE_MATCH_1} / 100")
math(EXPR VERSION_MINOR "${CMAKE_MATCH_1} % 100")

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

Expand Down Expand Up @@ -54,12 +54,12 @@ if (PARALLELSTL_USE_PARALLEL_POLICIES)
endif()
endif()
else()
target_add_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
target_compile_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
endif()

target_include_directories(ParallelSTL
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

write_basic_package_version_file(
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-20190305-green.svg)](https://github.com/intel/parallelstl/releases/tag/20190305)
[![Stable release](https://img.shields.io/badge/version-20190321-green.svg)](https://github.com/intel/parallelstl/releases/tag/20190321)

Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies,
as specified in ISO/IEC 14882:2017 standard, commonly called C++17.
Expand Down
7 changes: 3 additions & 4 deletions build/clang.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

override compiler:=clang++

ifneq ($(target),android)
PSTL_ARCH += $(KEY)march=native
endif

# XHOST_FLAG = -fno-vectorize
CPLUS_FLAGS += $(FQKEY)std=$(stdver)
# XHOST_FLAG = $(KEY)mavx2 #-fno-vectorize
Expand All @@ -29,4 +25,7 @@ CPLUS_FLAGS += $(FQKEY)std=$(stdver)
# version x.y.z" which does not correspond upstream LLVM version.
ifneq (,$(shell clang --version | egrep "clang version [6-9]\.[0-9]\.[0-9]"))
CPLUS_FLAGS += -fopenmp-simd #supported at least since 6.0 version
ifneq ($(target),android)
PSTL_ARCH += $(KEY)march=native
endif
endif
12 changes: 6 additions & 6 deletions examples/convex_hull/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
#
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
# depending on what compiler and Operating System are being used
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
set (CONFIGS_TO_SIMD_FLAGS_MAP
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
"Intel-Windows:/Qopenmp-simd"
"Intel-ANY:-qopenmp-simd"
"GNU-Linux:-fopenmp-simd"
"AppleClang-Darwin:-openmp-simd"
"ANY-ANY:"
"Intel-Windows:/Qopenmp-simd
Intel-ANY:-qopenmp-simd
GNU-Linux:-fopenmp-simd
AppleClang-Darwin:-openmp-simd
ANY-ANY:"
)

set (MY_CONFIG_REGEX "(${CMAKE_CXX_COMPILER_ID}|ANY)-(${CMAKE_SYSTEM_NAME}|ANY):([^\n]*)")
Expand Down
9 changes: 7 additions & 2 deletions examples/convex_hull/convex_hull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,16 @@ void quickhull(const pointVec_t &points, pointVec_t &hull) {
return;
}
//Find left and right most points, they will be in the convex hull
#if __INTEL_COMPILER == 1900 && PSTL_VERSION >= 200 && PSTL_VERSION <= 204
// A workaround for incorrectly working minmax_element
point_t p1 = *std::min_element(pstl::execution::par_unseq, points.cbegin(), points.cend());
point_t p2 = *std::max_element(pstl::execution::par_unseq, points.cbegin(), points.cend());
#else
auto minmaxx = std::minmax_element(pstl::execution::par_unseq, points.cbegin(), points.cend());

pointVec_t H;
point_t p1 = *minmaxx.first;
point_t p2 = *minmaxx.second;
#endif

//Divide the set of points into two subsets, which will be processed recursively
divide_and_conquer(pstl::execution::par_unseq, points.cbegin(), points.cend(), hull, p1, p2, p1);
}
Expand Down
6 changes: 3 additions & 3 deletions examples/convex_hull/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
padding: 0 0.2em 0.2em;
text-align: center;
}
.specs td tr:last-child td,
.specs td tr:last-child td,
.specs td tr:last-child th {
padding: 0 0.2em;
}
Expand Down Expand Up @@ -378,7 +378,7 @@ <h1 class="title">Parallel STL.<br>convex_hull sample</h1>
<dd>Outputs the result convex hull <tt>ConvexHull.csv</tt>
</dl>
</div>
<p><sup>(1)</sup> The delivered <a href="Makefile">Makefile</a> is provided for Intel&reg; C++ Compiler for illustration purpose only.</p>
<p><sup>(1)</sup> The delivered <a href="Makefile">Makefile</a> is provided for illustration purpose and supports Intel&reg; C++ Compiler only.</p>
</div>

<br>
Expand All @@ -390,7 +390,7 @@ <h1 class="title">Parallel STL.<br>convex_hull sample</h1>
<div class="show-hide">
<p>
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
<br>* Other names and brands may be claimed as the property of others.
<br>* Other names and brands may be claimed as the property of others.
<br>&copy; 2017-2019, Intel Corporation
</p>
</div>
Expand Down
12 changes: 6 additions & 6 deletions examples/dot_product/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
#
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
# depending on what compiler and Operating System are being used
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
set (CONFIGS_TO_SIMD_FLAGS_MAP
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
"Intel-Windows:/Qopenmp-simd"
"Intel-ANY:-qopenmp-simd"
"GNU-Linux:-fopenmp-simd"
"AppleClang-Darwin:-openmp-simd"
"ANY-ANY:"
"Intel-Windows:/Qopenmp-simd
Intel-ANY:-qopenmp-simd
GNU-Linux:-fopenmp-simd
AppleClang-Darwin:-openmp-simd
ANY-ANY:"
)

set (MY_CONFIG_REGEX "(${CMAKE_CXX_COMPILER_ID}|ANY)-(${CMAKE_SYSTEM_NAME}|ANY):([^\n]*)")
Expand Down
12 changes: 6 additions & 6 deletions examples/gamma_correction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ target_link_libraries(${PROJECT_NAME}
#
# Since OpenMP SIMD flag is compiler-specific, we need to choose it
# depending on what compiler and Operating System are being used
string (JOIN "\n" CONFIGS_TO_SIMD_FLAGS_MAP
set (CONFIGS_TO_SIMD_FLAGS_MAP
# "CMAKE_CXX_COMPILER_ID-CMAKE_SYSTEM_NAME:<compiler flag for that configuration>"
"Intel-Windows:/Qopenmp-simd"
"Intel-ANY:-qopenmp-simd"
"GNU-Linux:-fopenmp-simd"
"AppleClang-Darwin:-openmp-simd"
"ANY-ANY:"
"Intel-Windows:/Qopenmp-simd
Intel-ANY:-qopenmp-simd
GNU-Linux:-fopenmp-simd
AppleClang-Darwin:-openmp-simd
ANY-ANY:"
)

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

0 comments on commit 8bbbbe7

Please sign in to comment.