Index: pstl/trunk/CMakeLists.txt =================================================================== --- pstl/trunk/CMakeLists.txt +++ pstl/trunk/CMakeLists.txt @@ -9,12 +9,13 @@ 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") Index: pstl/trunk/docs/ReleaseNotes.rst =================================================================== --- pstl/trunk/docs/ReleaseNotes.rst +++ pstl/trunk/docs/ReleaseNotes.rst @@ -0,0 +1,40 @@ +======================================== +PSTL 9.0.0 (In-Progress) Release Notes +======================================== + +.. contents:: + :local: + :depth: 2 + +Written by the `PSTL Team `_ + +.. warning:: + + These are in-progress notes for the upcoming pstl 9 release. + Release notes for previous releases can be found on + `the Download Page `_. + +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 `_. +All LLVM releases may be downloaded from the `LLVM releases web site +`_. + +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 `_. + +What's New in PSTL 9.0.0? +========================= + +New Features +------------ + +API Changes +----------- Index: pstl/trunk/include/pstl/internal/pstl_config.h =================================================================== --- pstl/trunk/include/pstl/internal/pstl_config.h +++ pstl/trunk/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) Index: pstl/trunk/test/pstl/version.pass.cpp =================================================================== --- pstl/trunk/test/pstl/version.pass.cpp +++ pstl/trunk/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 + + +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() { }