diff options
author | Louis Dionne <ldionne@apple.com> | 2019-04-11 17:08:55 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-04-11 17:08:55 +0000 |
commit | ab38599bb1240066ece60f0b1f38d96c9901691b (patch) | |
tree | 5a0ff0d86eac74e6c770eb2068c91a55663c6543 /pstl | |
parent | 8d083c5e0bd3ce00c0ca46cec0aed9281c3cc38d (diff) | |
download | bcm5719-llvm-ab38599bb1240066ece60f0b1f38d96c9901691b.tar.gz bcm5719-llvm-ab38599bb1240066ece60f0b1f38d96c9901691b.zip |
[pstl] Setup the _PSTL_VERSION macro like _LIBCPP_VERSION, and add release notes
Reviewers: rodgert, MikeDvorskiy
Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60464
llvm-svn: 358193
Diffstat (limited to 'pstl')
-rw-r--r-- | pstl/CMakeLists.txt | 11 | ||||
-rw-r--r-- | pstl/docs/ReleaseNotes.rst | 40 | ||||
-rw-r--r-- | pstl/include/pstl/internal/pstl_config.h | 8 | ||||
-rw-r--r-- | pstl/test/pstl/version.pass.cpp | 17 |
4 files changed, 68 insertions, 8 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index f4b14f7347d..e72c85fda7c 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -9,12 +9,13 @@ cmake_minimum_required(VERSION 3.4.3) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") -file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define PSTL_VERSION .*$") -string(REGEX REPLACE "#define PSTL_VERSION (.*)$" "\\1" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}") -math(EXPR VERSION_MAJOR "${PARALLELSTL_VERSION_SOURCE} / 100") -math(EXPR VERSION_MINOR "${PARALLELSTL_VERSION_SOURCE} % 100") +file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") +string(REGEX REPLACE "#define _PSTL_VERSION (.*)$" "\\1" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}") +math(EXPR VERSION_MAJOR "(${PARALLELSTL_VERSION_SOURCE} / 1000)") +math(EXPR VERSION_MINOR "((${PARALLELSTL_VERSION_SOURCE} % 1000) / 10)") +math(EXPR VERSION_PATCH "(${PARALLELSTL_VERSION_SOURCE} % 10)") -project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR} LANGUAGES CXX) +project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX) option(PARALLELSTL_USE_PARALLEL_POLICIES "Enable parallel policies" OFF) set(PARALLELSTL_BACKEND "tbb" CACHE STRING "Threading backend; defaults to TBB") diff --git a/pstl/docs/ReleaseNotes.rst b/pstl/docs/ReleaseNotes.rst new file mode 100644 index 00000000000..b889c551fef --- /dev/null +++ b/pstl/docs/ReleaseNotes.rst @@ -0,0 +1,40 @@ +======================================== +PSTL 9.0.0 (In-Progress) Release Notes +======================================== + +.. contents:: + :local: + :depth: 2 + +Written by the `PSTL Team <https://pstl.llvm.org>`_ + +.. warning:: + + These are in-progress notes for the upcoming pstl 9 release. + Release notes for previous releases can be found on + `the Download Page <https://releases.llvm.org/download.html>`_. + +Introduction +============ + +This document contains the release notes for the PSTL parallel algorithms +library, part of the LLVM Compiler Infrastructure, release 9.0.0. Here we +describe the status of the library in some detail, including major improvements +from the previous release and new feature work. For the general LLVM release +notes, see `the LLVM documentation <https://llvm.org/docs/ReleaseNotes.html>`_. +All LLVM releases may be downloaded from the `LLVM releases web site +<https://llvm.org/releases/>`_. + +Note that if you are reading this file from a source checkout or the main PSTL +web page, this document applies to the *next* release, not the current one. +To see the release notes for a specific release, please see the `releases +page <https://llvm.org/releases/>`_. + +What's New in PSTL 9.0.0? +========================= + +New Features +------------ + +API Changes +----------- diff --git a/pstl/include/pstl/internal/pstl_config.h b/pstl/include/pstl/internal/pstl_config.h index 8d6dd9db961..e6728d39ffb 100644 --- a/pstl/include/pstl/internal/pstl_config.h +++ b/pstl/include/pstl/internal/pstl_config.h @@ -10,9 +10,11 @@ #ifndef _PSTL_CONFIG_H #define _PSTL_CONFIG_H -#define PSTL_VERSION 203 -#define PSTL_VERSION_MAJOR (PSTL_VERSION / 100) -#define PSTL_VERSION_MINOR (PSTL_VERSION - PSTL_VERSION_MAJOR * 100) +// The version is XYYZ, where X is major, YY is minor, and Z is patch (i.e. X.YY.Z) +#define _PSTL_VERSION 9000 +#define _PSTL_VERSION_MAJOR (_PSTL_VERSION / 1000) +#define _PSTL_VERSION_MINOR ((_PSTL_VERSION % 1000) / 10) +#define _PSTL_VERSION_PATCH (_PSTL_VERSION % 10) // Check the user-defined macro for parallel policies #if defined(PSTL_USE_PARALLEL_POLICIES) diff --git a/pstl/test/pstl/version.pass.cpp b/pstl/test/pstl/version.pass.cpp new file mode 100644 index 00000000000..15f6aeba762 --- /dev/null +++ b/pstl/test/pstl/version.pass.cpp @@ -0,0 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <pstl/internal/pstl_config.h> + + +static_assert(_PSTL_VERSION == 9000); +static_assert(_PSTL_VERSION_MAJOR == 9); +static_assert(_PSTL_VERSION_MINOR == 00); +static_assert(_PSTL_VERSION_PATCH == 0); + +int main() { } |