Skip to content

Commit

Permalink
Committing Parallel STL 2018061 open source release
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Jun 19, 2018
1 parent 9d10f72 commit c4231b8
Show file tree
Hide file tree
Showing 38 changed files with 3,830 additions and 1,526 deletions.
18 changes: 17 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
------------------------------------------------------------------------
The list of most significant changes made over time in Parallel STL.

Parallel STL 20180619 release
PSTL_VERSION == 106

Features / APIs:

- More algorithms support parallel and vector execution policies:
adjacent_difference, partition, reverse, reverse_copy, rotate_copy,
stable_partition.
- More algorithms support parallel execution policies:
inplace_merge, partial_sort_copy.
- Split algorithm declarations and implementation by files.
(by Thomas Rodgers).
- CMake support - Preview Feature
(by Amit Prakash Ambasta and Henry Schreiner)

------------------------------------------------------------------------
Parallel STL release within Intel(R) Parallel Studio XE 2018 Update 3
PSTL_VERSION == 105

Expand Down Expand Up @@ -83,7 +99,7 @@ Features / APIs:

- Aligned the implementation with the draft N4659 of the C++ standard.
In particular, inner_product no longer supports execution policies.
- reduce and transform_reduce support unseq and par_unseq execution
- reduce and transform_reduce support unseq and par_unseq execution
policies if std::plus<> is used for reduction.
- Added counting_iterator and zip_iterator to support advanced use cases.
To use, include pstl/iterators.h header file.
Expand Down
70 changes: 70 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#
#

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")

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

option(PARALLELSTL_USE_PARALLEL_POLICIES "Enable parallel policies" ON)
set(PARALLELSTL_BACKEND "tbb" CACHE STRING "Threading backend; defaults to TBB")

include(CMakePackageConfigHelpers)

add_library(ParallelSTL INTERFACE)
add_library(pstl::ParallelSTL ALIAS ParallelSTL)

if (PARALLELSTL_USE_PARALLEL_POLICIES)
if (PARALLELSTL_BACKEND STREQUAL "tbb")
find_package(TBB 2018 REQUIRED tbb)
message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})")
target_link_libraries(ParallelSTL INTERFACE TBB::tbb)
else()
if (TARGET ${PARALLELSTL_BACKEND})
target_link_libraries(ParallelSTL INTERFACE ${PARALLELSTL_BACKEND})
else()
find_package(${PARALLELSTL_BACKEND} REQUIRED)
target_link_libraries(ParallelSTL INTERFACE ${${PARALLELSTL_BACKEND}_IMPORTED_TARGETS})
endif()
endif()
else()
target_add_definitions(ParallelSTL INTERFACE PSTL_USE_PARALLEL_POLICIES=0)
endif()

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

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)

configure_file(
ParallelSTLConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake
@ONLY)

export(TARGETS ParallelSTL NAMESPACE pstl:: FILE ParallelSTLTargets.cmake)
export(PACKAGE ParallelSTL)
27 changes: 27 additions & 0 deletions ParallelSTLConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#
#

include(CMakeFindDependencyMacro)

set(PARALLELSTL_BACKEND "@PARALLELSTL_BACKEND@")

if(PARALLELSTL_BACKEND STREQUAL "tbb")
find_dependency(TBB 2018 REQUIRED tbb)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/ParallelSTLTargets.cmake")
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-20180529-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180529)
[![Stable release](https://img.shields.io/badge/version-20180619-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180619)
[![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
Loading

0 comments on commit c4231b8

Please sign in to comment.