[libcxx-commits] [pstl] r358193 - [pstl] Setup the _PSTL_VERSION macro like _LIBCPP_VERSION, and add release notes

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 11 10:08:56 PDT 2019


Author: ldionne
Date: Thu Apr 11 10:08:55 2019
New Revision: 358193

URL: http://llvm.org/viewvc/llvm-project?rev=358193&view=rev
Log:
[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

Added:
    pstl/trunk/docs/
    pstl/trunk/docs/ReleaseNotes.rst
    pstl/trunk/test/pstl/version.pass.cpp
Modified:
    pstl/trunk/CMakeLists.txt
    pstl/trunk/include/pstl/internal/pstl_config.h

Modified: pstl/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/CMakeLists.txt?rev=358193&r1=358192&r2=358193&view=diff
==============================================================================
--- pstl/trunk/CMakeLists.txt (original)
+++ pstl/trunk/CMakeLists.txt Thu Apr 11 10:08:55 2019
@@ -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")

Added: pstl/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/docs/ReleaseNotes.rst?rev=358193&view=auto
==============================================================================
--- pstl/trunk/docs/ReleaseNotes.rst (added)
+++ pstl/trunk/docs/ReleaseNotes.rst Thu Apr 11 10:08:55 2019
@@ -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
+-----------

Modified: pstl/trunk/include/pstl/internal/pstl_config.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/pstl_config.h?rev=358193&r1=358192&r2=358193&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/pstl_config.h (original)
+++ pstl/trunk/include/pstl/internal/pstl_config.h Thu Apr 11 10:08:55 2019
@@ -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)

Added: pstl/trunk/test/pstl/version.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/test/pstl/version.pass.cpp?rev=358193&view=auto
==============================================================================
--- pstl/trunk/test/pstl/version.pass.cpp (added)
+++ pstl/trunk/test/pstl/version.pass.cpp Thu Apr 11 10:08:55 2019
@@ -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() { }




More information about the libcxx-commits mailing list