Skip to content

Commit

Permalink
Committing Parallel STL 20180322 open source release
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Mar 22, 2018
1 parent 4424e3d commit 08d28b5
Show file tree
Hide file tree
Showing 91 changed files with 857 additions and 593 deletions.
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
------------------------------------------------------------------------
The list of most significant changes made over time in Parallel STL.

Parallel STL release within Intel(R) Parallel Studio XE 2018 Update 2
PSTL_VERSION == 103

Features / APIs:

- More algorithms support parallel and/or vector execution policies:
find_end, merge, search, search_n

------------------------------------------------------------------------
Parallel STL 20171127 release
PSTL_VERSION == 102

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-20171127-green.svg)](https://github.com/intel/parallelstl/releases/tag/20171127)
[![Stable release](https://img.shields.io/badge/version-20180322-green.svg)](https://github.com/intel/parallelstl/releases/tag/20180322)
[![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
7 changes: 2 additions & 5 deletions build/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -47,11 +47,8 @@ all: $(test_bin)
test_%.offload.exe: test_%.offload$(OBJ_SFX) exception_list.offload$(OBJ_SFX)
$(CPLUS) $(CPLUS_FLAGS) $^ $(FKEY)o$@ $(LDFLAGS)

%.offload$(OBJ_SFX): %.cpp $(PSTL_MAKEFILE)
$(CPLUS) $(CPLUS_FLAGS) -D__PSTL_MIC_OFFLOAD -offload-attribute-target=mic -c $< $(FKEY)o$@

$(PSTL_LIB_NAME):
$(MAKE) -f $(PSTL_MAKEFILE) backend=$(backend) linkage=$(linkage) cfg=$(cfg)
$(MAKE) -f $(PSTL_MAKEFILE) backend=$(backend) cfg=$(cfg)

test_%.exe: test_%$(OBJ_SFX) $(PSTL_LIB_NAME)
$(info LIBRARY_PATH=$(LIBRARY_PATH))
Expand Down
21 changes: 4 additions & 17 deletions build/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -27,10 +27,6 @@ ifeq (, $(filter $(MAKECMDGOALS), clean clean_all))
$(info Threading backend was not specified; using TBB)
backend=tbb
endif
ifeq (, $(filter $(linkage), shared static none))
$(warning using linkage=none (header-only implementation))
linkage=none
endif
endif

ifndef os_name
Expand All @@ -57,20 +53,12 @@ endif # !os_name
cfg ?= release
stdver ?= c++11

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

TEST_MACRO += -D__PSTL_TEST_SUCCESSFUL_KEYWORD=1

ifeq ($(backend), tbb)
BACKEND_MACRO += -D__PSTL_USE_TBB
endif

ifneq (, $(filter $(linkage), shared))
LINKAGE_MACRO += -D__PSTL_SHARED_LINKAGE
endif

ifeq (, $(filter $(linkage), none))
LINKAGE_MACRO += -D__PSTL_HEADER_ONLY=0
BACKEND_MACRO += -D__PSTL_PAR_BACKEND_TBB
endif

target ?= $(os_name)
Expand Down Expand Up @@ -104,7 +92,7 @@ endif


OPTIMIZATION_ENABLED_FLAGS += $(XHOST_FLAG)
OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG)
OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG)


ifeq ($(cfg), debug)
Expand All @@ -120,7 +108,6 @@ DYN_LDFLAGS += $(PSTL_ARCH)
CPLUS_FLAGS += $(TEST_MACRO)
CPLUS_FLAGS += $(INCLUDES)
CPLUS_FLAGS += $(BACKEND_MACRO)
CPLUS_FLAGS += $(LINKAGE_MACRO)
CPLUS_FLAGS += $(CXXFLAGS)
CPLUS_FLAGS += $(OPTIMIZATION_KEYS)

Expand Down
44 changes: 1 addition & 43 deletions build/Makefile.pstl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -28,54 +28,12 @@ include $(proj_root)/build/Makefile.common

VPATH = $(proj_root)/src

ifneq (, $(filter $(linkage), shared))
CPLUS_FLAGS += -D__PSTL_EXPORTS
endif

ifeq ($(os_name),windows)
ifneq (, $(filter $(linkage), shared))
LD = link
PSTL_LINKAGE = $(KEY)DLL
LIB_EXT = .dll
else
LD = LIB
LIB_EXT = .lib
endif
else
LIB_PREFIX = lib
ifneq (, $(filter $(linkage), shared))
LD = $(compiler) # ld does not look into LIBRARY_PATH by default for some reason
PSTL_LINKAGE = $(KEY)shared
CPLUS_FLAGS += $(KEY)fPIC
LIB_EXT = .so
LD_OUT_KEY = $(KEY)o
TBB_LD_FLAGS = $(LINK_KEY)$(TBB_LIB_NAME)
LDFLAGS += $(DYN_LDFLAGS)
else
LD = ar
LIB_EXT = .a
LDFLAGS += rs
LD_OUT_KEY :=
endif
endif

ifeq ($(backend), tbb)
ifeq ($(offload), mic)
TBB_LD_FLAGS = $(KEY)tbb
endif
ifneq (, $(filter $(linkage), shared))
LDFLAGS += $(TBB_LD_FLAGS)
endif
endif

lib_src = $(wildcard $(proj_root)/src/*.cpp)
lib_obj = $(notdir $(lib_src:.cpp=$(OBJ_SFX)))

all: pstl

pstl: $(PSTL_LIB_NAME)
$(PSTL_LIB_NAME): $(lib_obj)
$(LD) $(PSTL_LINKAGE) $(LDFLAGS) $(LD_OUT_KEY)$(LIB_PREFIX)$@$(LIB_EXT) $^

%$(OBJ_SFX): %.cpp $(proj_root)/build/Makefile.pstl
$(CPLUS) $(CPLUS_FLAGS) -c $< $(FKEY)o$@
Expand Down
19 changes: 16 additions & 3 deletions build/android.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand All @@ -20,13 +20,26 @@ PSTL_ARCH=
PIE_FLAGS = -pie -fPIE -fPIC
SDL_FLAGS = -fstack-protector -Wformat -Wformat-security
CPLUS_FLAGS += $(TARGET_CFLAGS) $(PIE_FLAGS) $(SDL_FLAGS)

# Paths to the NDK prebuilt tools and libraries
CPLUS_FLAGS += --sysroot=$(SYSROOT)
ifneq (,$(findstring $(ndk_version),r16 r16b))
ifeq (clang,$(compiler))
# Since Android* NDK r16 another sysroot and isystem paths have to be specified
CPLUS_FLAGS += --sysroot=$(NDK_ROOT)/sysroot -isystem $(NDK_ROOT)/sysroot/usr/include/$(TRIPLE)
# Android* version flag required since r16
CPLUS_FLAGS += -D__ANDROID_API__=$(API_LEVEL)
else
CPLUS_FLAGS += --sysroot=$(SYSROOT)
endif
else
CPLUS_FLAGS += --sysroot=$(SYSROOT)
endif

LDFLAGS += --sysroot=$(SYSROOT) $(TARGET_CFLAGS)
PSTL_LIB_LINK += -lc++abi -L$(CPLUS_LIB_PATH) -lc++_shared

ifeq (arm,$(arch))
PSTL_LIB_LINK += -lunwind
PSTL_LIB_LINK += -lunwind
endif

# TARGET_CXX cames from NDK
Expand Down
6 changes: 3 additions & 3 deletions build/android.linux.launcher.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -29,7 +29,7 @@
#
# Libs and executable necessary for testing should be present in the current directory before running.
# ANDROID_SERIAL must be set to the connected Android target device name for file transfer and test runs.
# ANDROID_TEST_DIRECTORY may be set to the directory used for testing on the Android target device; otherwise,
# ANDROID_TEST_DIRECTORY may be set to the directory used for testing on the Android target device; otherwise,
# the default directory used is "/data/local/tmp/$(basename $PWD)".
# Note: Do not remove the redirections to '/dev/null' in the script, otherwise the nightly test system will fail.

Expand All @@ -56,7 +56,7 @@ do case $flag in #
l ) # Additional library
ldpreload="$OPTARG " ;; #
u ) # Stack limit
;; #
;; #
q ) # Quiet mode, removes 'done' but prepends any other output by test name
OUTPUT='2>&1 | sed -e "s/done//;/^[[:space:]]*$/d;s!^!$exename: !"' ;; #
v ) # Verbose mode
Expand Down
4 changes: 2 additions & 2 deletions build/clang.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -26,6 +26,6 @@ XHOST_FLAG = -fno-vectorize
CPLUS_FLAGS += $(FQKEY)std=$(stdver)
# XHOST_FLAG = $(KEY)mavx2 -fno-vectorize
# XHOST_FLAG = $(KEY)mavx512f -fno-vectorize
# DYN_LDFLAGS += $(LINK_KEY)c++
# DYN_LDFLAGS += $(LINK_KEY)c++
# CPLUS_FLAGS += -stdlib=libc++
# CPLUS_FLAGS += -fopenmp-simd //it will be supported in he future version
2 changes: 1 addition & 1 deletion build/gcc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
11 changes: 4 additions & 7 deletions build/icc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand All @@ -18,12 +18,9 @@

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

ifeq ($(target),mic)
XHOST_FLAG = $(KEY)no-vec
else
XHOST_FLAG = $(KEY)xHOST -no-vec
CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding
endif
XHOST_FLAG = $(KEY)xHOST -no-vec
CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding

# XHOST_FLAG = $(KEY)xCORE-AVX2 -no-vec
# XHOST_FLAG = $(KEY)xSSE4.1 -no-vec
# XHOST_FLAG = $(KEY)xMIC-AVX512 -no-vec
Expand Down
2 changes: 1 addition & 1 deletion build/icl.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
2 changes: 1 addition & 1 deletion build/jni/Android.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
13 changes: 8 additions & 5 deletions build/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -44,20 +44,23 @@ export target?=android

ifeq (ia32,$(arch))
APP_ABI:=x86
export TRIPLE:=i686-linux-android
else ifeq (intel64,$(arch))
APP_ABI:=x86_64
export TRIPLE:=x86_64-linux-android
else ifeq (arm,$(arch))
APP_ABI:=armeabi-v7a
export TRIPLE:=arm-linux-androideabi
else ifeq (arm64,$(arch))
APP_ABI:=arm64-v8a
export TRIPLE:=aarch64-linux-android
else
APP_ABI:=$(arch)
endif

APP_PLATFORM:=android-21
ifneq ("","$(api_version)")
APP_PLATFORM:=$(api_version)
endif
api_version?=21
export API_LEVEL:=$(api_version)
APP_PLATFORM:=android-$(api_version)

ifeq (clang,$(compiler))
NDK_TOOLCHAIN_VERSION:=clang
Expand Down
2 changes: 1 addition & 1 deletion build/macos.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
6 changes: 3 additions & 3 deletions build/unix.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -37,8 +37,8 @@ LD = $(CPLUS)
USE_SHARED_CPPRUNTIME_KEY =
LINK_KEY = $(KEY)l

LD_OUT_KEY = $(KEY)o
DYN_LDFLAGS += -L. -L$(proj_root)/build
LD_OUT_KEY = $(KEY)o
DYN_LDFLAGS += -L. -L$(proj_root)/build
use_gold_linker ?= 0 # Use "gold" linker for test_algorithm when it runs on FreeBSD* 11 to avoid compilation errors

ifeq ($(use_gold_linker), 1)
Expand Down
8 changes: 4 additions & 4 deletions build/windows.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down Expand Up @@ -42,11 +42,11 @@ endif
# implicit linkage capability of TBB library

ifeq ($(cfg),debug)
LINK_KEY += $(KEY)debug
USE_SHARED_CPPRUNTIME_KEY += $(KEY)MDd $(KEY)EHsc
LINK_KEY += $(KEY)debug
USE_SHARED_CPPRUNTIME_KEY += $(KEY)MDd $(KEY)EHsc
BACKEND_MACRO += -DTBB_USE_DEBUG=1
else
USE_SHARED_CPPRUNTIME_KEY += $(KEY)MD $(KEY)EHsc
USE_SHARED_CPPRUNTIME_KEY += $(KEY)MD $(KEY)EHsc
endif

ifneq (, $(filter $(compiler), cl icl))
Expand Down
10 changes: 5 additions & 5 deletions doc/Release_Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ Software - Supported Operating Systems
Systems with Linux* operating systems
CentOS 7.1
Debian* 8, 9
Fedora* 24, 25
Fedora* 24, 25, 26
Red Hat* Enterprise Linux* 7
SuSE* Linux* Enterprise Server 12
Ubuntu* 14.04 LTS, 16.04 LTS, 17.04
Yocto 2.2, 2.3
Systems with OS X* and macOS* operating systems
OS X* 10.10, 10.11
macOS* 10.12
macOS* 10.12, 10.13
Systems with Android* operating systems
Android* 5.x, 6.x, 7.x
Android* 5.x, 6.x, 7.x, 8.x

Software - Supported Compilers

Expand All @@ -83,8 +83,8 @@ Software - Supported Compilers
version provided with that operating system is supported
GNU Compilers (gcc) 4.8 - 7.1
Clang* 3.3 - 3.8
Xcode* 6.3 - 8.3
Android* NDK r13 - r15b
Xcode* 6.3 - 9.1
Android* NDK r13 - r16

Known Issues or limitations

Expand Down
2 changes: 1 addition & 1 deletion examples/convex_hull/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
2 changes: 1 addition & 1 deletion examples/convex_hull/Makefile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2017-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.
Expand Down
Loading

0 comments on commit 08d28b5

Please sign in to comment.