Skip to content

Commit 08d28b5

Browse files
committed
Committing Parallel STL 20180322 open source release
1 parent 4424e3d commit 08d28b5

File tree

91 files changed

+857
-593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+857
-593
lines changed

CHANGES

Lines changed: 9 additions & 0 deletions
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 2018 Update 2
5+
PSTL_VERSION == 103
6+
7+
Features / APIs:
8+
9+
- More algorithms support parallel and/or vector execution policies:
10+
find_end, merge, search, search_n
11+
12+
------------------------------------------------------------------------
413
Parallel STL 20171127 release
514
PSTL_VERSION == 102
615

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Parallel STL
2-
[![Stable release](https://img.shields.io/badge/version-20171127-green.svg)](https://github.com/intel/parallelstl/releases/tag/20171127)
2+
[![Stable release](https://img.shields.io/badge/version-20180322-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180322)
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,

build/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -47,11 +47,8 @@ all: $(test_bin)
4747
test_%.offload.exe: test_%.offload$(OBJ_SFX) exception_list.offload$(OBJ_SFX)
4848
$(CPLUS) $(CPLUS_FLAGS) $^ $(FKEY)o$@ $(LDFLAGS)
4949

50-
%.offload$(OBJ_SFX): %.cpp $(PSTL_MAKEFILE)
51-
$(CPLUS) $(CPLUS_FLAGS) -D__PSTL_MIC_OFFLOAD -offload-attribute-target=mic -c $< $(FKEY)o$@
52-
5350
$(PSTL_LIB_NAME):
54-
$(MAKE) -f $(PSTL_MAKEFILE) backend=$(backend) linkage=$(linkage) cfg=$(cfg)
51+
$(MAKE) -f $(PSTL_MAKEFILE) backend=$(backend) cfg=$(cfg)
5552

5653
test_%.exe: test_%$(OBJ_SFX) $(PSTL_LIB_NAME)
5754
$(info LIBRARY_PATH=$(LIBRARY_PATH))

build/Makefile.common

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -27,10 +27,6 @@ ifeq (, $(filter $(MAKECMDGOALS), clean clean_all))
2727
$(info Threading backend was not specified; using TBB)
2828
backend=tbb
2929
endif
30-
ifeq (, $(filter $(linkage), shared static none))
31-
$(warning using linkage=none (header-only implementation))
32-
linkage=none
33-
endif
3430
endif
3531

3632
ifndef os_name
@@ -57,20 +53,12 @@ endif # !os_name
5753
cfg ?= release
5854
stdver ?= c++11
5955

60-
override INCLUDES += -I$(proj_root)/include -I$(proj_root)/test
56+
override INCLUDES += -I$(proj_root)/include -I$(proj_root)/test
6157

6258
TEST_MACRO += -D__PSTL_TEST_SUCCESSFUL_KEYWORD=1
6359

6460
ifeq ($(backend), tbb)
65-
BACKEND_MACRO += -D__PSTL_USE_TBB
66-
endif
67-
68-
ifneq (, $(filter $(linkage), shared))
69-
LINKAGE_MACRO += -D__PSTL_SHARED_LINKAGE
70-
endif
71-
72-
ifeq (, $(filter $(linkage), none))
73-
LINKAGE_MACRO += -D__PSTL_HEADER_ONLY=0
61+
BACKEND_MACRO += -D__PSTL_PAR_BACKEND_TBB
7462
endif
7563

7664
target ?= $(os_name)
@@ -104,7 +92,7 @@ endif
10492

10593

10694
OPTIMIZATION_ENABLED_FLAGS += $(XHOST_FLAG)
107-
OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG)
95+
OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG)
10896

10997

11098
ifeq ($(cfg), debug)
@@ -120,7 +108,6 @@ DYN_LDFLAGS += $(PSTL_ARCH)
120108
CPLUS_FLAGS += $(TEST_MACRO)
121109
CPLUS_FLAGS += $(INCLUDES)
122110
CPLUS_FLAGS += $(BACKEND_MACRO)
123-
CPLUS_FLAGS += $(LINKAGE_MACRO)
124111
CPLUS_FLAGS += $(CXXFLAGS)
125112
CPLUS_FLAGS += $(OPTIMIZATION_KEYS)
126113

build/Makefile.pstl

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -28,54 +28,12 @@ include $(proj_root)/build/Makefile.common
2828

2929
VPATH = $(proj_root)/src
3030

31-
ifneq (, $(filter $(linkage), shared))
32-
CPLUS_FLAGS += -D__PSTL_EXPORTS
33-
endif
34-
35-
ifeq ($(os_name),windows)
36-
ifneq (, $(filter $(linkage), shared))
37-
LD = link
38-
PSTL_LINKAGE = $(KEY)DLL
39-
LIB_EXT = .dll
40-
else
41-
LD = LIB
42-
LIB_EXT = .lib
43-
endif
44-
else
45-
LIB_PREFIX = lib
46-
ifneq (, $(filter $(linkage), shared))
47-
LD = $(compiler) # ld does not look into LIBRARY_PATH by default for some reason
48-
PSTL_LINKAGE = $(KEY)shared
49-
CPLUS_FLAGS += $(KEY)fPIC
50-
LIB_EXT = .so
51-
LD_OUT_KEY = $(KEY)o
52-
TBB_LD_FLAGS = $(LINK_KEY)$(TBB_LIB_NAME)
53-
LDFLAGS += $(DYN_LDFLAGS)
54-
else
55-
LD = ar
56-
LIB_EXT = .a
57-
LDFLAGS += rs
58-
LD_OUT_KEY :=
59-
endif
60-
endif
61-
62-
ifeq ($(backend), tbb)
63-
ifeq ($(offload), mic)
64-
TBB_LD_FLAGS = $(KEY)tbb
65-
endif
66-
ifneq (, $(filter $(linkage), shared))
67-
LDFLAGS += $(TBB_LD_FLAGS)
68-
endif
69-
endif
70-
7131
lib_src = $(wildcard $(proj_root)/src/*.cpp)
7232
lib_obj = $(notdir $(lib_src:.cpp=$(OBJ_SFX)))
7333

7434
all: pstl
7535

7636
pstl: $(PSTL_LIB_NAME)
77-
$(PSTL_LIB_NAME): $(lib_obj)
78-
$(LD) $(PSTL_LINKAGE) $(LDFLAGS) $(LD_OUT_KEY)$(LIB_PREFIX)$@$(LIB_EXT) $^
7937

8038
%$(OBJ_SFX): %.cpp $(proj_root)/build/Makefile.pstl
8139
$(CPLUS) $(CPLUS_FLAGS) -c $< $(FKEY)o$@

build/android.inc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -20,13 +20,26 @@ PSTL_ARCH=
2020
PIE_FLAGS = -pie -fPIE -fPIC
2121
SDL_FLAGS = -fstack-protector -Wformat -Wformat-security
2222
CPLUS_FLAGS += $(TARGET_CFLAGS) $(PIE_FLAGS) $(SDL_FLAGS)
23+
2324
# Paths to the NDK prebuilt tools and libraries
24-
CPLUS_FLAGS += --sysroot=$(SYSROOT)
25+
ifneq (,$(findstring $(ndk_version),r16 r16b))
26+
ifeq (clang,$(compiler))
27+
# Since Android* NDK r16 another sysroot and isystem paths have to be specified
28+
CPLUS_FLAGS += --sysroot=$(NDK_ROOT)/sysroot -isystem $(NDK_ROOT)/sysroot/usr/include/$(TRIPLE)
29+
# Android* version flag required since r16
30+
CPLUS_FLAGS += -D__ANDROID_API__=$(API_LEVEL)
31+
else
32+
CPLUS_FLAGS += --sysroot=$(SYSROOT)
33+
endif
34+
else
35+
CPLUS_FLAGS += --sysroot=$(SYSROOT)
36+
endif
37+
2538
LDFLAGS += --sysroot=$(SYSROOT) $(TARGET_CFLAGS)
2639
PSTL_LIB_LINK += -lc++abi -L$(CPLUS_LIB_PATH) -lc++_shared
2740

2841
ifeq (arm,$(arch))
29-
PSTL_LIB_LINK += -lunwind
42+
PSTL_LIB_LINK += -lunwind
3043
endif
3144

3245
# TARGET_CXX cames from NDK

build/android.linux.launcher.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# Copyright (c) 2017 Intel Corporation
3+
# Copyright (c) 2017-2018 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929
#
3030
# Libs and executable necessary for testing should be present in the current directory before running.
3131
# ANDROID_SERIAL must be set to the connected Android target device name for file transfer and test runs.
32-
# ANDROID_TEST_DIRECTORY may be set to the directory used for testing on the Android target device; otherwise,
32+
# ANDROID_TEST_DIRECTORY may be set to the directory used for testing on the Android target device; otherwise,
3333
# the default directory used is "/data/local/tmp/$(basename $PWD)".
3434
# Note: Do not remove the redirections to '/dev/null' in the script, otherwise the nightly test system will fail.
3535

@@ -56,7 +56,7 @@ do case $flag in #
5656
l ) # Additional library
5757
ldpreload="$OPTARG " ;; #
5858
u ) # Stack limit
59-
;; #
59+
;; #
6060
q ) # Quiet mode, removes 'done' but prepends any other output by test name
6161
OUTPUT='2>&1 | sed -e "s/done//;/^[[:space:]]*$/d;s!^!$exename: !"' ;; #
6262
v ) # Verbose mode

build/clang.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -26,6 +26,6 @@ XHOST_FLAG = -fno-vectorize
2626
CPLUS_FLAGS += $(FQKEY)std=$(stdver)
2727
# XHOST_FLAG = $(KEY)mavx2 -fno-vectorize
2828
# XHOST_FLAG = $(KEY)mavx512f -fno-vectorize
29-
# DYN_LDFLAGS += $(LINK_KEY)c++
29+
# DYN_LDFLAGS += $(LINK_KEY)c++
3030
# CPLUS_FLAGS += -stdlib=libc++
3131
# CPLUS_FLAGS += -fopenmp-simd //it will be supported in he future version

build/gcc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

build/icc.inc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 Intel Corporation
1+
# Copyright (c) 2017-2018 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,12 +18,9 @@
1818

1919
vecreport ?= 0 #may be set to [0..7], see https://software.intel.com/en-us/node/522949 for details
2020

21-
ifeq ($(target),mic)
22-
XHOST_FLAG = $(KEY)no-vec
23-
else
24-
XHOST_FLAG = $(KEY)xHOST -no-vec
25-
CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding
26-
endif
21+
XHOST_FLAG = $(KEY)xHOST -no-vec
22+
CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding
23+
2724
# XHOST_FLAG = $(KEY)xCORE-AVX2 -no-vec
2825
# XHOST_FLAG = $(KEY)xSSE4.1 -no-vec
2926
# XHOST_FLAG = $(KEY)xMIC-AVX512 -no-vec

0 commit comments

Comments
 (0)