# Category ptl History

See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!

-------------------------------------------------------------------------------

## 2024-11-14 Ben Morgan (ptl-V11-02-03)
- Add max CMake version in PTLConfig.cmake.in to suppress warnings in latest
  CMake versions about support for 3.10 being dropped.

## 2024-11-01 Ben Morgan (ptl-V11-02-02)
- Fix Coverity warnings:
  - 105693: use std:move to avoid direct copy
  - 105524: remove structurally dead code

## 2024-05-14 Ben Morgan (ptl-V11-02-01)
- Import latest PTL master (f892a93d) from GitHub, patched for Geant4 source layout
  - Local changes since ptl-V11-00-03 retained
- Includes upstream changes since ptl-V11-00-03:
  - 44: Simplification and refactor of main API
  - 45: Removal of env vars for ThreadPool config
  - 46: Bump version to 3.0.0

## 2024-04-24 Pere Mato (ptl-V11-02-00)
- Changed Windows.h to windows.h since for MinGW always seems to be lower case, not relevant for native builds.

## 2023-10-11 Ben Morgan (ptl-V11-01-00)
- Disable optimization of ThreadPool::execute_thread on Apple/Intel/AppleClang builds
  - Workaround for Bugzilla 2564

## 2022-11-18 Gabriele Cosmo (ptl-V11-00-05)
- More compilation warnings fixes for implicit type conversions.

## 2022-11-17 Gabriele Cosmo (ptl-V11-00-04)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.

## 2022-09-02 Ben Morgan (ptl-V11-00-03)
- Import latest PTL master (3a258fd) from GitHub, patched for Geant4 source code layout.
- Includes following PRs since version 2.3.3 (ptl-V11-00-01)
  - 31: Minor fixes for macOS/Clang and use as a subproject 
  - 33: Make copy explicit in range loop
  - 34: General code cleanup/tidy
  - 35: Set PTL_SANITIZER_TYPE to existing value, if it exists (ptl-V11-00-02)
  - 36: Replace sigignore(<SIG>) with signal(<SIG>, SIG_IGN)
  - 38: Address resource leakage, unneeded dereferences, noxcept issue identified by Geant4 Coverity checks
    - Coverity issues 104093, 104627, 104757, 104763

## 2022-06-14 Ben Morgan (ptl-V11-00-02)
- Use any existing value of PTL_SANITIZER_TYPE to set the cache value to prevent
  override. Fixes Issue #128.

## 2022-05-19 Ben Morgan (ptl-V11-00-01)
- Import PTL v2.3.3, patching for Geant4 organisation of source code

## 2021-12-10 Ben Morgan (ptl-V11-00-00)
- Change to new Markdown History format

---

# History entries prior to 11.0

21 September 2021 - G. Amadio (ptl-V10-07-08)
- Fix C++20 warnings from GCC 11.2.0.

6 June 2021 - J. Madsen (ptl-V10-07-07)
- Fix to TaskRunManager::Terminate() + nullptr to m_thread_pool
  (causes seg-fault when ui/viz inited but run not inited)

3 June 2021 - B. Morgan (ptl-V10-07-06)
- Do not expose PTL_... CMake options to clients building Geant4
- Remove exposure of CMAKE_CXX_... options controlled by master project

24 May 2021 - J. Madsen (ptl-V10-07-05)
- Updated PTL to v2.0.0 which replaced raw pointers to tasks with
  shared_ptrs for memory management improvements

18th May 2021 - B.Morgan (ptl-V10-07-04)
- Use CMAKE_CXX_STANDARD in place of GEANT4_BUILD_CXXSTD

15 May 2021 - J. Madsen (ptl-V10-07-03)
- Make PTL cmake options available
    - Useful options include PTL_USE_SANITIZER and PTL_USE_LOCKS
- Removed PTL custom task allocator classes
- Fixed warnings about TBB task scheduler init
- Improved thread safety
- Fixed some memory issues

5 May 2021 - G.Cosmo (ptl-V10-07-02)
- Updated minimum CMake version requirements in CMakeList.txt.

22 Feb 2021 - B.Morgan (ptl-V10-07-01)
- Apply patch from Gunter to fix component installs on Windows

8 Nov 2020 - B.Morgan (ptl-V10-07-00)
- Force installation of PTL headers to CMAKE_INSTALL_INCLUDEDIR/Geant4, following
  behaviour for other builtins
- Don't override CMAKE_INSTALL_CONFIGDIR variable as this should be set in the parent
  directory.

2 Nov 2020 - B.Morgan (ptl-V10-06-08)
- BUGFIX #2286: Install PTL DLL/archive into appropriate platform dependent
  locations.

20 Oct 2020 - B.Morgan (ptl-V10-06-07)
- Export interface targets used by both static and shared variants of
  PTL to a dedicated file in the build directory. Required to avoid
  missing/double definitions of targets when building Geant4/PTL with
  shared/static at the same time.

5 Oct 2020 - J.Madsen(ptl-V10-06-06)
- Stability fixes for ensuring that stack variables are copied
  into task-group functions

23 Sept 2020 - J.Madsen (ptl-V10-06-05)
- All template parameters using leading underscore followed by
  capital letter have been replaced --> reserved for standard library
- TaskGroup and TBBTaskGroup support non-aggregating join function
- Arguments are copied into tuple for tasks

12 Sept 2020 - J.Madsen (ptl-V10-06-04)
- Fixed issues with PTL::ThreadPool destruction.
  - For some ill-advised reason, the original impl detached the threads
    instead of joining them to ensure they were deleted
- Created generic execute_on_all_threads member function for thread pool
  - this handles the complexity of performing this operation w/ TBB
- cleaned up the inconsistent naming in PTL::ThreadPool

23 June 2020 - J.Madsen (ptl-V10-06-03)
- Tweaked VTaskGroup to use a vector instead of list
- Declared the default ctor/dtor/assign-op for
  JoinFunction class in TaskGroup

22 June 2020 - B.Morgan (ptl-V10-06-02)
- Force use of -pthread on non-Win32 platforms

18 June 2020 - G.Cosmo (ptl-V10-06-01)
- Adapted files organisation to Geant4 and fixed porting on Windows DLLs.
- Changed library name to "G4ptl", to distinguish from external installation.
- Integrated with GNUmake system.

8 May 2020 - J.Madsen (ptl-V10-06-00)
- New module for built-in Parallel Tasking Library (PTL), a Lightweight
  C++11 multithreading tasking system featuring thread-pool, task-groups,
  and lock-free task queue.
  Original version 0.0.2.
