Skip to content

Commit 0241743

Browse files
committed
Committing Parallel STL 20200330 open source release
1 parent 37761e1 commit 0241743

File tree

12 files changed

+480
-23
lines changed

12 files changed

+480
-23
lines changed

CHANGES

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

4+
Parallel STL release within Intel(R) Parallel Studio XE 2020 Update 1
5+
__INTEL_PSTL_VERSION == 211
6+
7+
Features / APIs:
8+
9+
- Added support for GCC9 compiler where libstdc++ contains implemented
10+
C++17 standard execution policies.
11+
12+
------------------------------------------------------------------------
413
Parallel STL release within Intel(R) Parallel Studio XE 2020
514
__INTEL_PSTL_VERSION == 210
615

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

docs/ReleaseNotes.rst

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
=======================================
2+
PSTL 9.0.0 (In-Progress) Release Notes
3+
=======================================
4+
5+
.. contents::
6+
:local:
7+
:depth: 2
8+
9+
Written by the `PSTL Team <https://pstl.llvm.org>`_
10+
11+
.. warning::
12+
13+
These are in-progress notes for the upcoming pstl 10 release.
14+
Release notes for previous releases can be found on
15+
`the Download Page <https://releases.llvm.org/download.html>`_.
16+
17+
Introduction
18+
============
19+
20+
This document contains the release notes for the PSTL parallel algorithms
21+
library, part of the LLVM Compiler Infrastructure, release 10.0.0. Here we
22+
describe the status of the library in some detail, including major improvements
23+
from the previous release and new feature work. For the general LLVM release
24+
notes, see `the LLVM documentation <https://llvm.org/docs/ReleaseNotes.html>`_.
25+
All LLVM releases may be downloaded from the `LLVM releases web site
26+
<https://llvm.org/releases/>`_.
27+
28+
Note that if you are reading this file from a source checkout or the main PSTL
29+
web page, this document applies to the *next* release, not the current one.
30+
To see the release notes for a specific release, please see the `releases
31+
page <https://llvm.org/releases/>`_.
32+
33+
What's New in PSTL 10.0.0?
34+
==========================
35+
36+
New Features
37+
------------
38+
39+
API Changes
40+
-----------

examples/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@
187187
/opt/intel/tbb/include,
188188
"$(PSTLROOT)/include",
189189
/opt/intel/pstl/include,
190+
"$(PSTLROOT)/stdlib",
191+
/opt/intel/pstl/stdlib,
190192
);
191193
ICC_CXX_LANG_DIALECT = "c++11";
192194
LIBRARY_SEARCH_PATHS = (
@@ -253,6 +255,8 @@
253255
/opt/intel/tbb/include,
254256
"$(PSTLROOT)/include",
255257
/opt/intel/pstl/include,
258+
"$(PSTLROOT)/stdlib",
259+
/opt/intel/pstl/stdlib,
256260
);
257261
ICC_CXX_LANG_DIALECT = "c++11";
258262
LIBRARY_SEARCH_PATHS = (

examples/dot_product/xcode/dot_product.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@
186186
/opt/intel/pstl/include,
187187
"$(TBBROOT)/include",
188188
/opt/intel/tbb/include,
189+
"$(PSTLROOT)/stdlib",
190+
/opt/intel/pstl/stdlib,
189191
);
190192
ICC_CXX_LANG_DIALECT = "c++11";
191193
ICC_OTHER_CPLUSPLUSFLAGS = "$(ICC_OTHER_CFLAGS) $(OTHER_CPLUSPLUSFLAGS) -xHOST -qopenmp-simd";
@@ -260,6 +262,8 @@
260262
/opt/intel/pstl/include,
261263
"$(TBBROOT)/include",
262264
/opt/intel/tbb/include,
265+
"$(PSTLROOT)/stdlib",
266+
/opt/intel/pstl/stdlib,
263267
);
264268
ICC_CXX_LANG_DIALECT = "c++11";
265269
ICC_DEBUG = NO;

examples/gamma_correction/xcode/gamma_correction.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
/opt/intel/pstl/include,
193193
"$(TBBROOT)/include",
194194
/opt/intel/tbb/include,
195+
"$(PSTLROOT)/stdlib",
196+
/opt/intel/pstl/stdlib,
195197
);
196198
ICC_CXX_LANG_DIALECT = "c++11";
197199
ICC_TBB = YES;
@@ -258,6 +260,8 @@
258260
/opt/intel/pstl/include,
259261
"$(TBBROOT)/include",
260262
/opt/intel/tbb/include,
263+
"$(PSTLROOT)/stdlib",
264+
/opt/intel/pstl/stdlib,
261265
);
262266
ICC_CXX_LANG_DIALECT = "c++11";
263267
ICC_TBB = YES;

include/pstl/internal/glue_numeric_defs.h

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- C++ -*-
22
//===----------------------------------------------------------------------===//
33
//
4-
// Copyright (C) 2017-2019 Intel Corporation
4+
// Copyright (C) 2017-2020 Intel Corporation
55
//
66
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
//
@@ -62,10 +62,34 @@ pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterato
6262
exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
6363
_ForwardIterator2 __result, _Tp __init);
6464

65+
#if !_PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY
6566
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
6667
pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
6768
exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
6869
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op);
70+
#else
71+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
72+
_ForwardIterator2
73+
exclusive_scan(pstl::execution::sequenced_policy, _ForwardIterator1 __first, _ForwardIterator1 __last,
74+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op);
75+
76+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
77+
_ForwardIterator2
78+
exclusive_scan(pstl::execution::unsequenced_policy, _ForwardIterator1 __first, _ForwardIterator1 __last,
79+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op);
80+
81+
# if _PSTL_USE_PAR_POLICIES
82+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
83+
_ForwardIterator2
84+
exclusive_scan(pstl::execution::parallel_policy, _ForwardIterator1 __first, _ForwardIterator1 __last,
85+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op);
86+
87+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
88+
_ForwardIterator2
89+
exclusive_scan(pstl::execution::parallel_unsequenced_policy, _ForwardIterator1 __first, _ForwardIterator1 __last,
90+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op);
91+
# endif
92+
#endif
6993

7094
// [inclusive.scan]
7195

include/pstl/internal/glue_numeric_impl.h

+41-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- C++ -*-
22
//===----------------------------------------------------------------------===//
33
//
4-
// Copyright (C) 2017-2019 Intel Corporation
4+
// Copyright (C) 2017-2020 Intel Corporation
55
//
66
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
//
@@ -106,6 +106,7 @@ exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIte
106106
std::plus<_Tp>(), pstl::__internal::__no_op());
107107
}
108108

109+
#if !_PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY
109110
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
110111
pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
111112
exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
@@ -114,6 +115,45 @@ exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIte
114115
return transform_exclusive_scan(std::forward<_ExecutionPolicy>(__exec), __first, __last, __result, __init,
115116
__binary_op, pstl::__internal::__no_op());
116117
}
118+
#else
119+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
120+
_ForwardIterator2
121+
exclusive_scan(pstl::execution::sequenced_policy __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
122+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op)
123+
{
124+
return transform_exclusive_scan(__exec, __first, __last, __result, __init, __binary_op,
125+
pstl::__internal::__no_op());
126+
}
127+
128+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
129+
_ForwardIterator2
130+
exclusive_scan(pstl::execution::unsequenced_policy __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
131+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op)
132+
{
133+
return transform_exclusive_scan(__exec, __first, __last, __result, __init, __binary_op,
134+
pstl::__internal::__no_op());
135+
}
136+
137+
# if _PSTL_USE_PAR_POLICIES
138+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
139+
_ForwardIterator2
140+
exclusive_scan(pstl::execution::parallel_policy __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
141+
_ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op)
142+
{
143+
return transform_exclusive_scan(__exec, __first, __last, __result, __init, __binary_op,
144+
pstl::__internal::__no_op());
145+
}
146+
147+
template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation>
148+
_ForwardIterator2
149+
exclusive_scan(pstl::execution::parallel_unsequenced_policy __exec, _ForwardIterator1 __first,
150+
_ForwardIterator1 __last, _ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op)
151+
{
152+
return transform_exclusive_scan(__exec, __first, __last, __result, __init, __binary_op,
153+
pstl::__internal::__no_op());
154+
}
155+
# endif
156+
#endif
117157

118158
// [inclusive.scan]
119159

include/pstl/internal/pstl_config.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- C++ -*-
22
//===----------------------------------------------------------------------===//
33
//
4-
// Copyright (C) 2017-2019 Intel Corporation
4+
// Copyright (C) 2017-2020 Intel Corporation
55
//
66
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
//
@@ -24,7 +24,7 @@
2424
#define _PSTL_VERSION_PATCH (_PSTL_VERSION % 10)
2525

2626
// The version of the Parallel STL implementation released by Intel
27-
#define __INTEL_PSTL_VERSION 210
27+
#define __INTEL_PSTL_VERSION 211
2828
#define __INTEL_PSTL_VERSION_MAJOR (__INTEL_PSTL_VERSION / 100)
2929
#define __INTEL_PSTL_VERSION_MINOR (__INTEL_PSTL_VERSION % 100)
3030

@@ -184,4 +184,9 @@
184184
// broken macros
185185
#define _PSTL_CPP11_STD_ROTATE_BROKEN ((__GLIBCXX__ && __GLIBCXX__ < 20150716) || (_MSC_VER && _MSC_VER < 1800))
186186

187+
// Some C++ standard libraries (GCC 9.1(2) and Clang 9) contain 'exclusive_scan' declaration (version with binary_op)
188+
// w/o "enable_if". So, a call 'exclusive_scan' may be ambiguous in case of a custom policy using.
189+
#define _PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY \
190+
((_PSTL_GCC_VERSION == 90101 || _PSTL_GCC_VERSION == 90201 || __clang_major__ == 9) && __cplusplus >= 201703L)
191+
187192
#endif /* _PSTL_CONFIG_H */

test/pstl/version.pass.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- C++ -*-
22
//===-- version.pass.cpp --------------------------------------------------===//
33
//
4-
// Copyright (C) 2017-2019 Intel Corporation
4+
// Copyright (C) 2017-2020 Intel Corporation
55
//
66
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
//
@@ -26,9 +26,9 @@ static_assert(_PSTL_VERSION_MAJOR == 10);
2626
static_assert(_PSTL_VERSION_MINOR == 00);
2727
static_assert(_PSTL_VERSION_PATCH == 0);
2828

29-
static_assert(__INTEL_PSTL_VERSION == 210);
29+
static_assert(__INTEL_PSTL_VERSION == 211);
3030
static_assert(__INTEL_PSTL_VERSION_MAJOR == 2);
31-
static_assert(__INTEL_PSTL_VERSION_MINOR == 10);
31+
static_assert(__INTEL_PSTL_VERSION_MINOR == 11);
3232

3333
int main() {
3434
std::cout << TestUtils::done() << std::endl;

test/std/numerics/numeric.ops/scan.pass.cpp

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- C++ -*-
22
//===-- scan.pass.cpp -----------------------------------------------------===//
33
//
4-
// Copyright (C) 2017-2019 Intel Corporation
4+
// Copyright (C) 2017-2020 Intel Corporation
55
//
66
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
//
@@ -22,10 +22,6 @@
2222

2323
using namespace TestUtils;
2424

25-
// GCC 9.1 contains an issue with exclusive scan with binary op visibility - it can be executed with
26-
// policies defined in pstl::execution namespace
27-
#define _PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY (_PSTL_GCC_VERSION == 90101 && __cplusplus >= 201703L)
28-
2925
// We provide the no execution policy versions of the exclusive_scan and inclusive_scan due checking correctness result of the versions with execution policies.
3026
//TODO: to add a macro for availability of ver implementations
3127
template <class InputIterator, class OutputIterator, class T>
@@ -150,18 +146,13 @@ struct test_scan_with_binary_op
150146
{
151147
using namespace std;
152148

153-
auto orr1 = inclusive ? inclusive_scan_serial(in_first, in_last, expected_first, binary_op, init)
154-
#if !_PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY
155-
: exclusive_scan_serial(in_first, in_last, expected_first, init, binary_op);
156-
#else
157-
: out_last;
158-
#endif
149+
if(inclusive)
150+
inclusive_scan_serial(in_first, in_last, expected_first, binary_op, init);
151+
else
152+
exclusive_scan_serial(in_first, in_last, expected_first, init, binary_op);
153+
159154
auto orr = inclusive ? inclusive_scan(exec, in_first, in_last, out_first, binary_op, init)
160-
#if !_PSTL_EXCLUSIVE_SCAN_WITH_BINARY_OP_AMBIGUITY
161155
: exclusive_scan(exec, in_first, in_last, out_first, init, binary_op);
162-
#else
163-
: out_last;
164-
#endif
165156

166157
EXPECT_TRUE(out_last == orr, "scan returned wrong iterator");
167158
check_and_reset(expected_first, out_first, n, trash);

0 commit comments

Comments
 (0)