Skip to content

Commit c4231b8

Browse files
committed
Committing Parallel STL 2018061 open source release
1 parent 9d10f72 commit c4231b8

38 files changed

+3830
-1526
lines changed

CHANGES

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

4+
Parallel STL 20180619 release
5+
PSTL_VERSION == 106
6+
7+
Features / APIs:
8+
9+
- More algorithms support parallel and vector execution policies:
10+
adjacent_difference, partition, reverse, reverse_copy, rotate_copy,
11+
stable_partition.
12+
- More algorithms support parallel execution policies:
13+
inplace_merge, partial_sort_copy.
14+
- Split algorithm declarations and implementation by files.
15+
(by Thomas Rodgers).
16+
- CMake support - Preview Feature
17+
(by Amit Prakash Ambasta and Henry Schreiner)
18+
19+
------------------------------------------------------------------------
420
Parallel STL release within Intel(R) Parallel Studio XE 2018 Update 3
521
PSTL_VERSION == 105
622

@@ -83,7 +99,7 @@ Features / APIs:
8399

84100
- Aligned the implementation with the draft N4659 of the C++ standard.
85101
In particular, inner_product no longer supports execution policies.
86-
- reduce and transform_reduce support unseq and par_unseq execution
102+
- reduce and transform_reduce support unseq and par_unseq execution
87103
policies if std::plus<> is used for reduction.
88104
- Added counting_iterator and zip_iterator to support advanced use cases.
89105
To use, include pstl/iterators.h header file.

CMakeLists.txt

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) 2018 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
#
16+
#
17+
#
18+
19+
cmake_minimum_required(VERSION 3.1)
20+
21+
set(PARALLELSTL_VERSION_FILE "include/pstl/internal/pstl_config.h")
22+
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define PSTL_VERSION .*$")
23+
string(REGEX MATCH "#define PSTL_VERSION (.*)$" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}")
24+
math(EXPR VERSION_MAJOR "${PARALLELSTL_VERSION_SOURCE} / 100")
25+
math(EXPR VERSION_MINOR "${PARALLELSTL_VERSION_SOURCE} % 100")
26+
27+
project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR} LANGUAGES CXX)
28+
29+
option(PARALLELSTL_USE_PARALLEL_POLICIES "Enable parallel policies" ON)
30+
set(PARALLELSTL_BACKEND "tbb" CACHE STRING "Threading backend; defaults to TBB")
31+
32+
include(CMakePackageConfigHelpers)
33+
34+
add_library(ParallelSTL INTERFACE)
35+
add_library(pstl::ParallelSTL ALIAS ParallelSTL)
36+
37+
if (PARALLELSTL_USE_PARALLEL_POLICIES)
38+
if (PARALLELSTL_BACKEND STREQUAL "tbb")
39+
find_package(TBB 2018 REQUIRED tbb)
40+
message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})")
41+
target_link_libraries(ParallelSTL INTERFACE TBB::tbb)
42+
else()
43+
if (TARGET ${PARALLELSTL_BACKEND})
44+
target_link_libraries(ParallelSTL INTERFACE ${PARALLELSTL_BACKEND})
45+
else()
46+
find_package(${PARALLELSTL_BACKEND} REQUIRED)
47+
target_link_libraries(ParallelSTL INTERFACE ${${PARALLELSTL_BACKEND}_IMPORTED_TARGETS})
48+
endif()
49+
endif()
50+
else()
51+
target_add_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
52+
endif()
53+
54+
target_include_directories(ParallelSTL
55+
INTERFACE
56+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
57+
$<INSTALL_INTERFACE:include>)
58+
59+
write_basic_package_version_file(
60+
${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake
61+
VERSION ${PROJECT_VERSION}
62+
COMPATIBILITY AnyNewerVersion)
63+
64+
configure_file(
65+
ParallelSTLConfig.cmake.in
66+
${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake
67+
@ONLY)
68+
69+
export(TARGETS ParallelSTL NAMESPACE pstl:: FILE ParallelSTLTargets.cmake)
70+
export(PACKAGE ParallelSTL)

ParallelSTLConfig.cmake.in

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2018 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
#
16+
#
17+
#
18+
19+
include(CMakeFindDependencyMacro)
20+
21+
set(PARALLELSTL_BACKEND "@PARALLELSTL_BACKEND@")
22+
23+
if(PARALLELSTL_BACKEND STREQUAL "tbb")
24+
find_dependency(TBB 2018 REQUIRED tbb)
25+
endif()
26+
27+
include("${CMAKE_CURRENT_LIST_DIR}/ParallelSTLTargets.cmake")

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-20180529-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180529)
2+
[![Stable release](https://img.shields.io/badge/version-20180619-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180619)
33
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)
44

55
Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies,

0 commit comments

Comments
 (0)